summaryrefslogtreecommitdiff
path: root/drivers/mfd/tps6586x.c
diff options
context:
space:
mode:
authorPritesh Raithatha <praithatha@nvidia.com>2010-11-22 17:55:54 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:42:58 -0800
commit4769a334cc487563e5817af1910cdf2e73730138 (patch)
treeedab35a6ee91175920881082606334388df0c40d /drivers/mfd/tps6586x.c
parent0e5eec3307ce47cb03f9405b1c227b400611b24b (diff)
ARM: tegra: tps6586x: add empty function direction_input
-on reset default direction is in NOT_CONFIGURED (neither input nor output) mode. -as tps6586x driver has not implemented direction_input, gpiolib sysfs only creates a value node not any direction node for each gpios. so from user space there is no way to set direction (or to call function tps6586x_update). -by adding empty function for direction_input solves the above problem by providing direction node in sysfs. Original-Change-Id: I608bcfcd4392c20afab39874deacc6dc20f45063 Reviewed-on: http://git-master/r/11340 Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Tested-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-by: Peter Zu <pzu@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Rebase-Id: Re07f62867121955f8f91f0418667923e7795ba5d
Diffstat (limited to 'drivers/mfd/tps6586x.c')
-rw-r--r--drivers/mfd/tps6586x.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c
index bba26d96c240..80303b77ee1a 100644
--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -274,6 +274,12 @@ static void tps6586x_gpio_set(struct gpio_chip *chip, unsigned offset,
value << offset, 1 << offset);
}
+static int tps6586x_gpio_input(struct gpio_chip *gc, unsigned offset)
+{
+ /* FIXME: add handling of GPIOs as dedicated inputs */
+ return -ENOSYS;
+}
+
static int tps6586x_gpio_output(struct gpio_chip *gc, unsigned offset,
int value)
{
@@ -300,7 +306,7 @@ static int tps6586x_gpio_init(struct tps6586x *tps6586x, int gpio_base)
tps6586x->gpio.ngpio = 4;
tps6586x->gpio.can_sleep = 1;
- /* FIXME: add handling of GPIOs as dedicated inputs */
+ tps6586x->gpio.direction_input = tps6586x_gpio_input;
tps6586x->gpio.direction_output = tps6586x_gpio_output;
tps6586x->gpio.set = tps6586x_gpio_set;
tps6586x->gpio.get = tps6586x_gpio_get;