Commit c052c19e authored by Mikko Ylinen's avatar Mikko Ylinen Committed by Tony Lindgren

OMAP: Store switch state for OUTPUT gpio-switches

Signed-off-by: default avatarMikko Ylinen <mikko.k.ylinen@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 2d46b9c9
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment