Thread (5 messages) 5 messages, 2 authors, 19d ago

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

flat view

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2026-09-21 21:59:39
Also in: linux-devicetree, linux-usb, lkml

W dniu 21.09.2026 o 23:41, Rosen Penev pisze:
quoted hunk ↗ jump to hunk
@@ -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?

quoted hunk ↗ jump to hunk
+	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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help