Thread (14 messages) flat view 14 messages, 4 authors, 2011-12-14

Re: [PATCH] edt_ts: EDT Touchscreen driver

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2011-11-14 21:32:50

On Tue, Nov 15, 2011 at 01:07:57AM +0400, Ilya Yanok wrote:
Hi Dmitry,

On 14.11.2011 21:28, Dmitry Torokhov wrote:
quoted
quoted
+	irq = gpio_to_irq(pdata->irq_gpio);
+	if (irq < 0) {
+		dev_err(&client->dev, "can't get IRQ for GPIO\n");
+		error = -EINVAL;
+		goto err0;
+	}
Why can't we use client->irq?
Well, my idea was to avoid duplication (passing both GPIO and IRQ
numbers) and I can't pass only client->irq as we need GPIO number also
and irq_to_gpio is not guaranteed to work with arbitrary IRQ number.
Do you really need to read gpio state in IRQ? Can't you simply rely on
'event' do decide whether to emit input events?

Also:

- please do not report fake pressure events since the device does
not seem to support true pressure reading (tslib has been fixed ages
ago).

- consider using i2c_transfer() instead of sequential
  master_send/master_receive.

- What stops the contoller from generating more interrupts/schedule more
  work/re-fire timer after edt_ts_close() is completed? You don't
actually communicate to the controller that ti should shut off.

Thanks.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help