mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
gpiolib: use of_node_name if line-name is missing
Until v7.0, GPIO hogs inherited the DT node name when no line-name property was specified. This was implemented as a fallback in of_parse_own_gpio(). Commitd1d564ec49("gpio: move hogs into GPIO core") moved hog parsing into the GPIO core and removed this fallback. Consequently, GPIO hogs without a line-name property are now displayed with a ? in /sys/kernel/debug/gpio. Restore the old fallback. Fixes:d1d564ec49("gpio: move hogs into GPIO core") Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260917153712.134367-1-linux@fw-web.de Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
This commit is contained in:
parent
02af7eac17
commit
d54a489c8c
|
|
@ -1029,6 +1029,13 @@ int gpiochip_add_hog(struct gpio_chip *gc, struct fwnode_handle *fwnode)
|
|||
ret = of_gpiochip_get_lflags(gc, &gpiospec, &lflags);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* If no line-name property is present, fall back to the OF
|
||||
* node name as in the previous implementation.
|
||||
*/
|
||||
if (!name)
|
||||
name = to_of_node(fwnode)->name;
|
||||
} else {
|
||||
/*
|
||||
* GPIO_ACTIVE_LOW is currently the only lookup flag
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user