]> git.baikalelectronics.ru Git - kernel.git/commit
gpio/mmc/of: Respect polarity in the device tree
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 17 Dec 2018 21:36:25 +0000 (22:36 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 17 Dec 2018 22:31:07 +0000 (23:31 +0100)
commit9ce5c63fc69bd552a85c28bd46434f37182fef2f
treefa49fb40f088e9cef1b606228a6d3ac91dd8e71c
parent7657ee884c3d81bdd591a932a7d11e3e0d8472d8
gpio/mmc/of: Respect polarity in the device tree

The device tree bindings for the MMC card detect and
write protect lines specify that these should be active
low unless "cd-inverted" or "wp-inverted" has been
specified.

However that is not how the kernel code has worked. It
has always respected the flags passed to the phandle in
the device tree, but respected the "cd-inverted" and
"wp-inverted" flags such that if those are set, the
polarity will be the inverse of that specified in the
device tree.

Switch to behaving like the old code did and fix the
regression.

Fixes: d8919201ee9b ("gpio: OF: Parse MMC-specific CD and WP properties")
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-of.c