From: Caesar Wang <caesar.upstream@gmail.com>
To: Elaine Zhang <zhangqing@rock-chips.com>, wxt@rock-chips.com
Cc: heiko@sntech.de, khilman@baylibre.com, huangtao@rock-chips.com,
xxx@rock-chips.com, linux-kernel@vger.kernel.org,
linux-rockchip@lists.infradead.org, zyw@rock-chips.com,
jay.xu@rock-chips.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 3/6] rockchip: power-domain: add support for sub-power domains
Date: Tue, 8 Mar 2016 18:41:36 +0800 [thread overview]
Message-ID: <56DEAC60.9000803@gmail.com> (raw)
In-Reply-To: <1456992233-25164-4-git-send-email-zhangqing@rock-chips.com>
在 2016年03月03日 16:03, Elaine Zhang 写道:
> This patch adds support for making one power domain a sub-domain of
> other domain. This is useful for modeling power dependences,
> which needs to have more than one power domain enabled to be operational.
>
> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
> ---
> drivers/soc/rockchip/pm_domains.c | 64 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 64 insertions(+)
>
> diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
> index 0465a06..1777e8e 100644
> --- a/drivers/soc/rockchip/pm_domains.c
> +++ b/drivers/soc/rockchip/pm_domains.c
> @@ -370,6 +370,63 @@ static void rockchip_configure_pd_cnt(struct rockchip_pmu *pmu,
> regmap_write(pmu->regmap, domain_reg_offset + 4, count);
> }
>
> +static int rockchip_pm_add_subdomain(struct rockchip_pmu *pmu,
> + struct device_node *parent)
> +{
[...]
> + child_domain = pmu->genpd_data.domains[idx];
> +
> + if (pm_genpd_add_subdomain(parent_domain, child_domain)) {
> + dev_err(pmu->dev, "%s failed to add subdomain: %s\n",
> + parent_domain->name, child_domain->name);
> + goto err_out;
> + } else {
> + dev_info(pmu->dev, "%s add subdomain: %s\n",
> + parent_domain->name, child_domain->name);
> + }
s/dev_info/dev_dbg
CHECK: Alignment should match open parenthesis
#416: FILE: drivers/soc/rockchip/pm_domains.c:416:
+ dev_info(pmu->dev, "%s add subdomain: %s\n",
+ parent_domain->name, child_domain->name);
> +
> + error = rockchip_pm_add_subdomain(pmu, np);
> + if (error < 0)
> + goto rm_sub_domain;
> + }
> + return 0;
> +
> +err_out:
> + of_node_put(parent);
> + of_node_put(np);
> + return -EINVAL;
> +rm_sub_domain:
> + pm_genpd_remove_subdomain(parent_domain, child_domain);
> + return error;
> +}
> +
> static int rockchip_pm_domain_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> @@ -440,6 +497,13 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
> of_node_put(node);
> goto err_out;
> }
> +
> + error = rockchip_pm_add_subdomain(pmu, node);
> + if (error < 0) {
> + dev_err(dev, "failed to handle subdomain node %s: %d\n",
> + node->name, error);
> + goto err_out;
> + }
> }
>
> if (error) {
--
Thanks,
Caesar
WARNING: multiple messages have this Message-ID (diff)
From: caesar.upstream@gmail.com (Caesar Wang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 3/6] rockchip: power-domain: add support for sub-power domains
Date: Tue, 8 Mar 2016 18:41:36 +0800 [thread overview]
Message-ID: <56DEAC60.9000803@gmail.com> (raw)
In-Reply-To: <1456992233-25164-4-git-send-email-zhangqing@rock-chips.com>
? 2016?03?03? 16:03, Elaine Zhang ??:
> This patch adds support for making one power domain a sub-domain of
> other domain. This is useful for modeling power dependences,
> which needs to have more than one power domain enabled to be operational.
>
> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
> ---
> drivers/soc/rockchip/pm_domains.c | 64 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 64 insertions(+)
>
> diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
> index 0465a06..1777e8e 100644
> --- a/drivers/soc/rockchip/pm_domains.c
> +++ b/drivers/soc/rockchip/pm_domains.c
> @@ -370,6 +370,63 @@ static void rockchip_configure_pd_cnt(struct rockchip_pmu *pmu,
> regmap_write(pmu->regmap, domain_reg_offset + 4, count);
> }
>
> +static int rockchip_pm_add_subdomain(struct rockchip_pmu *pmu,
> + struct device_node *parent)
> +{
[...]
> + child_domain = pmu->genpd_data.domains[idx];
> +
> + if (pm_genpd_add_subdomain(parent_domain, child_domain)) {
> + dev_err(pmu->dev, "%s failed to add subdomain: %s\n",
> + parent_domain->name, child_domain->name);
> + goto err_out;
> + } else {
> + dev_info(pmu->dev, "%s add subdomain: %s\n",
> + parent_domain->name, child_domain->name);
> + }
s/dev_info/dev_dbg
CHECK: Alignment should match open parenthesis
#416: FILE: drivers/soc/rockchip/pm_domains.c:416:
+ dev_info(pmu->dev, "%s add subdomain: %s\n",
+ parent_domain->name, child_domain->name);
> +
> + error = rockchip_pm_add_subdomain(pmu, np);
> + if (error < 0)
> + goto rm_sub_domain;
> + }
> + return 0;
> +
> +err_out:
> + of_node_put(parent);
> + of_node_put(np);
> + return -EINVAL;
> +rm_sub_domain:
> + pm_genpd_remove_subdomain(parent_domain, child_domain);
> + return error;
> +}
> +
> static int rockchip_pm_domain_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> @@ -440,6 +497,13 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
> of_node_put(node);
> goto err_out;
> }
> +
> + error = rockchip_pm_add_subdomain(pmu, node);
> + if (error < 0) {
> + dev_err(dev, "failed to handle subdomain node %s: %d\n",
> + node->name, error);
> + goto err_out;
> + }
> }
>
> if (error) {
--
Thanks,
Caesar
next prev parent reply other threads:[~2016-03-08 10:41 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 8:03 [PATCH v5 0/6] rockchip: power-domain: fix pm domain for support RK3399 SoC Elaine Zhang
2016-03-03 8:03 ` Elaine Zhang
2016-03-03 8:03 ` [PATCH v5 1/6] rockchip: power-domain: make idle handling optional Elaine Zhang
2016-03-03 8:03 ` Elaine Zhang
2016-03-03 8:03 ` [PATCH v5 2/6] power-domain: allow domains only handling idle requests Elaine Zhang
2016-03-03 8:03 ` Elaine Zhang
2016-03-03 8:03 ` [PATCH v5 3/6] rockchip: power-domain: add support for sub-power domains Elaine Zhang
2016-03-03 8:03 ` Elaine Zhang
2016-03-08 10:41 ` Caesar Wang [this message]
2016-03-08 10:41 ` Caesar Wang
2016-03-03 8:03 ` [PATCH v5 4/6] dt/bindings: power: add RK3399 SoCs header for power-domain Elaine Zhang
2016-03-03 8:03 ` Elaine Zhang
2016-03-08 10:45 ` Caesar Wang
2016-03-08 10:45 ` Caesar Wang
2016-03-09 8:43 ` Elaine Zhang
2016-03-09 8:43 ` Elaine Zhang
2016-03-09 9:55 ` Heiko Stübner
2016-03-09 9:55 ` Heiko Stübner
2016-03-09 10:36 ` Caesar Wang
2016-03-09 10:36 ` Caesar Wang
2016-03-09 10:57 ` Heiko Stübner
2016-03-09 10:57 ` Heiko Stübner
2016-03-03 8:09 ` [PATCH v5 5/6] dt/bindings: rockchip: modify document of Rockchip power domains Elaine Zhang
2016-03-03 8:09 ` Elaine Zhang
2016-03-08 11:09 ` Caesar Wang
2016-03-08 11:09 ` Caesar Wang
[not found] ` <56DEB2E1.6060808-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-09 8:48 ` Elaine Zhang
2016-03-09 8:48 ` Elaine Zhang
2016-03-09 8:48 ` Elaine Zhang
2016-03-03 8:09 ` [PATCH v5 6/6] rockchip: power-domain: Modify power domain driver for rk3399 Elaine Zhang
2016-03-03 8:09 ` Elaine Zhang
2016-03-08 10:59 ` Caesar Wang
2016-03-08 10:59 ` Caesar Wang
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=56DEAC60.9000803@gmail.com \
--to=caesar.upstream@gmail.com \
--cc=heiko@sntech.de \
--cc=huangtao@rock-chips.com \
--cc=jay.xu@rock-chips.com \
--cc=khilman@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=wxt@rock-chips.com \
--cc=xxx@rock-chips.com \
--cc=zhangqing@rock-chips.com \
--cc=zyw@rock-chips.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 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.