]> git.ipfire.org Git - thirdparty/u-boot.git/commit
usb: onboard-hub: Use devm API do automatically free the reset GPIO
authorLukasz Czechowski <lukasz.czechowski@thaumatec.com>
Tue, 22 Jul 2025 09:55:34 +0000 (11:55 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 30 Jul 2025 13:57:17 +0000 (07:57 -0600)
commit480753ca92352e69a08455ad487089388fac9d88
treeca197287e982cd9ef329604a3d7afc88e24e6015
parenta4446e13dba65f2e56e0d7a97875f76e5199015c
usb: onboard-hub: Use devm API do automatically free the reset GPIO

The reset GPIO is obtained during driver probing by the function
devm_gpiod_get_optional, which means the GPIO will be automatically
freed when the device is removed. Because of this, explicit call
to free the reset GPIO in hub remove function is not needed.
To support the Managed device resources, the DEVRES config must
be enabled, otherwise the devres functions fall back to non-managed
variants. Set the necessary dependency to DEVRES in Kconfig.

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
common/usb_onboard_hub.c
drivers/usb/Kconfig