Re: [PATCH v3] input: Add support for ChipOne icn8318 based touchscreens

From
Hans de Goede <hidden>
Date
2015-03-22 11:00:55
Also in
linux-arm-kernel, linux-input
Reply to
Dmitry Torokhov, 2015-03-22
Hi,

On 22-03-15 05:03, Dmitry Torokhov wrote:
Hi Hans,

On Tue, Mar 10, 2015 at 06:05:33PM +0100, Hans de Goede wrote:
quoted
+	error = devm_request_threaded_irq(dev, client->irq, NULL, icn8318_irq,
+					  IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
Shouldn't we let DT data tell us what trigger to use? I.e. just leave
IRQF_ONESHOT here?
That is an interesting question, that new data is available is signalled by
the irq pin of the chip going low is a property of the chip, not the board
layout, so I believe it is best to leave this as is.

Also note that if we want to get this from devicetree, that simply leaving out the
flag is not enough, we must specifically get the data from devicetree and pass
it into request_irq AFAICT. So the above would change to:

	irqflags = irqd_get_trigger_type(irq_get_irq_data(client->irq)) | IRQF_ONESHOT,
	error = devm_request_threaded_irq(dev, client->irq, NULL, icn8318_irq, irqflags,

Regards,

Hans
Thread (4 messages) 4 messages, 3 authors, last reply 2015-03-24
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