From: Roger Quadros <quadros.roger@gmail.com>
To: pHilipp Zabel <philipp.zabel@gmail.com>
Cc: broonie@sirena.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] regulator: Add GPIO enable control to fixed voltage regulator driver
Date: Mon, 3 Aug 2009 12:15:57 +0300 [thread overview]
Message-ID: <b90c0690908030215j3f0fb6a6u322a079795193652@mail.gmail.com> (raw)
In-Reply-To: <74d0deb30908021049u191b3f9fj5230193535965ff7@mail.gmail.com>
On Sun, Aug 2, 2009 at 8:49 PM, pHilipp Zabel<philipp.zabel@gmail.com> wrote:
> On Sun, Aug 2, 2009 at 6:56 PM, Roger Quadros<quadros.roger@gmail.com> wrote:
>> From: Roger Quadros <ext-roger.quadros@nokia.com>
>>
>> +
>> + /* set output direction without changing state
>> + * to prevent glitch
>> + */
>> + drvdata->is_enabled = config->enabled_at_boot;
>> + if (!config->enable_high)
>> + drvdata->is_enabled = !drvdata->is_enabled;
>
> Assume .enabled_at_boot = 1, .enable_high = 0. In this case we end up
> with .is_enabled = 0, which does not represent the real state after
> the following call:
>
>> + ret = gpio_direction_output(config->gpio, drvdata->is_enabled);
>
> Maybe use a local variable here or (drvdata->is_enabled ?
> config->enable_high : !config->enable_high).
>
> regards
> Philipp
>
Yes you are right.
next prev parent reply other threads:[~2009-08-03 9:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-02 16:56 Roger Quadros
2009-08-02 17:49 ` pHilipp Zabel
2009-08-03 9:15 ` Roger Quadros [this message]
2009-08-03 11:33 ` 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=b90c0690908030215j3f0fb6a6u322a079795193652@mail.gmail.com \
--to=quadros.roger@gmail.com \
--cc=broonie@sirena.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=philipp.zabel@gmail.com \
/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
all inboxes | Powered by JetHome®