Add ofw_gpiobus_parse_gpios(), a new public function, to parse the gpios
authorloos <loos@FreeBSD.org>
Sat, 28 Feb 2015 21:01:01 +0000 (21:01 +0000)
committerloos <loos@FreeBSD.org>
Sat, 28 Feb 2015 21:01:01 +0000 (21:01 +0000)
commit5f4e308fdd3fada8b7cc27834a011b7b75d17766
tree2bd6777c7c4df342cb41e9c8eaacd76a3d4925dc
parent59184505da6e3986b6abaa831f82cf1758e562e3
Add ofw_gpiobus_parse_gpios(), a new public function, to parse the gpios
property for devices that doesn't descend directly from gpiobus.

The parser supports multiple pins, different GPIO controllers and can use
arbitrary names for the property (to match the many linux variants:
cd-gpios, power-gpios, wp-gpios, etc.).

Pass the driver name on ofw_gpiobus_add_fdt_child().  Update gpioled to
match.

An usage example of ofw_gpiobus_parse_gpios() will follow soon.
sys/dev/gpio/gpiobusvar.h
sys/dev/gpio/gpioled.c
sys/dev/gpio/ofw_gpiobus.c