[PATCH v3 2/5] usb: onboard-hub: Use devm API do automatically free the reset GPIO

Quentin Schulz quentin.schulz at cherry.de
Tue Jun 24 17:30:51 CEST 2025


Hi Lukasz,

On 6/10/25 10:02 AM, Lukasz Czechowski wrote:
> 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.
> 
> Signed-off-by: Lukasz Czechowski <lukasz.czechowski at thaumatec.com>

Reviewed-by: Quentin Schulz <quentin.schulz at cherry.de>

Thanks!
Quentin


More information about the U-Boot mailing list