linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Lokesh Vutla <lokeshvutla@ti.com>
Cc: "Thierry Reding" <thierry.reding@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Linux OMAP Mailing List" <linux-omap@vger.kernel.org>,
	linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org,
	"Sekhar Nori" <nsekhar@ti.com>, "Vignesh R" <vigneshr@ti.com>,
	"Sebastian Reichel" <sre@kernel.org>
Subject: Re: [PATCH v2 4/6] pwm: omap-dmtimer: Fix pwm disabling sequence
Date: Fri, 13 Mar 2020 08:50:49 -0700	[thread overview]
Message-ID: <20200313155049.GE37466@atomide.com> (raw)
In-Reply-To: <20200313153449.GD37466@atomide.com>

* Tony Lindgren <tony@atomide.com> [200313 15:35]:
> * Tony Lindgren <tony@atomide.com> [200312 00:59]:
> > * Lokesh Vutla <lokeshvutla@ti.com> [200311 04:14]:
> > > However, I see an issue with the patch itself as pm_runtime is not disabled
> > > after the pwm is stopped. Not sure how that could be nullified with this approach.
> > 
> > Hmm yeah not sure what could be used to clear things
> > when the current cycle is completed unless there's
> > some interrupt for it.
> 
> You could enable pm_runtime_use_autosuspend() for pwm use,
> then set the timeout to the cycle length, then in the
> runtime_suspend make sure the enable bit is cleared if
> requested.
> 
> But this too seems inaccurate, it would be best to clear
> the enable bit on some cycle completion interrupt if
> such thing is available.

I think enabling pm_runtime_use_autosuspend() for pwm,
adding a flag for pwm_enabled, and blocking cpu_pm if
pwm_enabled is set might do the trick though. Then clear
pwm_enabled flag in runtime_suspend if set.

This depend on cpuidle respecting NOTIFY_BAD that I
fixed in the recent thread:

[PATCH 0/3] Block idle in gpio-omap with cpu_pm

Regards,

Tony

  reply	other threads:[~2020-03-13 15:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28  9:56 [PATCH v2 0/5] pwm: omap-dmtimer: Allow for dynamic pwm period updates Lokesh Vutla
2020-02-28  9:56 ` [PATCH v2 1/6] pwm: omap-dmtimer: Drop unused header file Lokesh Vutla
2020-03-06 18:03   ` Tony Lindgren
2020-02-28  9:56 ` [PATCH v2 2/6] pwm: omap-dmtimer: Update description for pwm omap dm timer Lokesh Vutla
2020-03-06 18:03   ` Tony Lindgren
2020-02-28  9:56 ` [PATCH v2 3/6] pwm: omap-dmtimer: Fix pwm enabling sequence Lokesh Vutla
2020-03-06 18:04   ` Tony Lindgren
2020-02-28  9:56 ` [PATCH v2 4/6] pwm: omap-dmtimer: Fix pwm disabling sequence Lokesh Vutla
2020-03-06 18:14   ` Tony Lindgren
2020-03-09  4:51     ` Lokesh Vutla
2020-03-09 12:30       ` Sebastian Reichel
2020-03-09 18:01       ` Tony Lindgren
2020-03-10  7:04         ` Lokesh Vutla
2020-03-10 15:52           ` Tony Lindgren
2020-03-11  4:12             ` Lokesh Vutla
2020-03-12  0:58               ` Tony Lindgren
2020-03-13 15:34                 ` Tony Lindgren
2020-03-13 15:50                   ` Tony Lindgren [this message]
2020-02-28  9:56 ` [PATCH v2 5/6] pwm: omap-dmtimer: Do not disable pwm before changing period/duty_cycle Lokesh Vutla
2020-03-06 18:17   ` Tony Lindgren
2020-02-28  9:56 ` [PATCH v2 6/6] pwm: omap-dmtimer: Implement .apply callback Lokesh Vutla

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=20200313155049.GE37466@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=nsekhar@ti.com \
    --cc=sre@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).