svn commit: r261843 - in head: share/man/man4 sys/dev/gpio

Luiz Otavio O Souza loos.br at gmail.com
Fri Feb 14 18:22:57 UTC 2014


On Feb 13, 2014, at 7:01 PM, Nathan Whitehorn wrote:

> On 02/13/14 11:58, Luiz Otavio O Souza wrote:
>> Author: loos
>> Date: Thu Feb 13 17:58:52 2014
>> New Revision: 261843
>> URL: http://svnweb.freebsd.org/changeset/base/261843
>> 
>> Log:
>>   Add OFW support to the in tree gpio compatible devices: gpioiic(4) and
>>   gpioled(4).
>>      Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for
>>   the I2C tests).  It was also verified for regressions on RSPRO (MIPS/ar71xx)
>>   used as reference for a non OFW-based system.
>>      Update the gpioled(4) and gpioiic(4) man pages with some details and
>>   examples about the FDT/OFW support.
>>      Some compatibility details pointed out by imp@ will follow in subsequent
>>   commits.
>>      Approved by:	adrian (mentor, implicit)
>> 
> 
> Is there a reason gpioled has an identify() method? Usually enumerable buses like OF buses wouldn't have something like that.
> -Nathan

Yes, it is used to give a chance to gpioled to traverse the FDT data and check for the gpio-leds node which isn’t a direct child of gpiobus.

The gpio-leds should be under the root node and can describe leds attached under any of the available gpio controllers on the system.

The usual probe()/attach() methods are also supported and they can coexist in the system as long as the DTS data don’t try to reuse the same gpio pins (which, in any case, will just produce a warning).

Luiz


More information about the svn-src-all mailing list