Skip to content

Commit e5545c9

Browse files
ndreyslinusw
authored andcommitted
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>
1 parent 3b55cb8 commit e5545c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpio/gpiolib-of.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ static void of_gpio_flags_quirks(struct device_node *np,
120120
* to determine if the flags should have inverted semantics.
121121
*/
122122
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")) {
124125
struct device_node *child;
125126
u32 cs;
126127
int ret;

0 commit comments

Comments
 (0)