Skip to contentSkip to conversation

gpiolib: Make deferral warnings debug messages

PATCH Applied Jon Hunter 3 participants 4 messages Apr 1 – Apr 3

Subsystems (2)
lore
Share & tools
lore

Jon Hunter

author maintainer
#0 lore raw

PATCH 1/1 gpiolib: Make deferral warnings debug messages

With the recent addition of the shared GPIO support, warning messages such as the following are being observed ...

reg-fixed-voltage regulator-vdd-3v3-pcie: cannot find GPIO chip
gpiolib_shared.proxy.6, deferring

These are seen even with GPIO_SHARED_PROXY=y.

Given that the GPIOs are successfully found a bit later during boot and the code is intentionally returning -EPROBE_DEFER when they are not found, downgrade these messages to debug prints to avoid unnecessary warnings being observed.

Note that although the 'cannot find GPIO line' warning has not been observed in this case, it seems reasonable to make this print a debug print for consistency too.

---
 drivers/gpio/gpiolib.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpio/gpiolib.c +4 -4
index 96c776ff2669..1e6dce430dca 100644
@@ -4624,8 +4624,8 @@ static struct gpio_desc *gpio_desc_table_match(struct device *dev, const char *c
 				return desc;
 			}
 
-			dev_warn(dev, "cannot find GPIO line %s, deferring\n",
-				 p->key);
+			dev_dbg(dev, "cannot find GPIO line %s, deferring\n",
+				p->key);
 			return ERR_PTR(-EPROBE_DEFER);
 		}
 
@@ -4639,8 +4639,8 @@ static struct gpio_desc *gpio_desc_table_match(struct device *dev, const char *c
 			 * consumer be probed again or let the Deferred
 			 * Probe infrastructure handle the error.
 			 */
-			dev_warn(dev, "cannot find GPIO chip %s, deferring\n",
-				 p->key);
+			dev_dbg(dev, "cannot find GPIO chip %s, deferring\n",
+				p->key);
 			return ERR_PTR(-EPROBE_DEFER);
 		}
 
Signature · 1 line
2.43.0
#1 lore raw
Quoted 14 lines · Jon Hunter

With the recent addition of the shared GPIO support, warning messages such as the following are being observed ...

reg-fixed-voltage regulator-vdd-3v3-pcie: cannot find GPIO chip
gpiolib_shared.proxy.6, deferring

These are seen even with GPIO_SHARED_PROXY=y.

Given that the GPIOs are successfully found a bit later during boot and the code is intentionally returning -EPROBE_DEFER when they are not found, downgrade these messages to debug prints to avoid unnecessary warnings being observed.

Quoted 6 lines

Note that although the 'cannot find GPIO line' warning has not been observed in this case, it seems reasonable to make this print a debug print for consistency too.

---

Yes, this makes sense. FYI I also have a grand plan of introducing support for fw_devlink for software nodes and assigning them to shared proxies with the aim of them respecting the probe order that way.

Bart

author maintainer
#2 lore raw
Quoted 9 lines · Bartosz Golaszewski
Quoted 8 lines · Jon Hunter

With the recent addition of the shared GPIO support, warning messages such as the following are being observed ...

reg-fixed-voltage regulator-vdd-3v3-pcie: cannot find GPIO chip
gpiolib_shared.proxy.6, deferring

These are seen even with GPIO_SHARED_PROXY=y.

I meant CONFIG_GPIO_SHARED_PROXY=y here :-)

Let me know if you want me to send an updated version?

Quoted 10 lines
Quoted 10 lines

Given that the GPIOs are successfully found a bit later during boot and the code is intentionally returning -EPROBE_DEFER when they are not found, downgrade these messages to debug prints to avoid unnecessary warnings being observed.

Note that although the 'cannot find GPIO line' warning has not been observed in this case, it seems reasonable to make this print a debug print for consistency too.

Quoted 6 lines
Quoted 2 lines

---

Yes, this makes sense. FYI I also have a grand plan of introducing support for fw_devlink for software nodes and assigning them to shared proxies with the aim of them respecting the probe order that way.

OK, good to know.

Thanks
Jon

Signature · 1 line
nvpublic
#3 lore raw
In reply to Jon Hunter
Quoted 9 lines · Jon Hunter

With the recent addition of the shared GPIO support, warning messages such as the following are being observed ...

reg-fixed-voltage regulator-vdd-3v3-pcie: cannot find GPIO chip
gpiolib_shared.proxy.6, deferring

These are seen even with GPIO_SHARED_PROXY=y.

[...]

Applied, thanks!

[1/1] gpiolib: Make deferral warnings debug messages

      https://git.kernel.org/brgl/c/c0cd31bc3a92ac04147660a3821780f57b76bf1f

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>