All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Gruber <clemens.gruber@pqgruber.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-pwm@vger.kernel.org,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Alexandre Belloni" <alexandre.belloni@free-electrons.com>,
	"Shawn Guo" <shawn.guo@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	"Lothar Waßmann" <LW@karo-electronics.de>
Subject: Re: [PATCHv6 0/3] pwm: imx: support output polarity inversion
Date: Mon, 12 Sep 2016 23:12:54 +0200	[thread overview]
Message-ID: <20160912211254.GA4637@archie.localdomain> (raw)
In-Reply-To: <20160912200021.fsnfdgnng4it354g@pengutronix.de>

Hi Uwe,

On Mon, Sep 12, 2016 at 10:00:21PM +0200, Uwe Kleine-König wrote:
> I want that the pwm driver disables its clock on pwm_config(mypwm, 0,
> someperiod) such that the consumer doesn't need to call
> pwm_disable(mypwm) to save power (assuming it's safe to do so, which
> only the pwm provider knows).

I am not sure if this is such a good idea, because there are use cases
where you want to keep the PWM driver enabled the whole time but still
be able to change the duty cycle to 0 for some time without adding
unnecessary delays when changing the duty cycle back to something else.

We have an application where we control fluid valves in a beer
dispensing system through PWMs and these valves are pulsed with
different PWM duty cycles for a short time. In-between the duty cycle
is also 0. For example: Start at 0%, 100ms 90%, 200ms 70%, 300ms 0%,
100ms 90%, and so on..
There it is critical that the change from and to 0 duty cycle is not
delayed by disabling and reenabling the clock.
The oscillator (if there is one) should be up and running, only the duty
cycle should be 0 for a short time.

This would not be possible anymore with your API change, right?

Regards,
Clemens

WARNING: multiple messages have this Message-ID (diff)
From: clemens.gruber@pqgruber.com (Clemens Gruber)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv6 0/3] pwm: imx: support output polarity inversion
Date: Mon, 12 Sep 2016 23:12:54 +0200	[thread overview]
Message-ID: <20160912211254.GA4637@archie.localdomain> (raw)
In-Reply-To: <20160912200021.fsnfdgnng4it354g@pengutronix.de>

Hi Uwe,

On Mon, Sep 12, 2016 at 10:00:21PM +0200, Uwe Kleine-K?nig wrote:
> I want that the pwm driver disables its clock on pwm_config(mypwm, 0,
> someperiod) such that the consumer doesn't need to call
> pwm_disable(mypwm) to save power (assuming it's safe to do so, which
> only the pwm provider knows).

I am not sure if this is such a good idea, because there are use cases
where you want to keep the PWM driver enabled the whole time but still
be able to change the duty cycle to 0 for some time without adding
unnecessary delays when changing the duty cycle back to something else.

We have an application where we control fluid valves in a beer
dispensing system through PWMs and these valves are pulsed with
different PWM duty cycles for a short time. In-between the duty cycle
is also 0. For example: Start at 0%, 100ms 90%, 200ms 70%, 300ms 0%,
100ms 90%, and so on..
There it is critical that the change from and to 0 duty cycle is not
delayed by disabling and reenabling the clock.
The oscillator (if there is one) should be up and running, only the duty
cycle should be 0 for a short time.

This would not be possible anymore with your API change, right?

Regards,
Clemens

  reply	other threads:[~2016-09-12 21:12 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 13:55 [PATCHv4 0/3] pwm: imx: support output polarity inversion Lothar Waßmann
2014-10-07 13:55 ` Lothar Waßmann
2014-10-07 13:55 ` [PATCHv5 1/3] pwm: print error messages with pr_err() instead of pr_debug() Lothar Waßmann
2014-10-07 13:55   ` Lothar Waßmann
2014-10-07 13:55 ` [PATCHv5 2/3] pwm: make the PWM_POLARITY flag in DTB optional Lothar Waßmann
2014-10-07 13:55   ` Lothar Waßmann
2014-10-09 15:16   ` Thierry Reding
2014-10-09 15:16     ` Thierry Reding
2014-10-10 14:22     ` [PATCHv6 0/3] pwm: imx: support output polarity inversion Lothar Waßmann
2014-10-10 14:22       ` Lothar Waßmann
2014-10-10 14:22       ` [PATCHv6 1/3] pwm: print error messages with pr_err() instead of pr_debug() Lothar Waßmann
2014-10-10 14:22         ` Lothar Waßmann
2014-10-10 14:22       ` [PATCHv6 2/3] pwm: make the PWM_POLARITY flag in DTB optional Lothar Waßmann
2014-10-10 14:22         ` Lothar Waßmann
2014-10-10 14:22       ` [PATCH 3/3] pwm: imx: support output polarity inversion Lothar Waßmann
2014-10-10 14:22         ` Lothar Waßmann
2016-09-08 22:15       ` [PATCHv6 0/3] " Stefan Agner
2016-09-08 22:15         ` Stefan Agner
2016-09-09  7:18         ` Lothar Waßmann
2016-09-09  7:18           ` Lothar Waßmann
2016-09-12 12:45           ` Alexandre Belloni
2016-09-12 12:45             ` Alexandre Belloni
2016-09-12 14:04             ` Uwe Kleine-König
2016-09-12 14:04               ` Uwe Kleine-König
2016-09-12 16:51               ` Stefan Agner
2016-09-12 16:51                 ` Stefan Agner
2016-09-12 20:00                 ` Uwe Kleine-König
2016-09-12 20:00                   ` Uwe Kleine-König
2016-09-12 21:12                   ` Clemens Gruber [this message]
2016-09-12 21:12                     ` Clemens Gruber
2016-09-13  6:45                     ` Uwe Kleine-König
2016-09-13  6:45                       ` Uwe Kleine-König
2016-09-12 13:54           ` Vladimir Zapolskiy
2016-09-12 13:54             ` Vladimir Zapolskiy
2014-10-07 13:55 ` [PATCHv5 3/3] " Lothar Waßmann
2014-10-07 13:55   ` Lothar Waßmann

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=20160912211254.GA4637@archie.localdomain \
    --to=clemens.gruber@pqgruber.com \
    --cc=LW@karo-electronics.de \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.guo@linaro.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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.