* [bug] regulator: fixed, gpio: probe fails on unset regulator-name
@ 2017-03-03 21:20 Harald Geyer
2017-03-06 10:15 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Harald Geyer @ 2017-03-03 21:20 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Heiko Stuebner; +Cc: linux-kernel
Hi!
Documentation/devicetree/bindings/regulator/regulator.txt says that the
regulator-name property is optional. However fixed and gpio regulators
fail in probe with the following message, if the property is not
present:
| reg-fixed-voltage regulators:sensor_supply: Failed to allocate supply
name
| reg-fixed-voltage: probe of regulators:sensor_supply failed with
error -12
This is caused by the following code in both drivers:
drvdata->desc.name = devm_kstrdup(&pdev->dev,
config->supply_name,
GFP_KERNEL);
if (drvdata->desc.name == NULL) {
dev_err(&pdev->dev, "Failed to allocate supply
name\n");
return -ENOMEM;
}
If config->supply_name == NULL, then devm_kstrdup() also returns NULL.
I don't know whether the binding document or the implementation is
wrong,
so can't propose a fix for this. Sorry.
TIA,
Harald
--
If you want to support my work:
see http://friends.ccbib.org/harald/supporting/
or donate via peercoin to P98LRdhit3gZbHDBe7ta5jtXrMJUms4p7w
or CLAM xASPBtezLNqj4cUe8MT5nZjthRSEjrRQXN
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug] regulator: fixed, gpio: probe fails on unset regulator-name
2017-03-03 21:20 [bug] regulator: fixed, gpio: probe fails on unset regulator-name Harald Geyer
@ 2017-03-06 10:15 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2017-03-06 10:15 UTC (permalink / raw)
To: Harald Geyer; +Cc: Liam Girdwood, Heiko Stuebner, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 329 bytes --]
On Fri, Mar 03, 2017 at 10:20:44PM +0100, Harald Geyer wrote:
> I don't know whether the binding document or the implementation is wrong,
> so can't propose a fix for this. Sorry.
The documentation for the fixed and GPIO regulators needs to be updated,
it the property is optional for general regulators but required for
them.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-06 10:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-03 21:20 [bug] regulator: fixed, gpio: probe fails on unset regulator-name Harald Geyer
2017-03-06 10:15 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.