Skip to content

Commit 7ce4027

Browse files
ndreyslinusw
authored andcommitted
gpio: of: Check for "spi-cs-high" in child instead of parent node
"spi-cs-high" is going to be specified in child node of an SPI controller's representing attached SPI device, so change the code to look for it there, instead of checking parent node. 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 e5545c9 commit 7ce4027

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpio/gpiolib-of.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,16 @@ static void of_gpio_flags_quirks(struct device_node *np,
143143
* conflict and the "spi-cs-high" flag will
144144
* take precedence.
145145
*/
146-
if (of_property_read_bool(np, "spi-cs-high")) {
146+
if (of_property_read_bool(child, "spi-cs-high")) {
147147
if (*flags & OF_GPIO_ACTIVE_LOW) {
148148
pr_warn("%s GPIO handle specifies active low - ignored\n",
149-
of_node_full_name(np));
149+
of_node_full_name(child));
150150
*flags &= ~OF_GPIO_ACTIVE_LOW;
151151
}
152152
} else {
153153
if (!(*flags & OF_GPIO_ACTIVE_LOW))
154154
pr_info("%s enforce active low on chipselect handle\n",
155-
of_node_full_name(np));
155+
of_node_full_name(child));
156156
*flags |= OF_GPIO_ACTIVE_LOW;
157157
}
158158
break;

0 commit comments

Comments
 (0)