Linux PWM subsystem development
 help / color / mirror / Atom feed
From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: Fabio Estevam <festevam@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	linux-pwm@vger.kernel.org, Rob Herring <robh@kernel.org>,
	Russell King <linux@arm.linux.org.uk>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	Lukasz Majewski <lukma@denx.de>
Subject: Re: [PATCH v3] pwm: imx: Let PWM be active during suspend
Date: Mon, 11 Dec 2017 14:20:40 +0100	[thread overview]
Message-ID: <20171211142040.757f1313@karo-electronics.de> (raw)
In-Reply-To: <CAOMZO5DsyCbTKqRv4kZqa3n7Hp-xHkCrXjegEQt9Fi694men=w@mail.gmail.com>

Hi,

On Mon, 11 Dec 2017 10:24:20 -0200 Fabio Estevam wrote:
> Adding Lukasz and Lothar who seem to have used pwm-imx driver with
> polarity inverted.
> 
> On Mon, Dec 11, 2017 at 10:13 AM, Thierry Reding
> <thierry.reding@gmail.com> wrote:
> 
> > Yeah, my suggestion was to make setting the STOPEN bit dependent on the
> > polarity inversion setting of the PWM. That way you don't have to hard-
> > code it, which might not be the correct setting for non-inverted PWMs.
> 
> After using the polarity inversion the LED comes turned on after boot.
> 
> Setting the STOPEN bit does not help in this case, as It keeps on
> during suspend.
> 
> The problem is that when polarity inversion is used I can no longer
> turn the LED off:
> 
> # echo 0 > brightness (This keeps the LED on with its maximum
> brightness, so there is a bug here)
> # echo 1 > brightness (This keeps the LED off - well, actually it is
> turned on with a minimum brightness - expected behaviour)
> # echo 248 > brightness (This keeps the LED on with its maximum
> brightness - expected behaviour)
> 
> So I think that once I managed to make 'echo 0 > brightness' to really
> turn off the LED then the original issue (LED turned on during
> suspend) will be gone.
> 
The problem is, that the PWM output goes low whenever the PWM is
disabled, no matter what polarity is programmed. So, you would need to
prevent the PWM from being disabled whenever the duty cycle is set to 0.

I'm using the PWM for an LCD backlight that has a separate ENABLE pin.
Thus by driving that pin via the backlight power supply regulator, the
backlight actually switches off, though the PWM output is constantly
active (LOW).


Lothar Waßmann

  reply	other threads:[~2017-12-11 13:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20 23:27 [PATCH v3] pwm: imx: Let PWM be active during suspend Fabio Estevam
2017-12-04 12:29 ` Fabio Estevam
2017-12-05  8:47 ` Thierry Reding
2017-12-05 18:56   ` Fabio Estevam
2017-12-08 17:22     ` Fabio Estevam
2017-12-11  9:16     ` Thierry Reding
2017-12-11  9:36       ` Russell King - ARM Linux
2017-12-11 12:09         ` Thierry Reding
2017-12-11 10:54       ` Fabio Estevam
2017-12-11 12:13         ` Thierry Reding
2017-12-11 12:24           ` Fabio Estevam
2017-12-11 13:20             ` Lothar Waßmann [this message]
2017-12-11 15:07               ` Fabio Estevam
2017-12-11 15:55                 ` Lothar Waßmann
2017-12-11 16:06                   ` Fabio Estevam
2017-12-11 16:52                     ` Lothar Waßmann
2017-12-11 18:48                       ` Fabio Estevam
2017-12-15 12:02                         ` Lothar Waßmann
2017-12-16 18:26                           ` Fabio Estevam

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=20171211142040.757f1313@karo-electronics.de \
    --to=lw@karo-electronics.de \
    --cc=fabio.estevam@nxp.com \
    --cc=festevam@gmail.com \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=lukma@denx.de \
    --cc=robh@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox