aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm831x-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-02 14:18:49 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2011-07-31 17:28:19 -0400
commit266a5e02fe2690637b2318c9fc5c3513937128f4 (patch)
tree1f531de03568ef9b78ae67f2204f481c1e9eb582 /drivers/mfd/wm831x-core.c
parenteb503dc16b04d07a42a37892da73c74461fd06da (diff)
mfd: Allow touchscreen to be disabled on wm831x devices
Allow platform data to flag the touchscreen as disabled so that if the touch driver is built in we don't end up causing lots of work by spuriously detecting touchscreen activity on systems where it isn't in use. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm831x-core.c')
-rw-r--r--drivers/mfd/wm831x-core.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c
index 04994b23bb6..ff57a167475 100644
--- a/drivers/mfd/wm831x-core.c
+++ b/drivers/mfd/wm831x-core.c
@@ -1125,11 +1125,6 @@ static struct mfd_cell wm8311_devs[] = {
1125 .resources = wm831x_status2_resources, 1125 .resources = wm831x_status2_resources,
1126 }, 1126 },
1127 { 1127 {
1128 .name = "wm831x-touch",
1129 .num_resources = ARRAY_SIZE(wm831x_touch_resources),
1130 .resources = wm831x_touch_resources,
1131 },
1132 {
1133 .name = "wm831x-watchdog", 1128 .name = "wm831x-watchdog",
1134 .num_resources = ARRAY_SIZE(wm831x_wdt_resources), 1129 .num_resources = ARRAY_SIZE(wm831x_wdt_resources),
1135 .resources = wm831x_wdt_resources, 1130 .resources = wm831x_wdt_resources,
@@ -1286,11 +1281,6 @@ static struct mfd_cell wm8312_devs[] = {
1286 .resources = wm831x_status2_resources, 1281 .resources = wm831x_status2_resources,
1287 }, 1282 },
1288 { 1283 {
1289 .name = "wm831x-touch",
1290 .num_resources = ARRAY_SIZE(wm831x_touch_resources),
1291 .resources = wm831x_touch_resources,
1292 },
1293 {
1294 .name = "wm831x-watchdog", 1284 .name = "wm831x-watchdog",
1295 .num_resources = ARRAY_SIZE(wm831x_wdt_resources), 1285 .num_resources = ARRAY_SIZE(wm831x_wdt_resources),
1296 .resources = wm831x_wdt_resources, 1286 .resources = wm831x_wdt_resources,
@@ -1428,6 +1418,15 @@ static struct mfd_cell wm8320_devs[] = {
1428 }, 1418 },
1429}; 1419};
1430 1420
1421static struct mfd_cell touch_devs[] = {
1422 {
1423 .name = "wm831x-touch",
1424 .num_resources = ARRAY_SIZE(wm831x_touch_resources),
1425 .resources = wm831x_touch_resources,
1426 },
1427};
1428
1429
1431static struct mfd_cell backlight_devs[] = { 1430static struct mfd_cell backlight_devs[] = {
1432 { 1431 {
1433 .name = "wm831x-backlight", 1432 .name = "wm831x-backlight",
@@ -1624,12 +1623,20 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
1624 ret = mfd_add_devices(wm831x->dev, wm831x_num, 1623 ret = mfd_add_devices(wm831x->dev, wm831x_num,
1625 wm8311_devs, ARRAY_SIZE(wm8311_devs), 1624 wm8311_devs, ARRAY_SIZE(wm8311_devs),
1626 NULL, wm831x->irq_base); 1625 NULL, wm831x->irq_base);
1626 if (!pdata || !pdata->disable_touch)
1627 mfd_add_devices(wm831x->dev, wm831x_num,
1628 touch_devs, ARRAY_SIZE(touch_devs),
1629 NULL, wm831x->irq_base);
1627 break; 1630 break;
1628 1631
1629 case WM8312: 1632 case WM8312:
1630 ret = mfd_add_devices(wm831x->dev, wm831x_num, 1633 ret = mfd_add_devices(wm831x->dev, wm831x_num,
1631 wm8312_devs, ARRAY_SIZE(wm8312_devs), 1634 wm8312_devs, ARRAY_SIZE(wm8312_devs),
1632 NULL, wm831x->irq_base); 1635 NULL, wm831x->irq_base);
1636 if (!pdata || !pdata->disable_touch)
1637 mfd_add_devices(wm831x->dev, wm831x_num,
1638 touch_devs, ARRAY_SIZE(touch_devs),
1639 NULL, wm831x->irq_base);
1633 break; 1640 break;
1634 1641
1635 case WM8320: 1642 case WM8320: