diff options
| author | Andrey Smirnov <[email protected]> | 2019-03-26 06:32:08 +0000 |
|---|---|---|
| committer | Linus Walleij <[email protected]> | 2019-03-28 16:06:58 +0000 |
| commit | e5545c94e43b8f6599ffc01df8d1aedf18ee912a (patch) | |
| tree | 50832a9df8973a90546a4e52637732d732639f5f /drivers/gpio/gpiolib-of.c | |
| parent | Merge tag 'gpio-5.1-rc2-fixes-for-linus' of git://git.kernel.org/pub/scm/linu... (diff) | |
| download | kernel-e5545c94e43b8f6599ffc01df8d1aedf18ee912a.tar.gz kernel-e5545c94e43b8f6599ffc01df8d1aedf18ee912a.zip | |
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 <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Chris Healy <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'drivers/gpio/gpiolib-of.c')
| -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, * to determine if the flags should have inverted semantics. */ if (IS_ENABLED(CONFIG_SPI_MASTER) && - of_property_read_bool(np, "cs-gpios")) { + of_property_read_bool(np, "cs-gpios") && + !strcmp(propname, "cs-gpios")) { struct device_node *child; u32 cs; int ret; |
