svn commit: r259037 - head/sys/arm/ti
Luiz Otavio O Souza
loos at FreeBSD.org
Fri Dec 6 18:09:11 UTC 2013
Author: loos
Date: Fri Dec 6 18:09:10 2013
New Revision: 259037
URL: http://svnweb.freebsd.org/changeset/base/259037
Log:
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).
Approved by: adrian (mentor)
Tested on: BBB
Modified:
head/sys/arm/ti/ti_gpio.c
Modified: head/sys/arm/ti/ti_gpio.c
==============================================================================
--- head/sys/arm/ti/ti_gpio.c Fri Dec 6 17:56:20 2013 (r259036)
+++ head/sys/arm/ti/ti_gpio.c Fri Dec 6 18:09:10 2013 (r259037)
@@ -543,9 +543,9 @@ ti_gpio_pin_get(device_t dev, uint32_t p
/* Read the value on the pin */
if (val & mask)
- *value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAOUT) & mask) ? 1 : 0;
- else
*value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAIN) & mask) ? 1 : 0;
+ else
+ *value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAOUT) & mask) ? 1 : 0;
TI_GPIO_UNLOCK(sc);
More information about the svn-src-head
mailing list