aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Serban <mihai.serban@intel.com>2015-11-09 10:58:09 +0200
committerBruce Beare <bruce.j.beare@intel.com>2015-11-25 19:03:25 -0800
commit940ba2b26a441b47a856e451df60669160407598 (patch)
treeffd369f41db3b01b20d4c299f5fc752d98e320e0
parentaee979674867ea25a9f87c341513ea36c9444d33 (diff)
downloadedison-v3.10-940ba2b26a441b47a856e451df60669160407598.tar.gz
gpio: fix pinmux sysfs interface
The pinmux attribute is always present in sysfs interface now. It has the same functionality as the current_pinmux from the debugfs/gpio_debug interface with the difference that instead of using values like 'mode0' ... 'mode7' one must use '0'...'7'. BUG=25892557 Change-Id: I1537d38bef4d710a50c3c191c8640f183f22358b Tracked-On: https://jira01.devtools.intel.com/browse/BP-88 Reviewed-on: https://android.intel.com/434857 Reviewed-by: Musca, Constantin <constantin.musca@intel.com> Signed-off-by: Beare, Bruce J <bruce.j.beare@intel.com> Signed-off-by: Mihai Serban <mihai.serban@intel.com>
-rw-r--r--drivers/gpio/gpiolib.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 50067a4632c..0b7ecd5960b 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -637,6 +637,7 @@ static DEVICE_ATTR(active_low, 0644,
static struct attribute *gpio_attrs[] = {
&dev_attr_value.attr,
&dev_attr_active_low.attr,
+ &dev_attr_pinmux.attr,
NULL,
};
@@ -856,10 +857,6 @@ static int gpiod_export(struct gpio_desc *desc, bool direction_may_change)
desc_to_gpio(desc));
if (IS_ERR(dev)) {
status = PTR_ERR(dev);
- if (!status)
- status = device_create_file(dev,
- &dev_attr_pinmux);
-
goto fail_unlock;
}