)]}' { "commit": "fbbf145a0e0a0177e089c52275fbfa55763e7d1d", "tree": "9677741c28c810e5680f7664f67aabb430b05e61", "parents": [ "4b972a01a7da614b4796475f933094751a295a2f" ], "author": { "name": "Linus Walleij", "email": "linus.walleij@linaro.org", "time": "Tue Jul 02 21:39:59 2019 +0200" }, "committer": { "name": "Linus Walleij", "email": "linus.walleij@linaro.org", "time": "Tue Jul 02 22:31:37 2019 +0200" }, "message": "gpio/spi: Fix spi-gpio regression on active high CS\n\nI ran into an intriguing bug caused by\ncommit \"\"spi: gpio: Don\u0027t request CS GPIO in DT use-case\"\naffecting all SPI GPIO devices with an active high\nchip select line.\n\nThe commit switches the CS gpio handling over to the GPIO\ncore, which will parse and handle \"cs-gpios\" from the OF\nnode without even calling down to the driver to get the\njob done.\n\nHowever the GPIO core handles the standard bindings in\nDocumentation/devicetree/bindings/spi/spi-controller.yaml\nthat specifies that active high CS needs to be specified\nusing \"spi-cs-high\" in the DT node.\n\nThe code in drivers/spi/spi-gpio.c never respected this\nand never tried to inspect subnodes to see if they contained\n\"spi-cs-high\" like the gpiolib OF quirks does. Instead the\nonly way to get an active high CS was to tag it in the\ndevice tree using the flags cell such as\ncs-gpios \u003d \u003c\u0026gpio 4 GPIO_ACTIVE_HIGH\u003e;\n\nThis alters the quirks to not inspect the subnodes of SPI\nmasters on \"spi-gpio\" for the standard attribute \"spi-cs-high\",\nmaking old device trees work as expected.\n\nThis semantic is a bit ambigous, but just allowing the\nflags on the GPIO descriptor to modify polarity is what\nthe kernel at large mostly uses so let\u0027s encourage that.\n\nFixes: 249e2632dcd0 (\"spi: gpio: Don\u0027t request CS GPIO in DT use-case\")\nCc: Andrey Smirnov \u003candrew.smirnov@gmail.com\u003e\nCc: linux-gpio@vger.kernel.org\nCc: linux-spi@vger.kernel.org\nSigned-off-by: Linus Walleij \u003clinus.walleij@linaro.org\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "aec7bd86ae7eaab69d4849f2c862301b7d3d7eb8", "old_mode": 33188, "old_path": "drivers/gpio/gpiolib-of.c", "new_id": "9c9b965d7d6dbcbc2ba0f11f16245d0b113ead70", "new_mode": 33188, "new_path": "drivers/gpio/gpiolib-of.c" } ] }