devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Billy Tsai <billy_tsai@aspeedtech.com>,
	"jdelvare@suse.com" <jdelvare@suse.com>,
	"linux@roeck-us.net" <linux@roeck-us.net>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"joel@jms.id.au" <joel@jms.id.au>,
	"andrew@aj.id.au" <andrew@aj.id.au>,
	"lee.jones@linaro.org" <lee.jones@linaro.org>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"u.kleine-koenig@pengutronix.de" <u.kleine-koenig@pengutronix.de>,
	"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>
Cc: BMC-SW <BMC-SW@aspeedtech.com>
Subject: Re: [v13 2/2] pwm: Add Aspeed ast2600 PWM support
Date: Wed, 01 Dec 2021 10:11:42 +0100	[thread overview]
Message-ID: <3b80b2a52362cbadb26052685566e2c1f75a0b68.camel@pengutronix.de> (raw)
In-Reply-To: <CDB0374F-3835-4501-964E-DB771588114D@aspeedtech.com>

Hi Billy,

On Wed, 2021-12-01 at 03:30 +0000, Billy Tsai wrote:
> Hi Philipp,
> 
> On 2021/11/30, 5:52 PM, "Philipp Zabel" <p.zabel@pengutronix.de> wrote:
> 
>     On Mon, 2021-11-29 at 14:43 +0800, Billy Tsai wrote:
>     [...]
>     >   > +	ret = clk_prepare_enable(priv->clk);
>     >   > +	if (ret)
>     >   > +		return dev_err_probe(dev, ret, "Couldn't enable clock\n");
>     >   > +
>     >   > +	ret = reset_control_deassert(priv->reset);
>     >   > +	if (ret) {
>     >   > +		dev_err_probe(dev, ret, "Couldn't deassert reset control\n");
>     >   > +		goto err_disable_clk;
>     >   > +	}
> 
>     >   Is there any reason to keep the clocks running and the controller out of
>     >   reset while the PWM outputs are disabled?
> 
> Can you tell me about your concerns with this process?

No particular concerns, just curiosity.

> In my opinion, they are used to provide the clock and de-assert the reset of the PWM engine. If we didn't release
> them in probe stage the CPU can't and shouldn't read the register of the PWM engine when call the get_state.
> Assume that we want to adjust them dynamically, the driver needs to add more conditions to check and keep the status
> of each PWM channel, which is not a good deal for the server platform.

Thanks. I don't know the hardware, so I have no idea whether disabling
the clocks would even save a measurable (let alone appreciable) amount
of power.

I've just seen other PWM drivers use runtime PM or enable/disable clocks
dynamically, and wondered why this one doesn't.

regards
Philipp

  reply	other threads:[~2021-12-01  9:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29  6:43 [v13 0/2] Support pwm driver for aspeed ast26xx Billy Tsai
2021-11-29  6:43 ` [v13 1/2] dt-bindings: Add bindings for aspeed pwm-tach Billy Tsai
2021-11-29  6:43 ` [v13 2/2] pwm: Add Aspeed ast2600 PWM support Billy Tsai
2021-11-29 20:51   ` Uwe Kleine-König
2021-11-30  9:52   ` Philipp Zabel
2021-12-01  3:30     ` Billy Tsai
2021-12-01  9:11       ` Philipp Zabel [this message]
2021-12-01 10:53         ` Billy Tsai

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=3b80b2a52362cbadb26052685566e2c1f75a0b68.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=BMC-SW@aspeedtech.com \
    --cc=andrew@aj.id.au \
    --cc=billy_tsai@aspeedtech.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=joel@jms.id.au \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh+dt@kernel.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 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).