aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/tps65910.c
diff options
context:
space:
mode:
authorGraeme Gregory <gg@slimlogic.co.uk>2011-05-02 16:19:52 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2011-05-27 10:48:23 +0100
commit2537df722d338ab687d7ed91dc589265c0d14aec (patch)
treed8b91f4af226921296dc688f253278b7fad2b096 /drivers/mfd/tps65910.c
parent27c6750ec56fd3b22c670d9333d519a322996eb2 (diff)
TPS65910: GPIO: Add GPIO driver
TPS65910 has one configurable GPIO that can be used for several purposes. Subsequent versions of the TPS chip support more than one GPIO. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/mfd/tps65910.c')
-rw-r--r--drivers/mfd/tps65910.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
index dbcdfb55bb8..5a6a7be1f8c 100644
--- a/drivers/mfd/tps65910.c
+++ b/drivers/mfd/tps65910.c
@@ -135,8 +135,13 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
struct tps65910 *tps65910;
+ struct tps65910_board *pmic_plat_data;
int ret = 0;
+ pmic_plat_data = dev_get_platdata(&i2c->dev);
+ if (!pmic_plat_data)
+ return -EINVAL;
+
tps65910 = kzalloc(sizeof(struct tps65910), GFP_KERNEL);
if (tps65910 == NULL)
return -ENOMEM;
@@ -154,6 +159,8 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
if (ret < 0)
goto err;
+ tps65910_gpio_init(tps65910, pmic_plat_data->gpio_base);
+
return ret;
err: