]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r273917, r273926:
authorloos <loos@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 14 Feb 2015 20:50:38 +0000 (20:50 +0000)
committerloos <loos@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 14 Feb 2015 20:50:38 +0000 (20:50 +0000)
commit96df5b93b3c72febc67511314a2325935191b112
tree8948970c7a88dd89a375a1618b99ec175f8364ab
parente9ecd5061a03258753e7d1a4594a2e78caa974e4
MFC r273917, r273926:

Fix the gpiobus locking by using a more sane model where it isn't necessary
hold the gpiobus lock between the gpio calls.

gpiobus_acquire_lock() now accepts a third parameter which tells gpiobus
what to do when the bus is already busy.

When GPIOBUS_WAIT wait is used, the calling thread will be put to sleep
until the bus became free.

With GPIOBUS_DONTWAIT the calling thread will receive EWOULDBLOCK right
away and then it can act upon.

This fixes the gpioiic(4) locking issues that arises when doing multiple
concurrent access on the bus.

Fix the build of non-FDT systems by moving the gpiobusvar.h header outside
the FDT #ifdef.

While here remove a few unused headers.

git-svn-id: svn://svn.freebsd.org/base/stable/10@278783 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/gpio/gpiobus.c
sys/dev/gpio/gpiobus_if.m
sys/dev/gpio/gpiobusvar.h
sys/dev/gpio/gpioiic.c
sys/dev/gpio/gpioled.c