Hi Arjan,

 

uhhhh

NO!

disable_irq() is very very evil.

you had a somewhat valid reason for it in your firmware recovery path...

but not here.

 

A: Because ektf2136_spi is not shared irq and this disable_irq() is for to
avoid disturbed regular ISR routine.

Ektf2136 supports user to get/set palm-rejection parameters runtime. Once
user is going to get palm-rejection parameter and then

we are simply disable_irq() for received data from touch device by
elan_touch_get_pr_cmd(), after parameter returned, we are enable_irq() for 

normal process.

 

 

also, this function is missing the get/put for the runtime PM, so you're

talking to your chip while it is in power management mode... is that valid?

 

A: Power-mangement control was control in open() / close() function, so
there are no problem during get/put command running.

 

 

Thanks!

 

---

Scott Liu / 劉嘉駿

Digital Circuit Design Dept. 5

Product Development Division

Tel: 886-6-2819970 EXT.8903

FAX: 886-6-2819971

 

-----Original Message-----
From: Arjan van de Ven [mailto:ar...@linux.intel.com] 
Sent: Wednesday, June 22, 2011 9:47 PM
To: 劉嘉駿
Cc: meego-kernel@lists.meego.com; meego-ker...@meego.com;
a...@linux.intel.com; stanley.z...@emc.com.tw; mike_t_...@wistron.com
Subject: Re: [Meego-kernel] [PATCH] ektf2136_spi : Add palm-rejection
function

 

On 6/21/2011 11:23 PM, 劉嘉駿 wrote:

 

> +static int elan_touch_get_pr_cmd(struct spi_device *spi, const u8 addr_h,

> +                                 const u8 addr_l, const char *what, int

> *sr_param)

> +{

> +   struct elan_data *ed = spi_get_drvdata(spi);

> +   u8 get_palm_rej_param[6]  = {0x96, 0x00, 0x00, 0x00, 0x00, 0xF1};

> +   u8 buf_recv[6];

> +   int rc;

> +

> +   /* Command not support in IAP recovery mode */

> +   if (ed->protocol & PRO_UPDATE_FW_MODE)

> +           return 0;

> +

> +   get_palm_rej_param[1] = addr_h;

> +   get_palm_rej_param[2] = addr_l;

> +

> +   disable_irq(ed->spi->irq);

 

 

uhhhh

NO!

disable_irq() is very very evil.

you had a somewhat valid reason for it in your firmware recovery path...

but not here.

 

 

also, this function is missing the get/put for the runtime PM, so you're

talking to your chip while it is in power management mode... is that valid?

 

 

_______________________________________________
MeeGo-kernel mailing list
MeeGo-kernel@lists.meego.com
http://lists.meego.com/listinfo/meego-kernel

Reply via email to