diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-03-26 02:32:08 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-03-28 12:06:58 -0400 |
commit | e5545c94e43b8f6599ffc01df8d1aedf18ee912a (patch) | |
tree | 50832a9df8973a90546a4e52637732d732639f5f | |
parent | 3b55cb88c3898239ebbca86372ece1d145013010 (diff) |
gpio: of: Check propname before applying "cs-gpios" quirks
SPI GPIO device has more than just "cs-gpio" property in its node and
would request those GPIOs as a part of its initialization. To avoid
applying CS-specific quirk to all of them add a check to make sure
that propname is "cs-gpios".
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: linux-gpio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/gpio/gpiolib-of.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 8b9c3ab70f6e..ee7f08386a72 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c | |||
@@ -120,7 +120,8 @@ static void of_gpio_flags_quirks(struct device_node *np, | |||
120 | * to determine if the flags should have inverted semantics. | 120 | * to determine if the flags should have inverted semantics. |
121 | */ | 121 | */ |
122 | if (IS_ENABLED(CONFIG_SPI_MASTER) && | 122 | if (IS_ENABLED(CONFIG_SPI_MASTER) && |
123 | of_property_read_bool(np, "cs-gpios")) { | 123 | of_property_read_bool(np, "cs-gpios") && |
124 | !strcmp(propname, "cs-gpios")) { | ||
124 | struct device_node *child; | 125 | struct device_node *child; |
125 | u32 cs; | 126 | u32 cs; |
126 | int ret; | 127 | int ret; |