Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261857
b: refs/heads/master
c: 266a5e0
h: refs/heads/master
i:
  261855: 309c8c5
v: v3
  • Loading branch information
Mark Brown authored and Samuel Ortiz committed Jul 31, 2011
1 parent a53457c commit 78f026c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eb503dc16b04d07a42a37892da73c74461fd06da
refs/heads/master: 266a5e02fe2690637b2318c9fc5c3513937128f4
27 changes: 17 additions & 10 deletions trunk/drivers/mfd/wm831x-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,11 +1124,6 @@ static struct mfd_cell wm8311_devs[] = {
.num_resources = ARRAY_SIZE(wm831x_status2_resources),
.resources = wm831x_status2_resources,
},
{
.name = "wm831x-touch",
.num_resources = ARRAY_SIZE(wm831x_touch_resources),
.resources = wm831x_touch_resources,
},
{
.name = "wm831x-watchdog",
.num_resources = ARRAY_SIZE(wm831x_wdt_resources),
Expand Down Expand Up @@ -1285,11 +1280,6 @@ static struct mfd_cell wm8312_devs[] = {
.num_resources = ARRAY_SIZE(wm831x_status2_resources),
.resources = wm831x_status2_resources,
},
{
.name = "wm831x-touch",
.num_resources = ARRAY_SIZE(wm831x_touch_resources),
.resources = wm831x_touch_resources,
},
{
.name = "wm831x-watchdog",
.num_resources = ARRAY_SIZE(wm831x_wdt_resources),
Expand Down Expand Up @@ -1428,6 +1418,15 @@ static struct mfd_cell wm8320_devs[] = {
},
};

static struct mfd_cell touch_devs[] = {
{
.name = "wm831x-touch",
.num_resources = ARRAY_SIZE(wm831x_touch_resources),
.resources = wm831x_touch_resources,
},
};


static struct mfd_cell backlight_devs[] = {
{
.name = "wm831x-backlight",
Expand Down Expand Up @@ -1624,12 +1623,20 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
ret = mfd_add_devices(wm831x->dev, wm831x_num,
wm8311_devs, ARRAY_SIZE(wm8311_devs),
NULL, wm831x->irq_base);
if (!pdata || !pdata->disable_touch)
mfd_add_devices(wm831x->dev, wm831x_num,
touch_devs, ARRAY_SIZE(touch_devs),
NULL, wm831x->irq_base);
break;

case WM8312:
ret = mfd_add_devices(wm831x->dev, wm831x_num,
wm8312_devs, ARRAY_SIZE(wm8312_devs),
NULL, wm831x->irq_base);
if (!pdata || !pdata->disable_touch)
mfd_add_devices(wm831x->dev, wm831x_num,
touch_devs, ARRAY_SIZE(touch_devs),
NULL, wm831x->irq_base);
break;

case WM8320:
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/linux/mfd/wm831x/pdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ struct wm831x_pdata {
/** Put the /IRQ line into CMOS mode */
bool irq_cmos;

/** Disable the touchscreen */
bool disable_touch;

int irq_base;
int gpio_base;
int gpio_defaults[WM831X_GPIO_NUM];
Expand Down

0 comments on commit 78f026c

Please sign in to comment.