diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-24 13:34:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-24 13:34:29 -0400 |
commit | 2c01e7bc46f10e9190818437e564f7e0db875ae9 (patch) | |
tree | 8b06c85d69754f7df27f7fb42520f6e2ceaea907 /drivers/input/misc | |
parent | ab11ca34eea8fda7a1a9302d86f6ef6108ffd68f (diff) | |
parent | e644dae645e167d154c0526358940986682a72b0 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer updates from Dmitry Torokhov:
- a bunch of new drivers (DA9052/53 touchscreenn controller, Synaptics
Navpoint, LM8333 keypads, Wacom I2C touhscreen);
- updates to existing touchpad drivers (ALPS, Sntelic);
- Wacom driver now supports Intuos5;
- device-tree bindings in numerous drivers;
- other cleanups and fixes.
Fix annoying conflict in drivers/input/tablet/wacom_wac.c that I think
implies that the input layer device naming is broken, but let's see. I
brough it up with Dmitry.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits)
Input: matrix-keymap - fix building keymaps
Input: spear-keyboard - document DT bindings
Input: spear-keyboard - add device tree bindings
Input: matrix-keymap - wire up device tree support
Input: matrix-keymap - uninline and prepare for device tree support
Input: adp5588 - add support for gpio names
Input: omap-keypad - dynamically handle register offsets
Input: synaptics - fix compile warning
MAINTAINERS: adjust input-related patterns
Input: ALPS - switch to using input_mt_report_finger_count
Input: ALPS - add semi-MT support for v4 protocol
Input: Add Synaptics NavPoint (PXA27x SSP/SPI) driver
Input: atmel_mxt_ts - dump each message on just 1 line
Input: atmel_mxt_ts - do not read extra (checksum) byte
Input: atmel_mxt_ts - verify object size in mxt_write_object
Input: atmel_mxt_ts - only allow root to update firmware
Input: atmel_mxt_ts - use CONFIG_PM_SLEEP
Input: sentelic - report device's production serial number
Input: tl6040-vibra - Device Tree support
Input: evdev - properly handle read/write with count 0
...
Diffstat (limited to 'drivers/input/misc')
-rw-r--r-- | drivers/input/misc/cma3000_d0x.c | 2 | ||||
-rw-r--r-- | drivers/input/misc/mpu3050.c | 2 | ||||
-rw-r--r-- | drivers/input/misc/twl6040-vibra.c | 46 |
3 files changed, 37 insertions, 13 deletions
diff --git a/drivers/input/misc/cma3000_d0x.c b/drivers/input/misc/cma3000_d0x.c index 06517e60e50c..a3735a01e9fd 100644 --- a/drivers/input/misc/cma3000_d0x.c +++ b/drivers/input/misc/cma3000_d0x.c | |||
@@ -318,7 +318,7 @@ struct cma3000_accl_data *cma3000_init(struct device *dev, int irq, | |||
318 | mutex_init(&data->mutex); | 318 | mutex_init(&data->mutex); |
319 | 319 | ||
320 | data->mode = pdata->mode; | 320 | data->mode = pdata->mode; |
321 | if (data->mode < CMAMODE_DEFAULT || data->mode > CMAMODE_POFF) { | 321 | if (data->mode > CMAMODE_POFF) { |
322 | data->mode = CMAMODE_MOTDET; | 322 | data->mode = CMAMODE_MOTDET; |
323 | dev_warn(dev, | 323 | dev_warn(dev, |
324 | "Invalid mode specified, assuming Motion Detect\n"); | 324 | "Invalid mode specified, assuming Motion Detect\n"); |
diff --git a/drivers/input/misc/mpu3050.c b/drivers/input/misc/mpu3050.c index 5403c571b6a5..306f84c2d8fb 100644 --- a/drivers/input/misc/mpu3050.c +++ b/drivers/input/misc/mpu3050.c | |||
@@ -367,7 +367,7 @@ static int __devinit mpu3050_probe(struct i2c_client *client, | |||
367 | 367 | ||
368 | error = request_threaded_irq(client->irq, | 368 | error = request_threaded_irq(client->irq, |
369 | NULL, mpu3050_interrupt_thread, | 369 | NULL, mpu3050_interrupt_thread, |
370 | IRQF_TRIGGER_RISING, | 370 | IRQF_TRIGGER_RISING | IRQF_ONESHOT, |
371 | "mpu3050", sensor); | 371 | "mpu3050", sensor); |
372 | if (error) { | 372 | if (error) { |
373 | dev_err(&client->dev, | 373 | dev_err(&client->dev, |
diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c index 14e94f56cb7d..c34f6c0371c4 100644 --- a/drivers/input/misc/twl6040-vibra.c +++ b/drivers/input/misc/twl6040-vibra.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
30 | #include <linux/of.h> | ||
30 | #include <linux/workqueue.h> | 31 | #include <linux/workqueue.h> |
31 | #include <linux/input.h> | 32 | #include <linux/input.h> |
32 | #include <linux/mfd/twl6040.h> | 33 | #include <linux/mfd/twl6040.h> |
@@ -258,10 +259,13 @@ static SIMPLE_DEV_PM_OPS(twl6040_vibra_pm_ops, twl6040_vibra_suspend, NULL); | |||
258 | static int __devinit twl6040_vibra_probe(struct platform_device *pdev) | 259 | static int __devinit twl6040_vibra_probe(struct platform_device *pdev) |
259 | { | 260 | { |
260 | struct twl6040_vibra_data *pdata = pdev->dev.platform_data; | 261 | struct twl6040_vibra_data *pdata = pdev->dev.platform_data; |
262 | struct device_node *node = pdev->dev.of_node; | ||
261 | struct vibra_info *info; | 263 | struct vibra_info *info; |
264 | int vddvibl_uV = 0; | ||
265 | int vddvibr_uV = 0; | ||
262 | int ret; | 266 | int ret; |
263 | 267 | ||
264 | if (!pdata) { | 268 | if (!pdata && !node) { |
265 | dev_err(&pdev->dev, "platform_data not available\n"); | 269 | dev_err(&pdev->dev, "platform_data not available\n"); |
266 | return -EINVAL; | 270 | return -EINVAL; |
267 | } | 271 | } |
@@ -273,11 +277,26 @@ static int __devinit twl6040_vibra_probe(struct platform_device *pdev) | |||
273 | } | 277 | } |
274 | 278 | ||
275 | info->dev = &pdev->dev; | 279 | info->dev = &pdev->dev; |
280 | |||
276 | info->twl6040 = dev_get_drvdata(pdev->dev.parent); | 281 | info->twl6040 = dev_get_drvdata(pdev->dev.parent); |
277 | info->vibldrv_res = pdata->vibldrv_res; | 282 | if (pdata) { |
278 | info->vibrdrv_res = pdata->vibrdrv_res; | 283 | info->vibldrv_res = pdata->vibldrv_res; |
279 | info->viblmotor_res = pdata->viblmotor_res; | 284 | info->vibrdrv_res = pdata->vibrdrv_res; |
280 | info->vibrmotor_res = pdata->vibrmotor_res; | 285 | info->viblmotor_res = pdata->viblmotor_res; |
286 | info->vibrmotor_res = pdata->vibrmotor_res; | ||
287 | vddvibl_uV = pdata->vddvibl_uV; | ||
288 | vddvibr_uV = pdata->vddvibr_uV; | ||
289 | } else { | ||
290 | of_property_read_u32(node, "vibldrv_res", &info->vibldrv_res); | ||
291 | of_property_read_u32(node, "vibrdrv_res", &info->vibrdrv_res); | ||
292 | of_property_read_u32(node, "viblmotor_res", | ||
293 | &info->viblmotor_res); | ||
294 | of_property_read_u32(node, "vibrmotor_res", | ||
295 | &info->vibrmotor_res); | ||
296 | of_property_read_u32(node, "vddvibl_uV", &vddvibl_uV); | ||
297 | of_property_read_u32(node, "vddvibr_uV", &vddvibr_uV); | ||
298 | } | ||
299 | |||
281 | if ((!info->vibldrv_res && !info->viblmotor_res) || | 300 | if ((!info->vibldrv_res && !info->viblmotor_res) || |
282 | (!info->vibrdrv_res && !info->vibrmotor_res)) { | 301 | (!info->vibrdrv_res && !info->vibrmotor_res)) { |
283 | dev_err(info->dev, "invalid vibra driver/motor resistance\n"); | 302 | dev_err(info->dev, "invalid vibra driver/motor resistance\n"); |
@@ -339,10 +358,9 @@ static int __devinit twl6040_vibra_probe(struct platform_device *pdev) | |||
339 | goto err_regulator; | 358 | goto err_regulator; |
340 | } | 359 | } |
341 | 360 | ||
342 | if (pdata->vddvibl_uV) { | 361 | if (vddvibl_uV) { |
343 | ret = regulator_set_voltage(info->supplies[0].consumer, | 362 | ret = regulator_set_voltage(info->supplies[0].consumer, |
344 | pdata->vddvibl_uV, | 363 | vddvibl_uV, vddvibl_uV); |
345 | pdata->vddvibl_uV); | ||
346 | if (ret) { | 364 | if (ret) { |
347 | dev_err(info->dev, "failed to set VDDVIBL volt %d\n", | 365 | dev_err(info->dev, "failed to set VDDVIBL volt %d\n", |
348 | ret); | 366 | ret); |
@@ -350,10 +368,9 @@ static int __devinit twl6040_vibra_probe(struct platform_device *pdev) | |||
350 | } | 368 | } |
351 | } | 369 | } |
352 | 370 | ||
353 | if (pdata->vddvibr_uV) { | 371 | if (vddvibr_uV) { |
354 | ret = regulator_set_voltage(info->supplies[1].consumer, | 372 | ret = regulator_set_voltage(info->supplies[1].consumer, |
355 | pdata->vddvibr_uV, | 373 | vddvibr_uV, vddvibr_uV); |
356 | pdata->vddvibr_uV); | ||
357 | if (ret) { | 374 | if (ret) { |
358 | dev_err(info->dev, "failed to set VDDVIBR volt %d\n", | 375 | dev_err(info->dev, "failed to set VDDVIBR volt %d\n", |
359 | ret); | 376 | ret); |
@@ -401,6 +418,12 @@ static int __devexit twl6040_vibra_remove(struct platform_device *pdev) | |||
401 | return 0; | 418 | return 0; |
402 | } | 419 | } |
403 | 420 | ||
421 | static const struct of_device_id twl6040_vibra_of_match[] = { | ||
422 | {.compatible = "ti,twl6040-vibra", }, | ||
423 | { }, | ||
424 | }; | ||
425 | MODULE_DEVICE_TABLE(of, twl6040_vibra_of_match); | ||
426 | |||
404 | static struct platform_driver twl6040_vibra_driver = { | 427 | static struct platform_driver twl6040_vibra_driver = { |
405 | .probe = twl6040_vibra_probe, | 428 | .probe = twl6040_vibra_probe, |
406 | .remove = __devexit_p(twl6040_vibra_remove), | 429 | .remove = __devexit_p(twl6040_vibra_remove), |
@@ -408,6 +431,7 @@ static struct platform_driver twl6040_vibra_driver = { | |||
408 | .name = "twl6040-vibra", | 431 | .name = "twl6040-vibra", |
409 | .owner = THIS_MODULE, | 432 | .owner = THIS_MODULE, |
410 | .pm = &twl6040_vibra_pm_ops, | 433 | .pm = &twl6040_vibra_pm_ops, |
434 | .of_match_table = twl6040_vibra_of_match, | ||
411 | }, | 435 | }, |
412 | }; | 436 | }; |
413 | module_platform_driver(twl6040_vibra_driver); | 437 | module_platform_driver(twl6040_vibra_driver); |