summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorPritesh Raithatha <praithatha@nvidia.com>2010-11-22 17:55:54 +0530
committerBharat Nihalani <bnihalani@nvidia.com>2010-12-01 00:30:10 -0800
commit9d3ec24ff1b51f050c49720a6fd3271cbde47bb6 (patch)
treedeb3cee3b8ed039072ff9e598606f7a0941255ba /drivers/mfd
parentf2a268e16cdefab8757793bcf2679117f37fda3d (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. 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>
Diffstat (limited to 'drivers/mfd')
-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 76c315229abe..c3dc32211d9e 100644
--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -276,6 +276,12 @@ static void tps6586x_gpio_set(struct gpio_chip *chip, unsigned offset,
value << 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)
{
@@ -304,7 +310,7 @@ static void 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;