diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 3 | ||||
-rw-r--r-- | drivers/input/touchscreen/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/egalax_ts.c | 23 |
3 files changed, 25 insertions, 3 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index aa6010131179..0a67031ffc13 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -1518,6 +1518,9 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
1518 | 1518 | ||
1519 | input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); | 1519 | input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); |
1520 | input_set_abs_params(input_dev, ABS_THROTTLE, 0, 71, 0, 0); | 1520 | input_set_abs_params(input_dev, ABS_THROTTLE, 0, 71, 0, 0); |
1521 | |||
1522 | __set_bit(INPUT_PROP_DIRECT, input_dev->propbit); | ||
1523 | |||
1521 | wacom_setup_cintiq(wacom_wac); | 1524 | wacom_setup_cintiq(wacom_wac); |
1522 | break; | 1525 | break; |
1523 | 1526 | ||
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 1ba232cbc09d..f7668b24c378 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig | |||
@@ -239,7 +239,7 @@ config TOUCHSCREEN_EETI | |||
239 | 239 | ||
240 | config TOUCHSCREEN_EGALAX | 240 | config TOUCHSCREEN_EGALAX |
241 | tristate "EETI eGalax multi-touch panel support" | 241 | tristate "EETI eGalax multi-touch panel support" |
242 | depends on I2C | 242 | depends on I2C && OF |
243 | help | 243 | help |
244 | Say Y here to enable support for I2C connected EETI | 244 | Say Y here to enable support for I2C connected EETI |
245 | eGalax multi-touch panels. | 245 | eGalax multi-touch panels. |
diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c index c1e3460f1195..13fa62fdfb0b 100644 --- a/drivers/input/touchscreen/egalax_ts.c +++ b/drivers/input/touchscreen/egalax_ts.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
29 | #include <linux/bitops.h> | 29 | #include <linux/bitops.h> |
30 | #include <linux/input/mt.h> | 30 | #include <linux/input/mt.h> |
31 | #include <linux/of_gpio.h> | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | * Mouse Mode: some panel may configure the controller to mouse mode, | 34 | * Mouse Mode: some panel may configure the controller to mouse mode, |
@@ -122,9 +123,17 @@ static irqreturn_t egalax_ts_interrupt(int irq, void *dev_id) | |||
122 | /* wake up controller by an falling edge of interrupt gpio. */ | 123 | /* wake up controller by an falling edge of interrupt gpio. */ |
123 | static int egalax_wake_up_device(struct i2c_client *client) | 124 | static int egalax_wake_up_device(struct i2c_client *client) |
124 | { | 125 | { |
125 | int gpio = irq_to_gpio(client->irq); | 126 | struct device_node *np = client->dev.of_node; |
127 | int gpio; | ||
126 | int ret; | 128 | int ret; |
127 | 129 | ||
130 | if (!np) | ||
131 | return -ENODEV; | ||
132 | |||
133 | gpio = of_get_named_gpio(np, "wakeup-gpios", 0); | ||
134 | if (!gpio_is_valid(gpio)) | ||
135 | return -ENODEV; | ||
136 | |||
128 | ret = gpio_request(gpio, "egalax_irq"); | 137 | ret = gpio_request(gpio, "egalax_irq"); |
129 | if (ret < 0) { | 138 | if (ret < 0) { |
130 | dev_err(&client->dev, | 139 | dev_err(&client->dev, |
@@ -181,7 +190,11 @@ static int __devinit egalax_ts_probe(struct i2c_client *client, | |||
181 | ts->input_dev = input_dev; | 190 | ts->input_dev = input_dev; |
182 | 191 | ||
183 | /* controller may be in sleep, wake it up. */ | 192 | /* controller may be in sleep, wake it up. */ |
184 | egalax_wake_up_device(client); | 193 | error = egalax_wake_up_device(client); |
194 | if (error) { | ||
195 | dev_err(&client->dev, "Failed to wake up the controller\n"); | ||
196 | goto err_free_dev; | ||
197 | } | ||
185 | 198 | ||
186 | ret = egalax_firmware_version(client); | 199 | ret = egalax_firmware_version(client); |
187 | if (ret < 0) { | 200 | if (ret < 0) { |
@@ -274,11 +287,17 @@ static int egalax_ts_resume(struct device *dev) | |||
274 | 287 | ||
275 | static SIMPLE_DEV_PM_OPS(egalax_ts_pm_ops, egalax_ts_suspend, egalax_ts_resume); | 288 | static SIMPLE_DEV_PM_OPS(egalax_ts_pm_ops, egalax_ts_suspend, egalax_ts_resume); |
276 | 289 | ||
290 | static struct of_device_id egalax_ts_dt_ids[] = { | ||
291 | { .compatible = "eeti,egalax_ts" }, | ||
292 | { /* sentinel */ } | ||
293 | }; | ||
294 | |||
277 | static struct i2c_driver egalax_ts_driver = { | 295 | static struct i2c_driver egalax_ts_driver = { |
278 | .driver = { | 296 | .driver = { |
279 | .name = "egalax_ts", | 297 | .name = "egalax_ts", |
280 | .owner = THIS_MODULE, | 298 | .owner = THIS_MODULE, |
281 | .pm = &egalax_ts_pm_ops, | 299 | .pm = &egalax_ts_pm_ops, |
300 | .of_match_table = of_match_ptr(egalax_ts_dt_ids), | ||
282 | }, | 301 | }, |
283 | .id_table = egalax_ts_id, | 302 | .id_table = egalax_ts_id, |
284 | .probe = egalax_ts_probe, | 303 | .probe = egalax_ts_probe, |