RE: [PATCH v2] input: touchscreen: add OF match table for ads7846

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thomas,
Thanks.

> -----Original Message-----
> From: Thomas Chou [mailto:thomas@xxxxxxxxxxxxx]
> Sent: 2011年6月14日 14:15
> To: Baohua Song
> Cc: dmitry.torokhov@xxxxxxxxx; linux-input@xxxxxxxxxxxxxxx; DL-SHA-APBU
> Linux; Junyi Zhang; Grant Likely
> Subject: Re: [PATCH v2] input: touchscreen: add OF match table for ads7846
> 
> On 06/14/2011 09:45 AM, Barry Song wrote:
> > The current ads7846 has no OF match table. The method used is by applying a
> heuristic (of_modalias_node) which tries to name the device in a way that will
> match an existing device driver.
> > This patch adds explicit OF match table for ads7846, then the normal device
> tree match behaviour will always work.
> > It has been tested on PRIMA2 EVB board of CSR with a SPI's child node like
> the below:
> > ts@0 {
> >          compatible = "ti,ads7845";
> >          reg =<0x0>;
> >          spi-max-frequency =<31250>;
> >          interrupts =<90>;
> > };
> >
> 
> Hi Barry,
> 
> Thank you very much for your help. 

You are welcome :-)

>Could we add an option for gpio
> pendown, like this?
> 
> - gpios : should specify GPIO used for pendown.
> 
> If interrupt node is not present in this node, gpio_to_irq of the pen
> down GPIO will be used.

I disagree... An optional gpio node doesn't make sense here. The result of gpio_to_irq is still an interrupt, then we can place the result in interrupt node.
And the ads7846 driver required an interrupt node but not a gpio node since we don't find any of_get_gpio() in this driver. 
BTW, it even doesn’t make sense to call function gpio_to_irq in a driver like ads7846. on the contrary, drivers/input/keyboard/gpio_keys.c is really an good user of gpio_to_irq.

> 
> Best regards,
> Thomas

-barry


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
?韬{.n?????%??檩??w?{.n???{炳)楹哜?^n?■???h?璀?{?夸z罐?+€?zf"?????i?????_璁?:+v??撸?



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux