[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87oaxrs5wb.fsf@free.fr>
Date: Tue, 17 Jun 2014 21:16:52 +0200
From: Robert Jarzmik <robert.jarzmik@...e.fr>
To: Mark Brown <broonie@...nel.org>
Cc: Liam Girdwood <lgirdwood@...il.com>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] regulator: max1586 add device-tree support
Mark Brown <broonie@...nel.org> writes:
> On Sat, Jun 14, 2014 at 04:54:24PM +0200, Robert Jarzmik wrote:
>
>> + matched = of_regulator_match(dev, np, rmatch, ARRAY_SIZE(rmatch));
>> + of_node_put(np);
>> + if (matched <= 0)
>> + return matched;
>
> Why is this treating zero as an error? We should be able to at least
> report the current state of regulators even if none are configured in
> the device tree.
Euh how so an error ?
If 0 is returned, this means no regulators are found in device-tree. It's not an
error, it's a lack of regulators (ie. no Output_V3 and no Output_V6), and no
more handling is necessary in this function, while returning "ok", ie 0 ...
As for the "state report", this max1586 doesn't report anything, it cannot even
be queried about the current voltage, sic ...
If you want me to modify this bit I need a bit more of an explanation to
understand.
Cheers.
--
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists