@@ -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.
@@ -128,7 +128,11 @@ static int egalax_wake_up_device(struct i2c_client *client)
int ret;
if (!np)
- return -ENODEV;
+ /*
+ * Do not try to wake up device on non-DT compatible platforms.
+ * For example this is the case for USB connected touchscreen.
+ */
+ return 0;
gpio = of_get_named_gpio(np, "wakeup-gpios", 0);
if (!gpio_is_valid(gpio))
@@ -287,10 +291,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 = {