Return the FDT node of the GPIO controller to gpiobus. It is used by the
children of gpiobus.
This commit is contained in:
parent
81e683d636
commit
a8921b867f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=285407
@ -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
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user