From: Andrew Bresticker Date: Wed, 16 Apr 2014 20:40:17 +0000 (-0700) Subject: pinctrl: as3722: fix handling of GPIO invert bit X-Git-Tag: omap-for-v3.16/pm-signed~24^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a73d2e30b46787d478275db36c19222020e29dc5;p=pandora-kernel.git pinctrl: as3722: fix handling of GPIO invert bit The AS3722_GPIO_INV bit will always be blindly overwritten by as3722_pinctrl_gpio_set_direction() and will be ignored when setting the value of the GPIO in as3722_gpio_set() since the enable_gpio_invert flag is never set. This will cause an initially inverted GPIO to toggle when requested as an output, which could be problematic if, for example, the GPIO controls a critical regulator. Instead of setting up the enable_gpio_invert flag, just leave the invert bit alone and check it before setting the GPIO value. Cc: # v3.14+ Signed-off-by: Andrew Bresticker Reviewed-by: Stephen Warren Tested-by: Stephen Warren Acked-by: Laxman Dewangan Signed-off-by: Linus Walleij --- Reading git-diff-tree failed