summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 12:59:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 12:59:53 -0700
commit945c40c6b007eb4b07374a38ea37b2a34da306b1 (patch)
tree09d36ed7d59cd7d63162de84671761366939450b /drivers/input/misc
parent0082c16e3a6d87c7b156ccf21f5e6c448b102809 (diff)
parent314820c9e892d8f41ba4db300ec96770d9c8294b (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer updates from Dmitry Torokhov: "First set of updates for the input subsystem. You will get a new touchscreen driver (Melfas mms114), a new keypad driver for LPC32xx SoC, large update to Atmel mXT touchscreen driver, a lot of drivers acquired device tree support and a slew of other fixes." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits) Input: add MELFAS mms114 touchscreen driver Input: add support for key scan interface of the LPC32xx SoC Input: omap4-keypad - add device tree support Input: hanwang - add support for Art Master II tablet Input: spear_keyboard - reconfigure operating frequency on suspend Input: spear_keyboard - fix clock handling during suspend/resume Input: ff-memless - fix a couple min_t() casts Input: synaptics - print firmware ID and board number at init Input: spear_keyboard - generalize keyboard frequency configuration Input: spear_keyboard - rename bit definitions to reflect register Input: spear_keyboard - use correct io accessors Input: spear-keyboard - fix disable device_init_wakeup in remove Input: wacom_i2c - fix compiler warning Input: imx_keypad - check error returned by clk_prepare_enable() Input: imx_keypad - adapt the new kpp clock name Input: imx_keypad - use clk_prepare_enable/clk_disable_unprepare() Input: ad7879 - add option to correct xy axis Input: synaptics_usb - Remove TrackPoint name trailing whitespace Revert "Input: atmel_mxt_ts - warn if sysfs could not be created" Input: MT - Include win8 support ...
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/ab8500-ponkey.c9
-rw-r--r--drivers/input/misc/twl6040-vibra.c42
2 files changed, 33 insertions, 18 deletions
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 350fd0c385d2..84ec691c05aa 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -13,6 +13,7 @@
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/mfd/abx500/ab8500.h>
+#include <linux/of.h>
#include <linux/slab.h>
/**
@@ -131,10 +132,18 @@ static int __devexit ab8500_ponkey_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id ab8500_ponkey_match[] = {
+ { .compatible = "stericsson,ab8500-ponkey", },
+ {}
+};
+#endif
+
static struct platform_driver ab8500_ponkey_driver = {
.driver = {
.name = "ab8500-poweron-key",
.owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(ab8500_ponkey_match),
},
.probe = ab8500_ponkey_probe,
.remove = __devexit_p(ab8500_ponkey_remove),
diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c
index c34f6c0371c4..c8a288ae1d5b 100644
--- a/drivers/input/misc/twl6040-vibra.c
+++ b/drivers/input/misc/twl6040-vibra.c
@@ -251,7 +251,6 @@ static int twl6040_vibra_suspend(struct device *dev)
return 0;
}
-
#endif
static SIMPLE_DEV_PM_OPS(twl6040_vibra_pm_ops, twl6040_vibra_suspend, NULL);
@@ -259,13 +258,19 @@ static SIMPLE_DEV_PM_OPS(twl6040_vibra_pm_ops, twl6040_vibra_suspend, NULL);
static int __devinit twl6040_vibra_probe(struct platform_device *pdev)
{
struct twl6040_vibra_data *pdata = pdev->dev.platform_data;
- struct device_node *node = pdev->dev.of_node;
+ struct device *twl6040_core_dev = pdev->dev.parent;
+ struct device_node *twl6040_core_node = NULL;
struct vibra_info *info;
int vddvibl_uV = 0;
int vddvibr_uV = 0;
int ret;
- if (!pdata && !node) {
+#ifdef CONFIG_OF
+ twl6040_core_node = of_find_node_by_name(twl6040_core_dev->of_node,
+ "vibra");
+#endif
+
+ if (!pdata && !twl6040_core_node) {
dev_err(&pdev->dev, "platform_data not available\n");
return -EINVAL;
}
@@ -287,14 +292,18 @@ static int __devinit twl6040_vibra_probe(struct platform_device *pdev)
vddvibl_uV = pdata->vddvibl_uV;
vddvibr_uV = pdata->vddvibr_uV;
} else {
- of_property_read_u32(node, "vibldrv_res", &info->vibldrv_res);
- of_property_read_u32(node, "vibrdrv_res", &info->vibrdrv_res);
- of_property_read_u32(node, "viblmotor_res",
+ of_property_read_u32(twl6040_core_node, "ti,vibldrv-res",
+ &info->vibldrv_res);
+ of_property_read_u32(twl6040_core_node, "ti,vibrdrv-res",
+ &info->vibrdrv_res);
+ of_property_read_u32(twl6040_core_node, "ti,viblmotor-res",
&info->viblmotor_res);
- of_property_read_u32(node, "vibrmotor_res",
+ of_property_read_u32(twl6040_core_node, "ti,vibrmotor-res",
&info->vibrmotor_res);
- of_property_read_u32(node, "vddvibl_uV", &vddvibl_uV);
- of_property_read_u32(node, "vddvibr_uV", &vddvibr_uV);
+ of_property_read_u32(twl6040_core_node, "ti,vddvibl-uV",
+ &vddvibl_uV);
+ of_property_read_u32(twl6040_core_node, "ti,vddvibr-uV",
+ &vddvibr_uV);
}
if ((!info->vibldrv_res && !info->viblmotor_res) ||
@@ -351,8 +360,12 @@ static int __devinit twl6040_vibra_probe(struct platform_device *pdev)
info->supplies[0].supply = "vddvibl";
info->supplies[1].supply = "vddvibr";
- ret = regulator_bulk_get(info->dev, ARRAY_SIZE(info->supplies),
- info->supplies);
+ /*
+ * When booted with Device tree the regulators are attached to the
+ * parent device (twl6040 MFD core)
+ */
+ ret = regulator_bulk_get(pdata ? info->dev : twl6040_core_dev,
+ ARRAY_SIZE(info->supplies), info->supplies);
if (ret) {
dev_err(info->dev, "couldn't get regulators %d\n", ret);
goto err_regulator;
@@ -418,12 +431,6 @@ static int __devexit twl6040_vibra_remove(struct platform_device *pdev)
return 0;
}
-static const struct of_device_id twl6040_vibra_of_match[] = {
- {.compatible = "ti,twl6040-vibra", },
- { },
-};
-MODULE_DEVICE_TABLE(of, twl6040_vibra_of_match);
-
static struct platform_driver twl6040_vibra_driver = {
.probe = twl6040_vibra_probe,
.remove = __devexit_p(twl6040_vibra_remove),
@@ -431,7 +438,6 @@ static struct platform_driver twl6040_vibra_driver = {
.name = "twl6040-vibra",
.owner = THIS_MODULE,
.pm = &twl6040_vibra_pm_ops,
- .of_match_table = twl6040_vibra_of_match,
},
};
module_platform_driver(twl6040_vibra_driver);