<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/gpio, branch release/10.1.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F10.1.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F10.1.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2014-08-20T17:39:53Z</updated>
<entry>
<title>MFC r266922:</title>
<updated>2014-08-20T17:39:53Z</updated>
<author>
<name>Luiz Otavio O Souza</name>
<email>loos@FreeBSD.org</email>
</author>
<published>2014-08-20T17:39:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4562b565a507c210fce5bca9e2cb43faa83df321'/>
<id>urn:sha1:4562b565a507c210fce5bca9e2cb43faa83df321</id>
<content type='text'>
  Add a bounds verification to the SCL and SDA pin values.

  At attach, print the SCL and SDA pin numbers.

  Remove a stray blank line.

  Remove the GPIOBUS locking from gpioiic_reset(), it is already called with
  this lock held.  This fixes a crash when you try to scan the iicbus with
  i2c(8).
</content>
</entry>
<entry>
<title>MFC r265012, r265191, r265289, r265310</title>
<updated>2014-05-15T15:15:23Z</updated>
<author>
<name>Luiz Otavio O Souza</name>
<email>loos@FreeBSD.org</email>
</author>
<published>2014-05-15T15:15:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a0df357a7a0457628bcd161167bf84d5c83a63d8'/>
<id>urn:sha1:a0df357a7a0457628bcd161167bf84d5c83a63d8</id>
<content type='text'>
r265012:
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 =
&lt;2&gt;) and the FreeBSD standard (#gpio-cells = &lt;3&gt;).

It pass the gpio-specifier flag field to the children as an ivar variable so
they can act upon.

r265191:
Remove unnecessary headers.  Sort out the headers.  Add a missing header on
ofw_gpiobus.c (it was working because of sys/libkern.h).

r265289:
eally sort out the headers.

sys/systm.h must always come after sys/param.h.

Remove sys/types.h which should never be included together with sys/param.h.

Add sys/malloc.h for correctness even if it seems to don't be needed.

Remove more unused headers found by unusedinc (from bde@).

r265310:
Move gpiobus routines to dev/gpio.  Avoid polluting ofw_bus with bus
specific parts.
</content>
</entry>
<entry>
<title>MFC r258046, r258047, r258050, r259035, r259036, r259037, r261842, r261843,</title>
<updated>2014-05-15T01:27:53Z</updated>
<author>
<name>Luiz Otavio O Souza</name>
<email>loos@FreeBSD.org</email>
</author>
<published>2014-05-15T01:27:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5c2a75390268a2dafeb11ea357355af47c617238'/>
<id>urn:sha1:5c2a75390268a2dafeb11ea357355af47c617238</id>
<content type='text'>
    r261844, r261845, r261846, r262194, r262522, r262559

r258046:
Fix a typo on a comment in ofw_bus_if.m, the default method will return -1
when a node doesn't exist.

r258047:
Move the KASSERT() check to the point before the increase of number of pins.

r258050:
Fix gpiobus to return BUS_PROBE_GENERIC insted of BUS_PROBE_SPECIFIC (0) so
it can be overriden by its OFW/FDT version.

Give a chance for GPIO devices that implement the device_identify method to
attach.

r259035:
Remove unnecessary includes and an unused softc variable.  While here apply
two minor style(9) fixes.

r259036:
Move the GPIOBUS_SET_PINFLAGS(..., ..., pin, GPIO_PIN_OUTPUT) to led(4)
control callback function.  This makes gpioled(4) works even if the pin
is accidentally set to an input.

r259037:
Fix the pin value reading on AM335x.  Because of the inverted logic it was
always returning '0' for all the reads, even for the outputs.  It is now
known to work with gpioiic(4) and gpioled(4).

r261842:
Add an OFW GPIO compatible bus.  This allows the use of the DTS files to
describe GPIO bindings in the system.

Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between
the OFW and the non OFW versions of GPIO bus.

Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus.

r261843:
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.

r261844:
Allow the use of OFW I2C bus together with iicbb(4) on OFW-based systems.

This change makes ofw_iicbus attach to iicbb(4) controllers in addition to
the already supported i2c host bridges (iichb).

On iicbb(4) allow the direct access of the OFW parent node by its children,
so they can be directly attached to iicbb(4) node on the DTS without the
need of describing the i2c bus.

r261845:
Allow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio.  With this
change the gpio children can be described as directly connected to the GPIO
controller without the need of describing the OFW GPIO bus itself on the
DTS file.

With this commit the OFW GPIO bus is fully functional on BBB and RPi.

GPIO controllers which want to use the OFW GPIO bus will need similar
changes.

r261846:
Make the gpioled(4) work out of the box on BBB.

Add gpioled(4) to BEAGLEBONE kernel and add the description of the four
on-board leds of beaglebone-black to its DTS file.

r262194:
Remove an unnecessary header.

r262522:
Fix make depend for iicbus.

r262559:
Inspired by r262522, fix make depend.  This fixes the build of gpio modules.
</content>
</entry>
<entry>
<title>Minor printf nit to keep out clean</title>
<updated>2013-09-05T16:38:26Z</updated>
<author>
<name>Sean Bruno</name>
<email>sbruno@FreeBSD.org</email>
</author>
<published>2013-09-05T16:38:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7befb5c2ca43357499d2dab89ee93d33aa747fcb'/>
<id>urn:sha1:7befb5c2ca43357499d2dab89ee93d33aa747fcb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Properly free gpiobus ivars when gpiobus_parse_pins() fails and also on</title>
<updated>2013-08-28T14:39:24Z</updated>
<author>
<name>Luiz Otavio O Souza</name>
<email>loos@FreeBSD.org</email>
</author>
<published>2013-08-28T14:39:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=72405c6be0d226b34c5fb386563d4e8799b14c12'/>
<id>urn:sha1:72405c6be0d226b34c5fb386563d4e8799b14c12</id>
<content type='text'>
gpiobus detachment.

Suggested by:	imp
Approved by:	adrian (mentor)
</content>
</entry>
<entry>
<title>Style fixes</title>
<updated>2012-11-23T19:20:38Z</updated>
<author>
<name>Oleksandr Tymoshenko</name>
<email>gonzo@FreeBSD.org</email>
</author>
<published>2012-11-23T19:20:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=12ad19bc4c5752d57b49545c5ea297e13e2837b0'/>
<id>urn:sha1:12ad19bc4c5752d57b49545c5ea297e13e2837b0</id>
<content type='text'>
- Remove C++ - style comments
- Use proper device name in panic messages
</content>
</entry>
<entry>
<title>Remove extra semicolon which rendered condition useless</title>
<updated>2012-04-02T00:11:26Z</updated>
<author>
<name>Oleksandr Tymoshenko</name>
<email>gonzo@FreeBSD.org</email>
</author>
<published>2012-04-02T00:11:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6de0a4fa8472c68e962360ed6acb2efcacde74fa'/>
<id>urn:sha1:6de0a4fa8472c68e962360ed6acb2efcacde74fa</id>
<content type='text'>
Submitted by:	Stefan Farfelder &lt;stefanf@FreeBSD.org&gt;
</content>
</entry>
<entry>
<title>Fix broken locking that I introduced in the previous commit.</title>
<updated>2011-12-20T03:25:11Z</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2011-12-20T03:25:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=74ab90b71e5ad299fc091c031768d591358bde0f'/>
<id>urn:sha1:74ab90b71e5ad299fc091c031768d591358bde0f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove these locks - they aren't strictly needed and cause measurable</title>
<updated>2011-12-20T00:33:56Z</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2011-12-20T00:33:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ddd769915176624255a282659b72ba2cd4c2a07a'/>
<id>urn:sha1:ddd769915176624255a282659b72ba2cd4c2a07a</id>
<content type='text'>
performance issues.

* Access to the GPIO bus is already locked by requesting
  and releasing the bus - thus the lock isn't really needed
  for each GPIO pin change.
* Don't lock and unlock the GPIO bus for -each- i2c access -
  the i2c bus code is already doing this by calling the upper
  layer callback to request/release the bus. This thus locks
  the bus for the entirety of the transaction.

TODO:

* Further verify that everything is correctly requesting/
  releasing the GPIO bus.
* Look at how to lock the GPIO pin configuration stuff,
  potentially by locking/unlocking the bus at the gpiobus
  layer.
</content>
</entry>
<entry>
<title>Modify the GPIO i2c bus code to allow for arbitrary data/clock</title>
<updated>2011-12-04T12:10:24Z</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2011-12-04T12:10:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=935225501b55c7030652af3b0040ac0a3e05a585'/>
<id>urn:sha1:935225501b55c7030652af3b0040ac0a3e05a585</id>
<content type='text'>
pins, rather than defaulting to 0 and 1.

This way the pin order can be reversed.  It is reversed with the
TP-Link TL-WR1043nd.

Submitted by:	Stefan Bethke &lt;stb@lassitu.de&gt;
</content>
</entry>
</feed>
