linux-stable/drivers/net/dsa/qca
Michal Vokáč c44fc98f0a net: dsa: qca8k: fix illegal usage of GPIO
When working with GPIO, its direction must be set either when the GPIO is
requested by gpiod_get*() or later on by one of the gpiod_direction_*()
functions. Neither of this is done here which results in undefined
behavior on some systems.

As the reset GPIO is used right after it is requested here, it makes sense
to configure it as GPIOD_OUT_HIGH right away. With that, the following
gpiod_set_value_cansleep(1) becomes redundant and can be safely
removed.

Fixes: a653f2f538 ("net: dsa: qca8k: introduce reset via gpio feature")
Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/1706266175-3408-1-git-send-email-michal.vokac@ysoft.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-01-29 18:14:07 -08:00
..
Kconfig net: dsa: qca8k: add CONFIG_LEDS_TRIGGERS dependency 2023-06-02 10:55:41 +01:00
Makefile net: dsa: qca8k: add LEDs basic support 2023-04-19 12:59:15 +01:00
ar9331.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-07-20 15:52:55 -07:00
qca8k-8xxx.c net: dsa: qca8k: fix illegal usage of GPIO 2024-01-29 18:14:07 -08:00
qca8k-common.c net: Convert some ethtool_sprintf() to ethtool_puts() 2023-12-08 10:56:25 +00:00
qca8k-leds.c net: dsa: qca8k: assign ds->user_mii_bus only for the non-OF case 2024-01-05 11:56:35 +00:00
qca8k.h net: dsa: qca8k: assign ds->user_mii_bus only for the non-OF case 2024-01-05 11:56:35 +00:00
qca8k_leds.h net: dsa: qca8k: add LEDs basic support 2023-04-19 12:59:15 +01:00