[PATCH 6/6] gpio: orion: register at coredevice level

Michael Grzeschik grzeschik at puzzle.ch
Tue Nov 3 13:31:12 PST 2026


On boards without deep probe, all devices are created at core_initcall
and each driver probes its devices when it registers. The orion GPIO
driver registered at device level, like its consumers, and drivers/led
and drivers/input are linked before drivers/gpio, so gpio-leds and
gpio-keys were always probed before the GPIO controllers existed:

  gpio-leds gpio-leds.of: error Requested probe deferral: getting gpio for /gpio-leds/led-level
  gpio_keys gpio_keys.of: error Requested probe deferral: requesting gpio #0

They succeeded on the deferred retry, but the messages look like errors
with a debug log level. Register at coredevice level like most other GPIO
controller drivers, so the controllers are there before their users.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Michael Grzeschik <grzeschik at puzzle.ch>
---
 drivers/gpio/gpio-orion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-orion.c b/drivers/gpio/gpio-orion.c
index 994ba1926e..7d9fd33312 100644
--- a/drivers/gpio/gpio-orion.c
+++ b/drivers/gpio/gpio-orion.c
@@ -132,4 +132,4 @@ static struct driver orion_gpio_driver = {
 	.probe = orion_gpio_probe,
 	.of_compatible = DRV_OF_COMPAT(orion_gpio_dt_ids),
 };
-device_platform_driver(orion_gpio_driver);
+coredevice_platform_driver(orion_gpio_driver);

-- 
2.53.0




More information about the barebox mailing list