svn commit: r265012 - in head/sys/dev: gpio ofw
Nathan Whitehorn
nwhitehorn at freebsd.org
Sun Apr 27 15:13:14 UTC 2014
On 04/27/14 05:11, Luiz Otavio O Souza wrote:
> Author: loos
> Date: Sun Apr 27 12:11:00 2014
> New Revision: 265012
> URL: http://svnweb.freebsd.org/changeset/base/265012
>
> Log:
> Fix the gpio-specifier decoding by respecting the GPIO controller's
> #gpio-cells property.
>
> Add a new ofw_bus method (OFW_BUS_MAP_GPIOS()) that allows the GPIO
> controller to implement its own mapping to deal with gpio-specifiers,
> allowing the decoding of gpio-specifiers to be controller specific.
>
> The default ofw_bus_map_gpios() decodes the linux standard (#gpio-cells =
> <2>) and the FreeBSD standard (#gpio-cells = <3>).
>
> It pass the gpio-specifier flag field to the children as an ivar variable so
> they can act upon.
>
> Modified:
> head/sys/dev/gpio/gpiobusvar.h
> head/sys/dev/gpio/ofw_gpiobus.c
> head/sys/dev/ofw/ofw_bus.h
> head/sys/dev/ofw/ofw_bus_if.m
Would it be possible to put the routines from ofw_bus* into dev/gpio
instead? I'd like to avoid polluting dev/ofw with bus-specific parts as
much as possible.
-Nathan
More information about the svn-src-all
mailing list