svn commit: r285407 - head/sys/arm/allwinner
Luiz Otavio O Souza
loos at FreeBSD.org
Sat Jul 11 21:09:44 UTC 2015
Author: loos
Date: Sat Jul 11 21:09:43 2015
New Revision: 285407
URL: https://svnweb.freebsd.org/changeset/base/285407
Log:
Return the FDT node of the GPIO controller to gpiobus. It is used by the
children of gpiobus.
Modified:
head/sys/arm/allwinner/a10_gpio.c
Modified: head/sys/arm/allwinner/a10_gpio.c
==============================================================================
--- head/sys/arm/allwinner/a10_gpio.c Sat Jul 11 20:18:34 2015 (r285406)
+++ head/sys/arm/allwinner/a10_gpio.c Sat Jul 11 21:09:43 2015 (r285407)
@@ -493,6 +493,14 @@ a10_gpio_detach(device_t dev)
return (EBUSY);
}
+static phandle_t
+a10_gpio_get_node(device_t dev, device_t bus)
+{
+
+ /* We only have one child, the GPIO bus, which needs our own node. */
+ return (ofw_bus_get_node(dev));
+}
+
static device_method_t a10_gpio_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, a10_gpio_probe),
@@ -510,6 +518,9 @@ static device_method_t a10_gpio_methods[
DEVMETHOD(gpio_pin_set, a10_gpio_pin_set),
DEVMETHOD(gpio_pin_toggle, a10_gpio_pin_toggle),
+ /* ofw_bus interface */
+ DEVMETHOD(ofw_bus_get_node, a10_gpio_get_node),
+
DEVMETHOD_END
};
More information about the svn-src-head
mailing list