All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@kernel.org>
To: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: santosh.shilimkar@ti.com, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	linux-pm@vger.kernel.org, ben.dooks@codethink.co.uk,
	laurent.pinchart@ideasonboard.com, grant.likely@secretlab.ca,
	ulf.hansson@linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/4] ARM: keystone: pm: switch to use generic pm domains
Date: Thu, 25 Sep 2014 15:23:10 -0700	[thread overview]
Message-ID: <7hlhp79w6p.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1411657537-25238-3-git-send-email-grygorii.strashko@ti.com> (Grygorii Strashko's message of "Thu, 25 Sep 2014 18:05:35 +0300")

Grygorii Strashko <grygorii.strashko@ti.com> writes:

> This patch switches Keystone 2 PM code to use Generic PM domains
> instead of PM  clock domains because of the lack of DT support
> for the last.
>
> Keystone 2 PM domain should be specified per device for which
> Runtime PM has to be enabled and handles the list of functional clocks
> to enable/disable device.
>
> Example:
>  qmss_domain: qmss_pm_controller {
> 	compatible = "ti,keystone-pm-controller";
> 	clocks = <&chipclk13>;
> 	#power-domain-cells = <0>;
>  };
>
>  qmss: qmss@2a40000 {
> 	compatible = "ti,keystone-navigator-qmss";
> 	...
> 	power-domains = <&qmss_domain>;
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

[...]

> +static int keystone_pm_domain_power_off(struct generic_pm_domain *genpd)
> +{
> +	int ret;
> +	struct keystone_domain *dm = container_of(genpd,
> +						  struct keystone_domain,
> +						  base);
> +
> +	/* Enable reset clocks for all devices in the PU domain */

This says enable clocks...

> +	ret = pm_clk_suspend(dm->dev);

...but this calls clk_disable().

> +	if (ret)
> +		dev_err(dm->dev, "can't turn off clocks %d\n", ret);
> +
> +	return ret;
> +}
> +
> +static int keystone_pm_domain_power_on(struct generic_pm_domain *genpd)
> +{
> +	int ret;
> +	struct keystone_domain *dm = container_of(genpd,
> +						  struct keystone_domain,
> +						  base);
> +
> +	/* Disable reset clocks for all devices in the PU domain */

And this says disable clocks...

> +	ret = pm_clk_resume(dm->dev);

...but this calls clk_enable().

-ECONFUSED.

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: khilman@kernel.org (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 2/4] ARM: keystone: pm: switch to use generic pm domains
Date: Thu, 25 Sep 2014 15:23:10 -0700	[thread overview]
Message-ID: <7hlhp79w6p.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1411657537-25238-3-git-send-email-grygorii.strashko@ti.com> (Grygorii Strashko's message of "Thu, 25 Sep 2014 18:05:35 +0300")

Grygorii Strashko <grygorii.strashko@ti.com> writes:

> This patch switches Keystone 2 PM code to use Generic PM domains
> instead of PM  clock domains because of the lack of DT support
> for the last.
>
> Keystone 2 PM domain should be specified per device for which
> Runtime PM has to be enabled and handles the list of functional clocks
> to enable/disable device.
>
> Example:
>  qmss_domain: qmss_pm_controller {
> 	compatible = "ti,keystone-pm-controller";
> 	clocks = <&chipclk13>;
> 	#power-domain-cells = <0>;
>  };
>
>  qmss: qmss at 2a40000 {
> 	compatible = "ti,keystone-navigator-qmss";
> 	...
> 	power-domains = <&qmss_domain>;
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

[...]

> +static int keystone_pm_domain_power_off(struct generic_pm_domain *genpd)
> +{
> +	int ret;
> +	struct keystone_domain *dm = container_of(genpd,
> +						  struct keystone_domain,
> +						  base);
> +
> +	/* Enable reset clocks for all devices in the PU domain */

This says enable clocks...

> +	ret = pm_clk_suspend(dm->dev);

...but this calls clk_disable().

> +	if (ret)
> +		dev_err(dm->dev, "can't turn off clocks %d\n", ret);
> +
> +	return ret;
> +}
> +
> +static int keystone_pm_domain_power_on(struct generic_pm_domain *genpd)
> +{
> +	int ret;
> +	struct keystone_domain *dm = container_of(genpd,
> +						  struct keystone_domain,
> +						  base);
> +
> +	/* Disable reset clocks for all devices in the PU domain */

And this says disable clocks...

> +	ret = pm_clk_resume(dm->dev);

...but this calls clk_enable().

-ECONFUSED.

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@kernel.org>
To: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: <santosh.shilimkar@ti.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	<linux-pm@vger.kernel.org>, <ben.dooks@codethink.co.uk>,
	<laurent.pinchart@ideasonboard.com>, <grant.likely@secretlab.ca>,
	<ulf.hansson@linaro.org>, <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 2/4] ARM: keystone: pm: switch to use generic pm domains
Date: Thu, 25 Sep 2014 15:23:10 -0700	[thread overview]
Message-ID: <7hlhp79w6p.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1411657537-25238-3-git-send-email-grygorii.strashko@ti.com> (Grygorii Strashko's message of "Thu, 25 Sep 2014 18:05:35 +0300")

Grygorii Strashko <grygorii.strashko@ti.com> writes:

> This patch switches Keystone 2 PM code to use Generic PM domains
> instead of PM  clock domains because of the lack of DT support
> for the last.
>
> Keystone 2 PM domain should be specified per device for which
> Runtime PM has to be enabled and handles the list of functional clocks
> to enable/disable device.
>
> Example:
>  qmss_domain: qmss_pm_controller {
> 	compatible = "ti,keystone-pm-controller";
> 	clocks = <&chipclk13>;
> 	#power-domain-cells = <0>;
>  };
>
>  qmss: qmss@2a40000 {
> 	compatible = "ti,keystone-navigator-qmss";
> 	...
> 	power-domains = <&qmss_domain>;
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

[...]

> +static int keystone_pm_domain_power_off(struct generic_pm_domain *genpd)
> +{
> +	int ret;
> +	struct keystone_domain *dm = container_of(genpd,
> +						  struct keystone_domain,
> +						  base);
> +
> +	/* Enable reset clocks for all devices in the PU domain */

This says enable clocks...

> +	ret = pm_clk_suspend(dm->dev);

...but this calls clk_disable().

> +	if (ret)
> +		dev_err(dm->dev, "can't turn off clocks %d\n", ret);
> +
> +	return ret;
> +}
> +
> +static int keystone_pm_domain_power_on(struct generic_pm_domain *genpd)
> +{
> +	int ret;
> +	struct keystone_domain *dm = container_of(genpd,
> +						  struct keystone_domain,
> +						  base);
> +
> +	/* Disable reset clocks for all devices in the PU domain */

And this says disable clocks...

> +	ret = pm_clk_resume(dm->dev);

...but this calls clk_enable().

-ECONFUSED.

Kevin

  reply	other threads:[~2014-09-25 22:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 15:05 [RFC PATCH 0/4] ARM: keystone: pm: switch to use generic pm domains Grygorii Strashko
2014-09-25 15:05 ` Grygorii Strashko
2014-09-25 15:05 ` Grygorii Strashko
2014-09-25 15:05 ` [RFC PATCH 1/4] PM / clock_ops: Add pm_clk_add_clk() Grygorii Strashko
2014-09-25 15:05   ` Grygorii Strashko
2014-09-25 15:05   ` Grygorii Strashko
2014-09-25 15:05 ` [RFC PATCH 2/4] ARM: keystone: pm: switch to use generic pm domains Grygorii Strashko
2014-09-25 15:05   ` Grygorii Strashko
2014-09-25 15:05   ` Grygorii Strashko
2014-09-25 22:23   ` Kevin Hilman [this message]
2014-09-25 22:23     ` Kevin Hilman
2014-09-25 22:23     ` Kevin Hilman
2014-09-26 16:40     ` Grygorii Strashko
2014-09-26 16:40       ` Grygorii Strashko
2014-09-26 16:40       ` Grygorii Strashko
2014-09-25 15:05 ` [RFC PATCH 3/4] ARM: keystone: pm: remove unused clk pm domain code Grygorii Strashko
2014-09-25 15:05   ` Grygorii Strashko
2014-09-25 15:05   ` Grygorii Strashko
2014-09-25 15:05 ` [RFC PATCH 4/4] ARM: dts: k2hk-evm: add pm domains for net, qmss and knav_dmas Grygorii Strashko
2014-09-25 15:05   ` Grygorii Strashko
2014-09-25 15:05   ` Grygorii Strashko
2014-09-25 22:27   ` Kevin Hilman
2014-09-25 22:27     ` Kevin Hilman
2014-09-25 22:27     ` Kevin Hilman
2014-09-26 16:39     ` Grygorii Strashko
2014-09-26 16:39       ` Grygorii Strashko
2014-09-26 16:39       ` Grygorii Strashko

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=7hlhp79w6p.fsf@deeprootsystems.com \
    --to=khilman@kernel.org \
    --cc=ben.dooks@codethink.co.uk \
    --cc=geert+renesas@glider.be \
    --cc=grant.likely@secretlab.ca \
    --cc=grygorii.strashko@ti.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=santosh.shilimkar@ti.com \
    --cc=ulf.hansson@linaro.org \
    /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.