A single fixup for the SPI CS gpios that regressed

in the current kernel cycle.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJdHJ83AAoJEEEQszewGV1zStUP/joc3S0VFFVXQjCxzZysQbpw
 cea8SVMOvhaDYp+lQugDIqyYQsSbD+kstozHNsyL1rgRoL5WWESrA65acmDIuEaO
 C30uqg6C/MJ9VgTg0m0DKLCWpfz8ZCTsfah8Ln8l1uYOmBNdK5dpzx5YZT+Ir3m5
 a+NoH77t1xRERrtiFjwYLgZB1/HX6FCTF6xglSX8ni1TL1yyMzLBBcd8+EA/TFWY
 ngXy/bnJKixPDVPTFspXQl3+8QwerHMmXxxs02vDpYW3wVDJiOvrHa/63tMswPce
 3K2Ir1tHkU2EhbdY0Dr9xEDFbXF3jGsN6Na1Xb/shlYMT7v5wp99eLPwV32sAGzu
 NWDxPezPmbm1dzMmjodh8rh57Tuy4wTFPZoo0El2xHmmphB5lcL7IfqpqTZ0zP/y
 3/7tQePtcvT0NmDC7HLQjqeoEwBenTA7m5jUO0GJ2++T0FbE3wLH/7Q4IX1L8W9S
 BFXiejhDVbkWwjPpq6MbXEtfaDGDFrWb8mgvY/H3iTzGtl5z6lALtFC12eyQWiqs
 bz/YnrFyAcf2ZlCoLQzoWnN4TDXIEA5bdhaQIswVkwOhPCYq9qb9YrX7MI++vRnh
 soIWZ0I84Vl5oKdTq78OJUggHiTI5rJA5xQaUtqOIDD+HoXWr7Sb6H2aUda9uP0Y
 jD8KvOJnZNUGxkt5IdiQ
 =C8n2
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2019-07-04 09:59:08 +09:00
commit 179c96d9f7

View File

@ -118,8 +118,15 @@ static void of_gpio_flags_quirks(struct device_node *np,
* Legacy handling of SPI active high chip select. If we have a
* property named "cs-gpios" we need to inspect the child node
* to determine if the flags should have inverted semantics.
*
* This does not apply to an SPI device named "spi-gpio", because
* these have traditionally obtained their own GPIOs by parsing
* the device tree directly and did not respect any "spi-cs-high"
* property on the SPI bus children.
*/
if (IS_ENABLED(CONFIG_SPI_MASTER) && !strcmp(propname, "cs-gpios") &&
if (IS_ENABLED(CONFIG_SPI_MASTER) &&
!strcmp(propname, "cs-gpios") &&
!of_device_is_compatible(np, "spi-gpio") &&
of_property_read_bool(np, "cs-gpios")) {
struct device_node *child;
u32 cs;