devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Billy Tsai <billy_tsai@aspeedtech.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
	"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, 1 Dec 2021 10:53:48 +0000	[thread overview]
Message-ID: <A49ACA24-D607-443F-8C96-4E2BEF902F8E@aspeedtech.com> (raw)
In-Reply-To: <3b80b2a52362cbadb26052685566e2c1f75a0b68.camel@pengutronix.de>

Hi Philipp,

On 2021/12/1, 5:12 PM, "Philipp Zabel" <p.zabel@pengutronix.de> wrote:

    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.

Thanks for the heads up, I think that for the usage we don't need to implement that.

Best Regards,
Billy Tsai




      reply	other threads:[~2021-12-01 10:53 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
2021-12-01 10:53         ` Billy Tsai [this message]

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=A49ACA24-D607-443F-8C96-4E2BEF902F8E@aspeedtech.com \
    --to=billy_tsai@aspeedtech.com \
    --cc=BMC-SW@aspeedtech.com \
    --cc=andrew@aj.id.au \
    --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=p.zabel@pengutronix.de \
    --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).