On 1/26/2014 9:04 AM, Charles Steinkuehler wrote:
>
> I think maybe I should add a new property to allow the direction to be
> changed, so DT stubs would look something like:
>
> x_min {
> gpio-name = "bebopr:x_min";
> gpio = <&gpio3 3 0>;
> input;
> dir-changeable;
> };
Yes, I like this version much better. Patch attached.
Comments?
--
Charles Steinkuehler
[email protected]
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
>From ef86c11fe40d5483c878fa2252a1bca587753d21 Mon Sep 17 00:00:00 2001
From: Charles Steinkuehler <[email protected]>
Date: Sun, 26 Jan 2014 16:17:09 +0100
Subject: [PATCH] Add dir-changeable property to gpio-of-helper
Signed-off-by: Charles Steinkuehler <[email protected]>
---
drivers/gpio/gpio-of-helper.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpio/gpio-of-helper.c b/drivers/gpio/gpio-of-helper.c
index 16a607f..1c289b2 100644
--- a/drivers/gpio/gpio-of-helper.c
+++ b/drivers/gpio/gpio-of-helper.c
@@ -181,6 +181,8 @@ gpio_of_entry_create(struct gpio_of_helper_info *info,
req_flags |= GPIOF_OUT_INIT_LOW;
break;
}
+ if (of_property_read_bool(node, "dir-changeable"))
+ req_flags |= GPIOF_EXPORT_CHANGEABLE;
/* request the gpio */
err = devm_gpio_request_one(dev, gpio, req_flags, name);
--
1.7.10.4