summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/dev/gpio
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-21 09:39:55 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-21 10:29:40 +0200
commit2df56dbd60bb5d925d2ce0ddbdefdbe6107ea783 (patch)
treebd7bad558534db4a1f400bc38a2c9aa7ea4f411e /freebsd/sys/dev/gpio
parentUpdate to FreeBSD head 2018-02-01 (diff)
downloadrtems-libbsd-2df56dbd60bb5d925d2ce0ddbdefdbe6107ea783.tar.bz2
Update to FreeBSD head 2018-04-01
Git mirror commit 8dfb1ccc26d1cea7e2529303003ff61f9f1784c4. Update #3472.
Diffstat (limited to 'freebsd/sys/dev/gpio')
-rw-r--r--freebsd/sys/dev/gpio/gpiobusvar.h2
-rw-r--r--freebsd/sys/dev/gpio/ofw_gpiobus.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/freebsd/sys/dev/gpio/gpiobusvar.h b/freebsd/sys/dev/gpio/gpiobusvar.h
index fbcfbb4e..29677298 100644
--- a/freebsd/sys/dev/gpio/gpiobusvar.h
+++ b/freebsd/sys/dev/gpio/gpiobusvar.h
@@ -136,6 +136,8 @@ int gpio_pin_get_by_ofw_idx(device_t consumer, phandle_t node,
int idx, gpio_pin_t *gpio);
int gpio_pin_get_by_ofw_property(device_t consumer, phandle_t node,
char *name, gpio_pin_t *gpio);
+int gpio_pin_get_by_ofw_propidx(device_t consumer, phandle_t node,
+ char *name, int idx, gpio_pin_t *gpio);
void gpio_pin_release(gpio_pin_t gpio);
int gpio_pin_getcaps(gpio_pin_t pin, uint32_t *caps);
int gpio_pin_is_active(gpio_pin_t pin, bool *active);
diff --git a/freebsd/sys/dev/gpio/ofw_gpiobus.c b/freebsd/sys/dev/gpio/ofw_gpiobus.c
index 70495a2a..1a87121c 100644
--- a/freebsd/sys/dev/gpio/ofw_gpiobus.c
+++ b/freebsd/sys/dev/gpio/ofw_gpiobus.c
@@ -65,8 +65,8 @@ static int ofw_gpiobus_parse_gpios_impl(device_t, phandle_t, char *,
* tree consumers.
*
*/
-static int
-gpio_pin_get_by_ofw_impl(device_t consumer, phandle_t cnode,
+int
+gpio_pin_get_by_ofw_propidx(device_t consumer, phandle_t cnode,
char *prop_name, int idx, gpio_pin_t *out_pin)
{
phandle_t xref;
@@ -120,7 +120,7 @@ gpio_pin_get_by_ofw_idx(device_t consumer, phandle_t node,
int idx, gpio_pin_t *pin)
{
- return (gpio_pin_get_by_ofw_impl(consumer, node, "gpios", idx, pin));
+ return (gpio_pin_get_by_ofw_propidx(consumer, node, "gpios", idx, pin));
}
int
@@ -128,7 +128,7 @@ gpio_pin_get_by_ofw_property(device_t consumer, phandle_t node,
char *name, gpio_pin_t *pin)
{
- return (gpio_pin_get_by_ofw_impl(consumer, node, name, 0, pin));
+ return (gpio_pin_get_by_ofw_propidx(consumer, node, name, 0, pin));
}
int