Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1477157
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] usb: phy: generic: request regulator optionally |
| Date | 2016-09-06 10:30 +0200 |
| Message-ID | <sejVw-7Vd-31@gated-at.bofh.it> (permalink) |
| References | <sdxea-6cu-3@gated-at.bofh.it> <sejiN-7mF-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Tue, Sep 06, 2016 at 10:45:19AM +0300, Felipe Balbi wrote:
> Stefan Agner <stefan@agner.ch> writes:
> > According to the device tree bindings the vcc-supply is optional.
This is nonsense unless the device can work without this supply. Given
that the supply is called VCC that doesn't seem entirely likely.
> > + nop->vcc = devm_regulator_get_optional(dev, "vcc");
> > if (IS_ERR(nop->vcc)) {
> > dev_dbg(dev, "Error getting vcc regulator: %ld\n",
> > PTR_ERR(nop->vcc));
> > - if (needs_vcc)
> > - return -EPROBE_DEFER;
> > + if (needs_vcc || PTR_ERR(nop->vcc) == -EPROBE_DEFER)
> > + return PTR_ERR(nop->vcc);
> does this look okay from a regulator API perspective?
That's how to use _get_optional() but it's really unusual that you
should be using _get_optional().
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] usb: phy: generic: request regulator optionally Stefan Agner <stefan@agner.ch> - 2016-09-04 06:30 +0200
Re: [PATCH] usb: phy: generic: request regulator optionally Felipe Balbi <balbi@kernel.org> - 2016-09-06 09:50 +0200
Re: [PATCH] usb: phy: generic: request regulator optionally Mark Brown <broonie@kernel.org> - 2016-09-06 10:30 +0200
Re: [PATCH] usb: phy: generic: request regulator optionally Stefan Agner <stefan@agner.ch> - 2016-09-06 20:10 +0200
Re: [PATCH] usb: phy: generic: request regulator optionally Roger Quadros <rogerq@ti.com> - 2016-09-07 09:30 +0200
Re: [PATCH] usb: phy: generic: request regulator optionally Felipe Balbi <balbi@kernel.org> - 2016-09-07 10:10 +0200
Re: [PATCH] usb: phy: generic: request regulator optionally Mark Brown <broonie@kernel.org> - 2016-09-07 21:00 +0200
Re: [PATCH] usb: phy: generic: request regulator optionally Stefan Agner <stefan@agner.ch> - 2016-09-07 22:50 +0200
csiph-web