[Meego-kernel] linux-2.6.37-ektf-fix-ESD_side_effect.patch

劉嘉駿 scott.liu at emc.com.tw
Tue Jul 26 11:12:05 UTC 2011


Hi,
	This patch is based on v3.0.7.
	Thanks.


Subject: linux-2.6.37-ektf-fix-ESD_side_effect_v2.patch

The side effect of ESD has fixed.

1. mutex function adjusting.

Signed-off-by: Mike Hsu <mike_t_hsu at wistron.com>
Signed-off-by: Scott Liu <scott.liu at emc.com.tw>

---

ektf2136_spi.c |   12 ++++++------

1 file changed, 6 insertions(+), 6 deletions(-)

--- linux-2.6.37/drivers/input/touchscreen/ektf2136_spi.old.c 2011-07-14 22:
30:10.560603900 -0700

+++ linux-2.6.37/drivers/input/touchscreen/ektf2136_spi.c     2011-07-26 03:
40:52.193369200 -0700

@@ -30,11 +30,11 @@

 #include <linux/pm_runtime.h>

 

 #define DRV_NAME    "ektf2136_spi"

-#define DRIVER_VERSION  "v3.0.7"

+#define DRIVER_VERSION "v3.0.8"

 

 #define DRV_MA_VER 3

 #define DRV_MI_VER 0

-#define DRV_SUB_MI_VER 7

+#define DRV_SUB_MI_VER 8

 

 static const char ELAN_TS_NAME[]    = "ektf2136_spi";

 

@@ -1049,7 +1049,7 @@

       static const u8 wait_sync_cmd[4] = { 0xAA, 0xAA, 0xAA, 0xAA };

       int cmd_sync_timeout = 0, rc = 0, v = 0;

       struct elan_data *ed = spi_get_drvdata(spi);

-       u8 temp[IDX_MAX_PACKET_SIZE];

+      u8 temp[IDX_MAX_PACKET_SIZE] = {[0 ... 34] = 0xAA};

 

       if (!(ed->protocol & PRO_SPI_WRT_CMD_SYNC))

               return rc;

@@ -1065,7 +1065,7 @@

 

       /* INT pin already is low. Not waiting for command.*/

       if (v == 0) {

-               elan_spi_read_data(spi, temp, sizeof(temp),

+              elan_spi_write_data(spi, temp, sizeof(temp),

                                  "clear report");

               while (v == 0) {

                       v = gpio_get_value(ed->intr_gpio);

@@ -1755,12 +1755,12 @@

       /* Protect against parallel spi activity. Right now this isn't

          strictly needed but if we add config features it will become

          relevant */

-       mutex_lock(&ed->mutex);

+      mutex_lock(&ed->sysfs_mutex);

       rc = elan_spi_read_data(spi, buf, ed->rx_size,

               "elan_touch_recv_data");

       if (rc != 0)

               dev_err(&spi->dev, "recv_data: wrong data %d\n", rc);

-       mutex_unlock(&ed->mutex);

+      mutex_unlock(&ed->sysfs_mutex);

       return rc;

 }

---

---
Scott Liu / 劉嘉駿
Digital Circuit Design Dept. 5
Product Development Division
Tel: 886-6-2819970 EXT.8903
FAX: 886-6-2819971
-----Original Message-----
From: Mike_T_Hsu at wistron.com [mailto:Mike_T_Hsu at wistron.com] 
Sent: Tuesday, July 26, 2011 8:41 AM
To: kristen at linux.intel.com; scott.liu at emc.com.tw
Cc: alan at linux.intel.com; arjan at linux.intel.com; jh.tsai at emc.com.tw
Subject: RE: linux-2.6.37-ektf-fix-ESD_side_effect.patch


Hi Kristen,

For bug number, you can refer the URL below:
https://bugzilla.otcshare.org/show_bug.cgi?id=11414

Thanks.

Best regards,
 
Mike Hsu 徐宗壕
Linux Software, Mobile BG, Wistron
Email: Mike_T_Hsu at wistron.com
Tel: 886-2-66123829

-----Original Message-----
From: Kristen Carlson Accardi [mailto:kristen at linux.intel.com] 
Sent: Tuesday, July 26, 2011 1:18 AM
To: 劉嘉駿
Cc: alan at linux.intel.com; arjan at linux.intel.com; Mike T Hsu/WHQ/Wistron; '蔡
仁豪'
Subject: Re: linux-2.6.37-ektf-fix-ESD_side_effect.patch

On Mon, 25 Jul 2011 17:29:33 +0800
劉嘉駿 <scott.liu at emc.com.tw> wrote:

> 
> The side effect of ESD has fixed.
>

Hi,
What bugzilla number is this patch addressing?

Thanks,
Kristen

 
> Signed-off-by: Mike Hsu <mike_t_hsu at wistron.com>
> Signed-off-by: Scott Liu <scott.liu at emc.com.tw>
> 
> ---	
> ektf2136_spi.c |    8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
> 
> --- linux-2.6.37/drivers/input/touchscreen/ektf2136_spi.old.c	2011-07-14
> 22:30:10.560603900 -0700
> +++ linux-2.6.37/drivers/input/touchscreen/ektf2136_spi.c	2011-07-24
> 20:42:11.346977016 -0700
> @@ -30,11 +30,11 @@
>  #include <linux/pm_runtime.h>
>  
>  #define DRV_NAME	"ektf2136_spi"
> -#define DRIVER_VERSION	"v3.0.7"
> +#define DRIVER_VERSION	"v3.0.8"
>  
>  #define DRV_MA_VER 3
>  #define DRV_MI_VER 0
> -#define DRV_SUB_MI_VER 7
> +#define DRV_SUB_MI_VER 8
>  
>  static const char ELAN_TS_NAME[]	= "ektf2136_spi";
>  
> @@ -1049,7 +1049,7 @@
>  	static const u8 wait_sync_cmd[4] = { 0xAA, 0xAA, 0xAA, 0xAA };
>  	int cmd_sync_timeout = 0, rc = 0, v = 0;
>  	struct elan_data *ed = spi_get_drvdata(spi);
> -	u8 temp[IDX_MAX_PACKET_SIZE];
> +	u8 temp[IDX_MAX_PACKET_SIZE] = {0xAA};
>  
>  	if (!(ed->protocol & PRO_SPI_WRT_CMD_SYNC))
>  		return rc;
> @@ -1065,7 +1065,7 @@
>  
>  	/* INT pin already is low. Not waiting for command.*/
>  	if (v == 0) {
> -		elan_spi_read_data(spi, temp, sizeof(temp),
> +		elan_spi_write_data(spi, temp, sizeof(temp),
>  		                   "clear report");
>  		while (v == 0) {
>  			v = gpio_get_value(ed->intr_gpio);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-2.6.37-ektf-fix-ESD_side_effect_v2.patch
Type: application/octet-stream
Size: 1878 bytes
Desc: not available
URL: <http://lists.meego.com/pipermail/meego-kernel/attachments/20110726/4e87c0ee/attachment-0001.obj>


More information about the MeeGo-kernel mailing list