From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Bryan Wu <cooloney@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
Richard Purdie <rpurdie@rpsys.net>,
Linux LED Subsystem <linux-leds@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] leds: pwm: set polarity on non DT platforms
Date: Wed, 19 Mar 2014 00:09:46 +0100 [thread overview]
Message-ID: <20140318230946.GL12021@piout.net> (raw)
In-Reply-To: <CAK5ve-JU-XfX-wTnr72riWbnSfOcnofjsXpVuyweCndjBe=UgQ@mail.gmail.com>
On 18/03/2014 at 16:02:51 -0700, Bryan Wu wrote :
> On Mon, Mar 17, 2014 at 11:38 AM, Alexandre Belloni
> <alexandre.belloni@free-electrons.com> wrote:
> > Set inversed polarity when .active_low is set in the platform_data. With device
> > tree, this is taken care of by of_pwm_xlate_with_flags(), called from
> > of_pwm_get().
> >
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > ---
> > drivers/leds/leds-pwm.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
> > index 605047428b5a..09681556a6aa 100644
> > --- a/drivers/leds/leds-pwm.c
> > +++ b/drivers/leds/leds-pwm.c
> > @@ -180,6 +180,11 @@ static int led_pwm_probe(struct platform_device *pdev)
> > led_dat->cdev.max_brightness = cur_led->max_brightness;
> > led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
> >
> > + if (led_dat->active_low)
>
> Why .active_low needs to inverse PWM polarity? In
> of_pwm_xlate_with_flags(), it checked with PWM_POLARITY_INVERSED in
> args. Moreover in of_pwm_simple_xlate() and pxa_pwm_of_xlate(), we
> didn't inverse PWM polarity at all.
>
Yeah, exactly, there is no issue when using device tree. What I'm trying
to fix here is th non-DT case where of_pwm_xlate_with_flags() is not
called.
> Add Thierry to review this.
>
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-03-18 23:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 18:38 [PATCH] leds: pwm: set polarity on non DT platforms Alexandre Belloni
2014-03-18 23:02 ` Bryan Wu
2014-03-18 23:09 ` Alexandre Belloni [this message]
2014-04-07 11:33 ` Thierry Reding
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=20140318230946.GL12021@piout.net \
--to=alexandre.belloni@free-electrons.com \
--cc=cooloney@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=rpurdie@rpsys.net \
--cc=thierry.reding@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 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.