diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-03 20:59:08 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-03 20:59:08 -0400 |
| commit | 179c96d9f715a619811ded5dcbd35b1fee8caf69 (patch) | |
| tree | 363b8b1b377eb919cf40ec77da58cb6d0f08dbef | |
| parent | eca94432934fe5f141d084f2e36ee2c0e614cc04 (diff) | |
| parent | fbbf145a0e0a0177e089c52275fbfa55763e7d1d (diff) | |
Merge tag 'gpio-v5.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO fix from Linus Walleij:
"A single fixup for the SPI CS gpios that regressed in the current
kernel cycle"
* tag 'gpio-v5.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
gpio/spi: Fix spi-gpio regression on active high CS
| -rw-r--r-- | drivers/gpio/gpiolib-of.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index aec7bd86ae7e..9c9b965d7d6d 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c | |||
| @@ -118,8 +118,15 @@ static void of_gpio_flags_quirks(struct device_node *np, | |||
| 118 | * Legacy handling of SPI active high chip select. If we have a | 118 | * Legacy handling of SPI active high chip select. If we have a |
| 119 | * property named "cs-gpios" we need to inspect the child node | 119 | * property named "cs-gpios" we need to inspect the child node |
| 120 | * to determine if the flags should have inverted semantics. | 120 | * to determine if the flags should have inverted semantics. |
| 121 | * | ||
| 122 | * This does not apply to an SPI device named "spi-gpio", because | ||
| 123 | * these have traditionally obtained their own GPIOs by parsing | ||
| 124 | * the device tree directly and did not respect any "spi-cs-high" | ||
| 125 | * property on the SPI bus children. | ||
| 121 | */ | 126 | */ |
| 122 | if (IS_ENABLED(CONFIG_SPI_MASTER) && !strcmp(propname, "cs-gpios") && | 127 | if (IS_ENABLED(CONFIG_SPI_MASTER) && |
| 128 | !strcmp(propname, "cs-gpios") && | ||
| 129 | !of_device_is_compatible(np, "spi-gpio") && | ||
| 123 | of_property_read_bool(np, "cs-gpios")) { | 130 | of_property_read_bool(np, "cs-gpios")) { |
| 124 | struct device_node *child; | 131 | struct device_node *child; |
| 125 | u32 cs; | 132 | u32 cs; |
