aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/twl-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/twl-core.c')
-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)
1133 return 0; 1133 return 0;
1134} 1134}
1135 1135
1136static struct of_dev_auxdata twl_auxdata_lookup[] = {
1137 OF_DEV_AUXDATA("ti,twl4030-gpio", 0, "twl4030-gpio", NULL),
1138 { /* sentinel */ },
1139};
1140
1136/* NOTE: This driver only handles a single twl4030/tps659x0 chip */ 1141/* NOTE: This driver only handles a single twl4030/tps659x0 chip */
1137static int 1142static int
1138twl_probe(struct i2c_client *client, const struct i2c_device_id *id) 1143twl_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)
1271 twl_i2c_write_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1); 1276 twl_i2c_write_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1);
1272 } 1277 }
1273 1278
1274 if (node) 1279 if (node) {
1275 status = of_platform_populate(node, NULL, NULL, &client->dev); 1280 if (pdata)
1276 else 1281 twl_auxdata_lookup[0].platform_data = pdata->gpio;
1282 status = of_platform_populate(node, NULL, twl_auxdata_lookup,
1283 &client->dev);
1284 } else {
1277 status = add_children(pdata, irq_base, id->driver_data); 1285 status = add_children(pdata, irq_base, id->driver_data);
1286 }
1278 1287
1279fail: 1288fail:
1280 if (status < 0) 1289 if (status < 0)