]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Ignore "gpio-hog" nodes when instantiating ofw_gpiobus children. Also,
authorian <ian@FreeBSD.org>
Fri, 29 Nov 2019 18:05:54 +0000 (18:05 +0000)
committerian <ian@FreeBSD.org>
Fri, 29 Nov 2019 18:05:54 +0000 (18:05 +0000)
commitf636524bba639547a1ef65d286c39327e1835cde
tree57febd6e43f68e2915dc2b71d399145e65e19f3c
parent8e4a0f45834bd03049e92c3548804eed378957b0
Ignore "gpio-hog" nodes when instantiating ofw_gpiobus children.  Also,
in ofw_gpiobus_probe() return BUS_PROBE_DEFAULT rather than 0; we are not
the only possible driver to handle this device, we're just slightly better
than the base gpiobus (which probes at BUS_PROBE_GENERIC).

In the time since this code was first written, the gpio controller bindings
aquired the concept of a "hog" node which could be used to preset one or
more gpio pins as input or output at a specified level.  This change doesn't
fully implement the hogging concept, it just filters out hog nodes when
instantiating child devices by scanning for child nodes in the fdt data.

The whole concept of having child nodes under the controller node is not
supported by the standard bindings, and appears to be a freebsd extension,
probably left over from the days when we had no support for cross-tree
phandle references in the fdt data.
sys/dev/gpio/ofw_gpiobus.c