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>
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user