public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] regulator: max1586 add device-tree support
Date: Tue, 17 Jun 2014 21:16:52 +0200	[thread overview]
Message-ID: <87oaxrs5wb.fsf@free.fr> (raw)
In-Reply-To: <20140617144323.GU5099@sirena.org.uk> (Mark Brown's message of "Tue, 17 Jun 2014 15:43:23 +0100")

Mark Brown <broonie@kernel.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

  reply	other threads:[~2014-06-17 19:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-14 14:54 [PATCH 1/2] regulator: max1586 add device-tree support Robert Jarzmik
2014-06-14 14:54 ` [PATCH 2/2] " Robert Jarzmik
2014-06-17 14:43 ` [PATCH 1/2] " Mark Brown
2014-06-17 19:16   ` Robert Jarzmik [this message]
2014-06-24 15:38     ` Mark Brown
2014-06-24 18:05       ` Robert Jarzmik
2014-06-24 23:15         ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oaxrs5wb.fsf@free.fr \
    --to=robert.jarzmik@free.fr \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox