[PATCHv2 1/2] usb: bcma: add regulator support

Rafał Miłecki zajec5 at gmail.com
Mon Sep 21 14:59:25 PDT 2026


W dniu 21.09.2026 o 23:41, Rosen Penev pisze:
> @@ -411,6 +422,14 @@ static int bcma_hcd_probe(struct bcma_device *core)
>   		return dev_err_probe(&core->dev, PTR_ERR(usb_dev->gpio_desc),
>   				     "error obtaining VCC GPIO");
>   
> +	usb_dev->regulator = devm_regulator_get(dev, "vbus");
> +	if (IS_ERR(usb_dev->regulator))
> +		return dev_err_probe(dev, PTR_ERR(usb_dev->regulator), "error obtaining VBUS regulator");

Did you test this for DT without VBUS? You seem to *require* regulator. Shouldn't you make it optional?


> +	err = regulator_enable(usb_dev->regulator);
> +	if (err)
> +		return dev_err_probe(dev, err, "error enabling VCC regulator");
> +

Can't you use one of devm helpers that get and enable regulator for you?



More information about the linux-arm-kernel mailing list