aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-04 23:01:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-04 23:01:30 -0400
commit578f1ef91aa92beb571bfb9af8f4d18f405f3b9e (patch)
tree8ff59e772d09180b7e7f952a8c90a1bcf25e1d19 /drivers/input/misc
parentecefbd94b834fa32559d854646d777c56749ef1c (diff)
parent74d8378159de16a0a1d1975d4778120d263d6000 (diff)
Merge tag 'mfd-3.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Pull MFD changes from Samuel Ortiz: "MFD bits for the 3.7 merge window. As usual we have a few new drivers: - TI LP8788 - TI OMAP USB TLL - Maxim MAX8907 - SMSC ECE1099 - Dialog Semiconductor DA9055 - A simpler syscon driver that allow us to get rid of the anatop one. Drivers are also gradually getting Device Tree and IRQ domain support. The following drivers got DT support: - palmas, 88pm860x, tc3589x and twl4030-audio And those ones now use the IRQ domain APIs: - 88pm860x, tc3589x, db8500_prcmu Also some other interesting changes: - Intel's ICH LPC now supports Lynx Point - TI's twl4030-audio added a GPO child - tps6527 enabled its backlight subdevice - The twl6030 pwm driver moved to the new PWM subsystem And finally a bunch of cleanup and casual fixes for mc13xxx, 88pm860x, palmas, ab8500, wm8994, wm5110, max8907 and the tps65xxx family." Fix up various annoying conflicts: the DT and IRQ domain support came in twice and was already in 3.6. And then it was apparently rebased. Guys, DON'T REBASE! * tag 'mfd-3.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (89 commits) ARM: dts: Enable 88pm860x pmic mfd: 88pm860x: Move gpadc init into touch mfd: 88pm860x: Device tree support mfd: 88pm860x: Use irqdomain mfd: smsc: Add support for smsc gpio io/keypad driver backlight: tps65217_bl: Add missing platform_set_drvdata in tps65217_bl_probe mfd: DA9055 core driver mfd: tps65910: Add alarm interrupt of TPS65910 RTC to mfd device list mfd: wm5110: Add register patches for revision B mfd: wm5110: Disable control interface error report for WM5110 rev B mfd: max8907: Remove regulator-compatible from DT docs backlight: Add TPS65217 WLED driver mfd: Add backlight as subdevice to the tps65217 mfd: Provide the PRCMU with its own IRQ domain mfd: Fix max8907 sparse warning mfd: Add lp8788 mfd driver mfd: dbx500: Provide a more accurate smp_twd clock mfd: rc5t583: Fix warning messages regulator: palmas: Add DT support mfd: palmas: Change regulator defns to better suite DT ...
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/twl4030-vibra.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c
index fc0ed9b43424..2194a3c7236a 100644
--- a/drivers/input/misc/twl4030-vibra.c
+++ b/drivers/input/misc/twl4030-vibra.c
@@ -26,6 +26,7 @@
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/jiffies.h> 27#include <linux/jiffies.h>
28#include <linux/platform_device.h> 28#include <linux/platform_device.h>
29#include <linux/of.h>
29#include <linux/workqueue.h> 30#include <linux/workqueue.h>
30#include <linux/i2c/twl.h> 31#include <linux/i2c/twl.h>
31#include <linux/mfd/twl4030-audio.h> 32#include <linux/mfd/twl4030-audio.h>
@@ -194,13 +195,26 @@ static int twl4030_vibra_resume(struct device *dev)
194static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops, 195static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops,
195 twl4030_vibra_suspend, twl4030_vibra_resume); 196 twl4030_vibra_suspend, twl4030_vibra_resume);
196 197
198static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata,
199 struct device_node *node)
200{
201 if (pdata && pdata->coexist)
202 return true;
203
204 if (of_find_node_by_name(node, "codec"))
205 return true;
206
207 return false;
208}
209
197static int __devinit twl4030_vibra_probe(struct platform_device *pdev) 210static int __devinit twl4030_vibra_probe(struct platform_device *pdev)
198{ 211{
199 struct twl4030_vibra_data *pdata = pdev->dev.platform_data; 212 struct twl4030_vibra_data *pdata = pdev->dev.platform_data;
213 struct device_node *twl4030_core_node = pdev->dev.parent->of_node;
200 struct vibra_info *info; 214 struct vibra_info *info;
201 int ret; 215 int ret;
202 216
203 if (!pdata) { 217 if (!pdata && !twl4030_core_node) {
204 dev_dbg(&pdev->dev, "platform_data not available\n"); 218 dev_dbg(&pdev->dev, "platform_data not available\n");
205 return -EINVAL; 219 return -EINVAL;
206 } 220 }
@@ -210,7 +224,7 @@ static int __devinit twl4030_vibra_probe(struct platform_device *pdev)
210 return -ENOMEM; 224 return -ENOMEM;
211 225
212 info->dev = &pdev->dev; 226 info->dev = &pdev->dev;
213 info->coexist = pdata->coexist; 227 info->coexist = twl4030_vibra_check_coexist(pdata, twl4030_core_node);
214 INIT_WORK(&info->play_work, vibra_play_work); 228 INIT_WORK(&info->play_work, vibra_play_work);
215 229
216 info->input_dev = input_allocate_device(); 230 info->input_dev = input_allocate_device();