All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ARM: EXYNOS: Add touchscreen support to SMDK4X12
@ 2012-05-25  8:58 Sachin Kamat
  2012-07-02  5:34 ` Sachin Kamat
  2012-07-13 13:51 ` Kukjin Kim
  0 siblings, 2 replies; 4+ messages in thread
From: Sachin Kamat @ 2012-05-25  8:58 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: kgene.kim, sachin.kamat, patches

Pixcir touchscreen device support is added to SMDK4X12 boards.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/mach-smdk4x12.c |   32 +++++++++++++++++++++++++++++++-
 1 files changed, 31 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
index fe772d8..0af6088 100644
--- a/arch/arm/mach-exynos/mach-smdk4x12.c
+++ b/arch/arm/mach-exynos/mach-smdk4x12.c
@@ -9,10 +9,12 @@
  * published by the Free Software Foundation.
 */
 
+#include <linux/delay.h>
 #include <linux/gpio.h>
 #include <linux/i2c.h>
 #include <linux/input.h>
 #include <linux/io.h>
+#include <linux/input/pixcir_ts.h>
 #include <linux/mfd/max8997.h>
 #include <linux/mmc/host.h>
 #include <linux/platform_device.h>
@@ -203,8 +205,34 @@ static struct i2c_board_info smdk4x12_i2c_devs3[] __initdata = {
 	/* nothing here yet */
 };
 
+static void smdk4x12_ts_gpio_setup(void)
+{
+	int gpio_reset = EXYNOS4_GPM3(4);
+
+	gpio_request_one(gpio_reset, GPIOF_OUT_INIT_LOW, "TOUCH RESET");
+	mdelay(20);
+	gpio_direction_output(gpio_reset, 1);
+	mdelay(30);
+	s3c_gpio_setpull(EXYNOS4_GPX2(6), S3C_GPIO_PULL_NONE);
+}
+
+static int smdk4x12_ts_get_value(void)
+{
+	return gpio_get_value(EXYNOS4_GPX2(6));
+}
+
+static struct pixcir_ts_platform_data smdk4x12_ts_data = {
+	.attb_read_val = smdk4x12_ts_get_value,
+	.x_max = 480,
+	.y_max = 800,
+};
+
 static struct i2c_board_info smdk4x12_i2c_devs7[] __initdata = {
-	/* nothing here yet */
+	{
+		I2C_BOARD_INFO("pixcir_ts", 0x5C),
+		.irq		= IRQ_EINT(22),
+		.platform_data	= &smdk4x12_ts_data,
+	}
 };
 
 static struct samsung_bl_gpio_info smdk4x12_bl_gpio_info = {
@@ -293,6 +321,8 @@ static void __init smdk4x12_machine_init(void)
 	s3c_sdhci2_set_platdata(&smdk4x12_hsmmc2_pdata);
 	s3c_sdhci3_set_platdata(&smdk4x12_hsmmc3_pdata);
 
+	smdk4x12_ts_gpio_setup();
+
 	platform_add_devices(smdk4x12_devices, ARRAY_SIZE(smdk4x12_devices));
 }
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] ARM: EXYNOS: Add touchscreen support to SMDK4X12
  2012-05-25  8:58 [PATCH 1/1] ARM: EXYNOS: Add touchscreen support to SMDK4X12 Sachin Kamat
@ 2012-07-02  5:34 ` Sachin Kamat
  2012-07-13 13:51 ` Kukjin Kim
  1 sibling, 0 replies; 4+ messages in thread
From: Sachin Kamat @ 2012-07-02  5:34 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: kgene.kim, sachin.kamat, patches

ping...

On 25/05/2012, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> Pixcir touchscreen device support is added to SMDK4X12 boards.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  arch/arm/mach-exynos/mach-smdk4x12.c |   32
> +++++++++++++++++++++++++++++++-
>  1 files changed, 31 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c
> b/arch/arm/mach-exynos/mach-smdk4x12.c
> index fe772d8..0af6088 100644
> --- a/arch/arm/mach-exynos/mach-smdk4x12.c
> +++ b/arch/arm/mach-exynos/mach-smdk4x12.c
> @@ -9,10 +9,12 @@
>   * published by the Free Software Foundation.
>  */
>
> +#include <linux/delay.h>
>  #include <linux/gpio.h>
>  #include <linux/i2c.h>
>  #include <linux/input.h>
>  #include <linux/io.h>
> +#include <linux/input/pixcir_ts.h>
>  #include <linux/mfd/max8997.h>
>  #include <linux/mmc/host.h>
>  #include <linux/platform_device.h>
> @@ -203,8 +205,34 @@ static struct i2c_board_info smdk4x12_i2c_devs3[]
> __initdata = {
>  	/* nothing here yet */
>  };
>
> +static void smdk4x12_ts_gpio_setup(void)
> +{
> +	int gpio_reset = EXYNOS4_GPM3(4);
> +
> +	gpio_request_one(gpio_reset, GPIOF_OUT_INIT_LOW, "TOUCH RESET");
> +	mdelay(20);
> +	gpio_direction_output(gpio_reset, 1);
> +	mdelay(30);
> +	s3c_gpio_setpull(EXYNOS4_GPX2(6), S3C_GPIO_PULL_NONE);
> +}
> +
> +static int smdk4x12_ts_get_value(void)
> +{
> +	return gpio_get_value(EXYNOS4_GPX2(6));
> +}
> +
> +static struct pixcir_ts_platform_data smdk4x12_ts_data = {
> +	.attb_read_val = smdk4x12_ts_get_value,
> +	.x_max = 480,
> +	.y_max = 800,
> +};
> +
>  static struct i2c_board_info smdk4x12_i2c_devs7[] __initdata = {
> -	/* nothing here yet */
> +	{
> +		I2C_BOARD_INFO("pixcir_ts", 0x5C),
> +		.irq		= IRQ_EINT(22),
> +		.platform_data	= &smdk4x12_ts_data,
> +	}
>  };
>
>  static struct samsung_bl_gpio_info smdk4x12_bl_gpio_info = {
> @@ -293,6 +321,8 @@ static void __init smdk4x12_machine_init(void)
>  	s3c_sdhci2_set_platdata(&smdk4x12_hsmmc2_pdata);
>  	s3c_sdhci3_set_platdata(&smdk4x12_hsmmc3_pdata);
>
> +	smdk4x12_ts_gpio_setup();
> +
>  	platform_add_devices(smdk4x12_devices, ARRAY_SIZE(smdk4x12_devices));
>  }
>
> --
> 1.7.4.1
>
>


-- 
With warm regards,
Sachin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH 1/1] ARM: EXYNOS: Add touchscreen support to SMDK4X12
  2012-05-25  8:58 [PATCH 1/1] ARM: EXYNOS: Add touchscreen support to SMDK4X12 Sachin Kamat
  2012-07-02  5:34 ` Sachin Kamat
@ 2012-07-13 13:51 ` Kukjin Kim
  2012-07-16  6:24   ` Sachin Kamat
  1 sibling, 1 reply; 4+ messages in thread
From: Kukjin Kim @ 2012-07-13 13:51 UTC (permalink / raw)
  To: 'Sachin Kamat', linux-samsung-soc; +Cc: patches

Sachin Kamat wrote:
> 
> Pixcir touchscreen device support is added to SMDK4X12 boards.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  arch/arm/mach-exynos/mach-smdk4x12.c |   32
> +++++++++++++++++++++++++++++++-
>  1 files changed, 31 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-
> exynos/mach-smdk4x12.c
> index fe772d8..0af6088 100644
> --- a/arch/arm/mach-exynos/mach-smdk4x12.c
> +++ b/arch/arm/mach-exynos/mach-smdk4x12.c
> @@ -9,10 +9,12 @@
>   * published by the Free Software Foundation.
>  */
> 
> +#include <linux/delay.h>
>  #include <linux/gpio.h>
>  #include <linux/i2c.h>
>  #include <linux/input.h>
>  #include <linux/io.h>
> +#include <linux/input/pixcir_ts.h>
>  #include <linux/mfd/max8997.h>
>  #include <linux/mmc/host.h>
>  #include <linux/platform_device.h>
> @@ -203,8 +205,34 @@ static struct i2c_board_info smdk4x12_i2c_devs3[]
> __initdata = {
>  	/* nothing here yet */
>  };
> 
> +static void smdk4x12_ts_gpio_setup(void)
> +{
> +	int gpio_reset = EXYNOS4_GPM3(4);
> +
> +	gpio_request_one(gpio_reset, GPIOF_OUT_INIT_LOW, "TOUCH RESET");
> +	mdelay(20);
> +	gpio_direction_output(gpio_reset, 1);

Do you want to set the gpio_reset value from 0 to 1 with 20m delays? Why?

> +	mdelay(30);
> +	s3c_gpio_setpull(EXYNOS4_GPX2(6), S3C_GPIO_PULL_NONE);

Hmm...don't we need gpio_reqeust()? and what's the gpx2(6)?

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] ARM: EXYNOS: Add touchscreen support to SMDK4X12
  2012-07-13 13:51 ` Kukjin Kim
@ 2012-07-16  6:24   ` Sachin Kamat
  0 siblings, 0 replies; 4+ messages in thread
From: Sachin Kamat @ 2012-07-16  6:24 UTC (permalink / raw)
  To: Kukjin Kim; +Cc: linux-samsung-soc, patches

On 13/07/2012, Kukjin Kim <kgene.kim@samsung.com> wrote:
> Sachin Kamat wrote:
>>
>> Pixcir touchscreen device support is added to SMDK4X12 boards.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> ---
>>  arch/arm/mach-exynos/mach-smdk4x12.c |   32
>> +++++++++++++++++++++++++++++++-
>>  1 files changed, 31 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-
>> exynos/mach-smdk4x12.c
>> index fe772d8..0af6088 100644
>> --- a/arch/arm/mach-exynos/mach-smdk4x12.c
>> +++ b/arch/arm/mach-exynos/mach-smdk4x12.c
>> @@ -9,10 +9,12 @@
>>   * published by the Free Software Foundation.
>>  */
>>
>> +#include <linux/delay.h>
>>  #include <linux/gpio.h>
>>  #include <linux/i2c.h>
>>  #include <linux/input.h>
>>  #include <linux/io.h>
>> +#include <linux/input/pixcir_ts.h>
>>  #include <linux/mfd/max8997.h>
>>  #include <linux/mmc/host.h>
>>  #include <linux/platform_device.h>
>> @@ -203,8 +205,34 @@ static struct i2c_board_info smdk4x12_i2c_devs3[]
>> __initdata = {
>>  	/* nothing here yet */
>>  };
>>
>> +static void smdk4x12_ts_gpio_setup(void)
>> +{
>> +	int gpio_reset = EXYNOS4_GPM3(4);
>> +
>> +	gpio_request_one(gpio_reset, GPIOF_OUT_INIT_LOW, "TOUCH RESET");
>> +	mdelay(20);
>> +	gpio_direction_output(gpio_reset, 1);
>
> Do you want to set the gpio_reset value from 0 to 1 with 20m delays? Why?
Yes right. I found lower value (2m) should be fine.

>
>> +	mdelay(30);
>> +	s3c_gpio_setpull(EXYNOS4_GPX2(6), S3C_GPIO_PULL_NONE);
>
> Hmm...don't we need gpio_reqeust()? and what's the gpx2(6)?

This gpio is not needed. I will remove this and send the updated patch.

>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
>


-- 
With warm regards,
Sachin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-16  6:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-25  8:58 [PATCH 1/1] ARM: EXYNOS: Add touchscreen support to SMDK4X12 Sachin Kamat
2012-07-02  5:34 ` Sachin Kamat
2012-07-13 13:51 ` Kukjin Kim
2012-07-16  6:24   ` Sachin Kamat

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.