Date: Sat, 11 Jul 2015 21:09:44 +0000 (UTC) From: Luiz Otavio O Souza <loos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285407 - head/sys/arm/allwinner Message-ID: <201507112109.t6BL9ic1013478@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507112109.t6BL9ic1013478>