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

From
Baohua Song <hidden>
Date
2011-06-14 06:39:15
Reply to
Thomas Chou, 2011-06-14
Hi Thomas,
Thanks.
-----Original Message-----
From: Thomas Chou [mailto:<redacted>]
Sent: 2011年6月14日 14:15
To: Baohua Song
Cc: dmitry.torokhov@gmail.com; <redacted>; 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:
quoted
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.
quoted
This patch adds explicit OF match table for ads7846, then the normal device
tree match behaviour will always work.
quoted
It has been tested on PRIMA2 EVB board of CSR with a SPI's child node like
the below:
quoted
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
Thread (5 messages) 5 messages, 2 authors, last reply 2011-06-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help