Skip to contentSkip to conversation

eGalax touchscreen regression

PATCH In review Artem Bityutskiy 3 participants 11 messages Apr 23, 2013 – Apr 26, 2013

Subsystems (2)
lore
Share & tools
lore

Artem Bityutskiy

author Reviewed-by Shawn Guo
#0 lore raw

Hi Dmitry,

in the below commit

commit ae495e844a77344fdaedbb2ad97d925d096e9f0d

Author: Hui Wang <[email protected]>
Date:   Thu Oct 25 00:38:01 2012 -0700

Input: egalax_ts - get gpio from devicetree

The irq_to_gpio() is old, most platforms use GENERIC_GPIO framework and don't support this API anymore.

The i.MX6q sabrelite platform equips an egalax touchscreen controller, and this platform already transfered to GENERIC_GPIO framework, to support this driver, we use a more generic way to get gpio.

Add a return value checking for waking up the controller in the probe function, this guarantee only a workable device can pass init.

[[email protected]: Make driver depend on CONFIG_OF as it is
now required.]

Acked-by Zhang Jiejing <[email protected]>

the eGalax driver now requires OF. For us this is a regression because we do not have OF: https://bugs.tizen.org/jira/browse/TIVI-740

Signature · 2 lines
Best Regards,
Artem Bityutskiy
#1 lore raw

PATCH 1/1 input: egalax_ts: remove bogus OF dependency

There are platforms using this driver which do not have OF. However, commit ae495e844a77344fdaedbb2ad97d925d096e9f0d added a Kconfig dependency on OF and broke OF-less setups.

---
 drivers/input/touchscreen/Kconfig     |    2 +-
 drivers/input/touchscreen/egalax_ts.c |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
drivers/input/touchscreen/Kconfig +1 -1
index 515cfe7..d53b0d6 100644
@@ -227,7 +227,7 @@ config TOUCHSCREEN_EETI
 
 config TOUCHSCREEN_EGALAX
 	tristate "EETI eGalax multi-touch panel support"
-	depends on I2C && OF
+	depends on I2C
 	help
 	  Say Y here to enable support for I2C connected EETI
 	  eGalax multi-touch panels.
drivers/input/touchscreen/egalax_ts.c +2 -0
index 17c9097..b984cfc 100644
@@ -287,10 +287,12 @@ static int egalax_ts_resume(struct device *dev)
 
 static SIMPLE_DEV_PM_OPS(egalax_ts_pm_ops, egalax_ts_suspend, egalax_ts_resume);
 
+#ifdef CONFIG_OF
 static struct of_device_id egalax_ts_dt_ids[] = {
 	{ .compatible = "eeti,egalax_ts" },
 	{ /* sentinel */ }
 };
+#endif
 
 static struct i2c_driver egalax_ts_driver = {
 	.driver = {
Signature · 1 line
1.7.7
maintainer
#2 lore raw

Re: [PATCH] input: egalax_ts: remove bogus OF dependency

Quoted 16 lines · Artem Bityutskiy

There are platforms using this driver which do not have OF. However, commit ae495e844a77344fdaedbb2ad97d925d096e9f0d added a Kconfig dependency on OF and broke OF-less setups.

---
 drivers/input/touchscreen/Kconfig     |    2 +-
 drivers/input/touchscreen/egalax_ts.c |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
drivers/input/touchscreen/Kconfig +0 -0
index 515cfe7..d53b0d6 100644

drivers/input/touchscreen/Kconfig config TOUCHSCREEN_EETI · line 230

Quoted 5 lines
drivers/input/touchscreen/Kconfig +1 -1
@@ -227,7 +227,7 @@ config TOUCHSCREEN_EETI
 
 config TOUCHSCREEN_EGALAX
 	tristate "EETI eGalax multi-touch panel support"
-	depends on I2C && OF
+	depends on I2C

No, because egalax_wake_up_device() needs OF data and with !CONFIG_OF you'll end up using stubs, the wakeup will fail and the touchscreen will fail probe.

It wasn't tested, was it?

Thanks.

Quoted 23 lines
drivers/input/touchscreen/Kconfig +0 -0
 	help
 	  Say Y here to enable support for I2C connected EETI
 	  eGalax multi-touch panels.
drivers/input/touchscreen/egalax_ts.c +2 -0
index 17c9097..b984cfc 100644
@@ -287,10 +287,12 @@ static int egalax_ts_resume(struct device *dev)
 
 static SIMPLE_DEV_PM_OPS(egalax_ts_pm_ops, egalax_ts_suspend, egalax_ts_resume);
 
+#ifdef CONFIG_OF
 static struct of_device_id egalax_ts_dt_ids[] = {
 	{ .compatible = "eeti,egalax_ts" },
 	{ /* sentinel */ }
 };
+#endif
 
 static struct i2c_driver egalax_ts_driver = {
 	.driver = {
Signature · 1 line
1.7.7
Signature · 1 line
Dmitry
#3 lore raw

Re: [PATCH] input: egalax_ts: remove bogus OF dependency

Quoted 27 lines · Dmitry Torokhov
Quoted 16 lines · Artem Bityutskiy

There are platforms using this driver which do not have OF. However, commit ae495e844a77344fdaedbb2ad97d925d096e9f0d added a Kconfig dependency on OF and broke OF-less setups.

---
 drivers/input/touchscreen/Kconfig     |    2 +-
 drivers/input/touchscreen/egalax_ts.c |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
drivers/input/touchscreen/Kconfig +0 -0
index 515cfe7..d53b0d6 100644

drivers/input/touchscreen/Kconfig config TOUCHSCREEN_EETI · line 230

Quoted 5 lines
drivers/input/touchscreen/Kconfig +1 -1
@@ -227,7 +227,7 @@ config TOUCHSCREEN_EETI
 
 config TOUCHSCREEN_EGALAX
 	tristate "EETI eGalax multi-touch panel support"
-	depends on I2C && OF
+	depends on I2C

No, because egalax_wake_up_device() needs OF data and with !CONFIG_OF you'll end up using stubs, the wakeup will fail and the touchscreen will fail probe.

Quoted 1 line

It wasn't tested, was it?

Not tested. But Ulf (the reporter of the issue) confirms it does not solve the issue.

Signature · 2 lines
Best Regards,
Artem Bityutskiy
maintainer
#4 lore raw
In reply to Artem Bityutskiy

Hi Artem,

Quoted 23 lines · Artem Bityutskiy

Hi Dmitry,

in the below commit

commit ae495e844a77344fdaedbb2ad97d925d096e9f0d

Author: Hui Wang <[email protected]>
Date:   Thu Oct 25 00:38:01 2012 -0700

Input: egalax_ts - get gpio from devicetree

The irq_to_gpio() is old, most platforms use GENERIC_GPIO framework and don't support this API anymore.

The i.MX6q sabrelite platform equips an egalax touchscreen controller, and this platform already transfered to GENERIC_GPIO framework, to support this driver, we use a more generic way to get gpio.

Add a return value checking for waking up the controller in the probe function, this guarantee only a workable device can pass init.

[[email protected]: Make driver depend on CONFIG_OF as it is
now required.]

Quoted 7 lines

Acked-by Zhang Jiejing <[email protected]>

the eGalax driver now requires OF. For us this is a regression because we do not have OF: https://bugs.tizen.org/jira/browse/TIVI-740

I see. In this case we need to come up with a platform data to pass wakeup gpio in case platform does not support OF. irq_to_gpio() is not supported on many platforms, causing compilation errors.

Is the platform that you are trying to use the touchscreen upstream?

Thanks.

Signature · 1 line
Dmitry
#5 lore raw
Quoted 8 lines · Dmitry Torokhov
Quoted 2 lines

the eGalax driver now requires OF. For us this is a regression because we do not have OF: https://bugs.tizen.org/jira/browse/TIVI-740

I see. In this case we need to come up with a platform data to pass wakeup gpio in case platform does not support OF. irq_to_gpio() is not supported on many platforms, causing compilation errors.

Is the platform that you are trying to use the touchscreen upstream?

Unfortunately I do not really know about it, but once I learn, I'll come back. Thanks!

Signature · 2 lines
Best Regards,
Artem Bityutskiy
#6 lore raw
In reply to Dmitry Torokhov
Quoted 8 lines · Dmitry Torokhov
Quoted 2 lines

the eGalax driver now requires OF. For us this is a regression because we do not have OF: https://bugs.tizen.org/jira/browse/TIVI-740

I see. In this case we need to come up with a platform data to pass wakeup gpio in case platform does not support OF. irq_to_gpio() is not supported on many platforms, causing compilation errors.

Is the platform that you are trying to use the touchscreen upstream?

OK, so this is about just a monitor with a touchscreen (Giantec high-res capacitive 11.6” LCD monitor). The touchscreen is connected to a commodity hardware via USB.

So yes, the platform _is_ upstream :-) Namely, we use just a SandyBridge PC.

Signature · 2 lines
Best Regards,
Artem Bityutskiy
#7 lore raw
Quoted 8 lines · On Wednesday 24 April 2013 12:03:13 Artem Bityutskiy wrote:
Quoted 7 lines · Dmitry Torokhov
Quoted 2 lines

the eGalax driver now requires OF. For us this is a regression because we do not have OF: https://bugs.tizen.org/jira/browse/TIVI-740

I see. In this case we need to come up with a platform data to pass wakeup gpio in case platform does not support OF. irq_to_gpio() is not supported on many platforms, causing compilation errors.

Quoted 8 lines
Quoted 1 line

Is the platform that you are trying to use the touchscreen upstream?

OK, so this is about just a monitor with a touchscreen (Giantec high-res capacitive 11.6” LCD monitor). The touchscreen is connected to a commodity hardware via USB.

So yes, the platform _is_ upstream Namely, we use just a SandyBridge PC.

So you use a usb-to-i2c interface?

You have to figure out how the wakeup line is connected to the eGalax device and provide an alternative implementation for egalax_wake_up_device that can be used in your case then.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw
Quoted 11 lines · Arnd Bergmann
Quoted 10 lines · On Wednesday 24 April 2013 12:03:13 Artem Bityutskiy wrote:
Quoted 8 lines · Dmitry Torokhov
Quoted 2 lines

the eGalax driver now requires OF. For us this is a regression because we do not have OF: https://bugs.tizen.org/jira/browse/TIVI-740

I see. In this case we need to come up with a platform data to pass wakeup gpio in case platform does not support OF. irq_to_gpio() is not supported on many platforms, causing compilation errors.

Is the platform that you are trying to use the touchscreen upstream?

Quoted 8 lines
Quoted 6 lines

OK, so this is about just a monitor with a touchscreen (Giantec high-res capacitive 11.6” LCD monitor). The touchscreen is connected to a commodity hardware via USB.

So yes, the platform _is_ upstream Namely, we use just a SandyBridge PC.

So you use a usb-to-i2c interface?

I do not think so. The problem is that I do not have the HW, so I was making guesses, and it looks like this driver has nothing to do with the regression we've got. Sorry for the noise. We'll investigate this more carefully internally.

Signature · 7 lines
Best Regards,
Artem Bityutskiy

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#9 lore raw
Quoted 19 lines · Artem Bityutskiy
Quoted 18 lines · Arnd Bergmann
Quoted 16 lines · On Wednesday 24 April 2013 12:03:13 Artem Bityutskiy wrote:
Quoted 8 lines · Dmitry Torokhov
Quoted 2 lines

the eGalax driver now requires OF. For us this is a regression because we do not have OF: https://bugs.tizen.org/jira/browse/TIVI-740

I see. In this case we need to come up with a platform data to pass wakeup gpio in case platform does not support OF. irq_to_gpio() is not supported on many platforms, causing compilation errors.

Is the platform that you are trying to use the touchscreen upstream?

OK, so this is about just a monitor with a touchscreen (Giantec high-res capacitive 11.6” LCD monitor). The touchscreen is connected to a commodity hardware via USB.

So yes, the platform _is_ upstream Namely, we use just a SandyBridge PC.

Quoted 6 lines
Quoted 1 line

So you use a usb-to-i2c interface?

I do not think so. The problem is that I do not have the HW, so I was making guesses, and it looks like this driver has nothing to do with the regression we've got. Sorry for the noise. We'll investigate this more carefully internally.

OK, so assuming you simply using USB version of eGalax device the only recent change (3.6-rc7) was:

commit 037a833ed05a86d01ea27a2c32043b86c549be1b

Author: Forest Bond <[email protected]>
Date:   Tue Sep 4 20:27:37 2012 -0700

Input: usbtouchscreen - initialize eGalax devices

Certain eGalax devices expose an interface with class HID and protocol None. Some work with usbhid and some work with usbtouchscreen, but there is no easy way to differentiate. Sending an eGalax diagnostic packet seems to kick them all into using the right protocol for usbtouchscreen, so we can continue to bind them all there (as opposed to handing some off to usbhid).

This fixes a regression for devices that were claimed by (and worked with) usbhid prior to commit 139ebe8dc80dd74cb2ac9f5603d18fbf5cff049f ("Input: usbtouchscreen - fix eGalax HID ignoring"), which made usbtouchscreen claim them instead. With this patch they will still be claimed by usbtouchscreen, but they will actually report events usbtouchscreen can understand. Note that these devices will be limited to the usbtouchscreen feature set so e.g. dual touch features are not supported.

I have the distinct pleasure of needing to support devices of both types and have tested accordingly.

Thanks.

Signature · 5 lines
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#10 lore raw
Quoted 27 lines · Dmitry Torokhov
Quoted 19 lines · Artem Bityutskiy
Quoted 18 lines · Arnd Bergmann
Quoted 16 lines · On Wednesday 24 April 2013 12:03:13 Artem Bityutskiy wrote:
Quoted 8 lines · Dmitry Torokhov
Quoted 2 lines

the eGalax driver now requires OF. For us this is a regression because we do not have OF: https://bugs.tizen.org/jira/browse/TIVI-740

I see. In this case we need to come up with a platform data to pass wakeup gpio in case platform does not support OF. irq_to_gpio() is not supported on many platforms, causing compilation errors.

Is the platform that you are trying to use the touchscreen upstream?

OK, so this is about just a monitor with a touchscreen (Giantec high-res capacitive 11.6” LCD monitor). The touchscreen is connected to a commodity hardware via USB.

So yes, the platform _is_ upstream Namely, we use just a SandyBridge PC.

Quoted 6 lines
Quoted 1 line

So you use a usb-to-i2c interface?

I do not think so. The problem is that I do not have the HW, so I was making guesses, and it looks like this driver has nothing to do with the regression we've got. Sorry for the noise. We'll investigate this more carefully internally.

Quoted 6 lines

OK, so assuming you simply using USB version of eGalax device the only recent change (3.6-rc7) was:

commit 037a833ed05a86d01ea27a2c32043b86c549be1b

Author: Forest Bond <[email protected]>
Date:   Tue Sep 4 20:27:37 2012 -0700

Thanks for the input Dmitry, appreciated. We'll be looking more carefully at this next week.

Signature · 7 lines
Best Regards,
Artem Bityutskiy

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html