ar71xx: Hornet UB GPIO WPS/Reset
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 12 Mar 2015 10:06:42 +0000 (10:06 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 12 Mar 2015 10:06:42 +0000 (10:06 +0000)
commitbeed4d82d6a0154b0cd5f7b84e2180215ace6718
tree3d7009d422af7321a658d5220e627cb9d4383993
parente081e26a71f65c1a96a4620ecbda11dc2b21f9f2
ar71xx: Hornet UB GPIO WPS/Reset

This problem has existed at least since Attitude Adjustment and
is also present in trunk. Basically on the Hornet-UB board the
functionality of RESET and WPS have "switched places".

There are two tickets about the issue at dev.openwrt.org,
The solution suggested on them both is incomplete though
and introduces the following proglem:

Patching as suggested on #14136/#15282 will result in a situation
where simply pressing the RESET button on the bottom will cause
FACTORY RESET to be run. This is due to GPIO high/low state being
incorrect as a result of the above change and virtually the RESET
button is in the pressed-down state the entire time. When it is
then physically pressed, that causes the opposite, release, to be
triggered and since to the board it seemed that the button was
pressed long before it was released, the FACTORY RESET results.

The attached patch works as expected. I have verified both the
incorrect functionality as well as after fixing the issue as
described in the patch and flashing the resulting firmware to a
Hornet-UB board.

Signed-off-by: Janne Cederberg <janne.cederberg@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44692 3c298f89-4303-0410-b956-a3cf2f4a3e73
target/linux/ar71xx/files/arch/mips/ath79/mach-hornet-ub.c