From c052c19e7cd98ab9a464832736a67cb395628a78 Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Mon, 30 Jun 2008 16:32:54 +0300 Subject: [PATCH] OMAP: Store switch state for OUTPUT gpio-switches Signed-off-by: Mikko Ylinen Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/gpio-switch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-omap/gpio-switch.c b/arch/arm/plat-omap/gpio-switch.c index cd96c00ff4a..7a61d0e185a 100644 --- a/arch/arm/plat-omap/gpio-switch.c +++ b/arch/arm/plat-omap/gpio-switch.c @@ -131,11 +131,12 @@ static ssize_t gpio_sw_state_store(struct device *dev, str = get_sw_str(sw); if (strcmp(state, str[0]) == 0) - enable = 0; + sw->state = enable = 0; else if (strcmp(state, str[1]) == 0) - enable = 1; + sw->state = enable = 1; else return -EINVAL; + if (sw->flags & OMAP_GPIO_SWITCH_FLAG_INVERTED) enable = !enable; omap_set_gpio_dataout(sw->gpio, enable); -- 2.41.1