summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2013-12-08 14:15:35 -0800
committerTony Lindgren <tony@atomide.com>2013-12-08 14:15:35 -0800
commit841af81f7a180f5793cb0d82a7a7626bbc17c028 (patch)
tree46107f319d52a729ffcd76238df6285d8810f358 /drivers
parentf2e2c9d9b4087b74eb9e00d8dfac148354cb0b71 (diff)
parent218077a3c03d8c136691a0020424633525fcdc85 (diff)
downloadlinux-841af81f7a180f5793cb0d82a7a7626bbc17c028.tar.gz
linux-841af81f7a180f5793cb0d82a7a7626bbc17c028.tar.bz2
linux-841af81f7a180f5793cb0d82a7a7626bbc17c028.zip
Merge branch 'omap-for-v3.14/board-removal' into omap-for-v3.14/omap3-board-removal
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/twl-core.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 29473c2c95ae..d5b3dd8a940e 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -1133,6 +1133,11 @@ static int twl_remove(struct i2c_client *client)
return 0;
}
+static struct of_dev_auxdata twl_auxdata_lookup[] = {
+ OF_DEV_AUXDATA("ti,twl4030-gpio", 0, "twl4030-gpio", NULL),
+ { /* sentinel */ },
+};
+
/* NOTE: This driver only handles a single twl4030/tps659x0 chip */
static int
twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
@@ -1271,10 +1276,14 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
twl_i2c_write_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1);
}
- if (node)
- status = of_platform_populate(node, NULL, NULL, &client->dev);
- else
+ if (node) {
+ if (pdata)
+ twl_auxdata_lookup[0].platform_data = pdata->gpio;
+ status = of_platform_populate(node, NULL, twl_auxdata_lookup,
+ &client->dev);
+ } else {
status = add_children(pdata, irq_base, id->driver_data);
+ }
fail:
if (status < 0)