Date: Fri, 6 Dec 2013 18:09:11 +0000 (UTC) From: Luiz Otavio O Souza <loos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259037 - head/sys/arm/ti Message-ID: <201312061809.rB6I9BwM067566@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312061809.rB6I9BwM067566>