37045806ce
that they can be used by drivers on non-FDT-configured systems. Only the functions related to acquiring pins by parsing FDT data remain in ofw_gpiobus. Also, add two new functions for acquiring gpio pins based on child device_t and index, or on the bus device_t and pin number. And finally, defer reserving pins for gpiobus children until they acquire the pin, rather than reserving them as soon as the child is added (before it's even known whether the child will attach). This will allow drivers configured with hints (or any other mechanism) to use the same code as drivers configured via FDT data. Until now, a hinted driver and an FDT driver had to be two completely different sets of code, because hinted drivers could only use gpiobus calls to manipulate pins, while fdt-configured drivers could not use that API (due to not always being children of the bus that owns the pins) and had to use the newer gpio_pin_xxxx() functions. Now drivers can be written in the more traditional form, where most of the code is shared and only the resource acquisition code at attachment time changes. |
||
---|---|---|
.. | ||
dwgpio | ||
bytgpio.c | ||
chvgpio_reg.h | ||
chvgpio.c | ||
gpio_if.m | ||
gpiobacklight.c | ||
gpiobus_if.m | ||
gpiobus.c | ||
gpiobusvar.h | ||
gpioc.c | ||
gpioiic.c | ||
gpiokeys_codes.c | ||
gpiokeys.c | ||
gpiokeys.h | ||
gpioled_fdt.c | ||
gpioled.c | ||
gpiopower.c | ||
gpiopps.c | ||
gpioregulator.c | ||
gpiospi.c | ||
gpioths.c | ||
ofw_gpiobus.c |