From: Amit Daniel Kachhap <amit.daniel@samsung.com> To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, linux-kernel@vger.kernel.org, s.nawrocki@samsung.com, pankaj.dubey@samsung.com, ulf.hansson@linaro.org, khilman@kernel.org, linux-pm@vger.kernel.org, geert@linux-m68k.org, rjw@rjwysocki.net, devicetree@vger.kernel.org, Amit Daniel Kachhap <amit.daniel@samsung.com> Subject: [PATCH RFC v2 05/12] soc: samsung: pm_domain: Use unique compatible name for power domain Date: Mon, 24 Nov 2014 18:34:09 +0530 [thread overview] Message-ID: <1416834256-11225-5-git-send-email-amit.daniel@samsung.com> (raw) In-Reply-To: <1416834256-11225-1-git-send-email-amit.daniel@samsung.com> This patch adds support for second optional compatible complate name. If this compatible name is present then this name will be used to create the Power Domain and not the DT node name. This will be useful to carry out any power domain specific changes in the PD on/off handlers for new SoCs. This change will not affect the existing DT bindings. Cc: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> --- .../bindings/arm/exynos/power_domain.txt | 8 ++++++++ drivers/soc/samsung/pm_domains.c | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt index abde1ea..00ebda1 100644 --- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt +++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt @@ -12,6 +12,8 @@ Required Properties: must be 0. Optional Properties: +- compatible: This is a second compatible name and gives the complete Power + Domain name like "samsung,exynos7-pd-mfc". - clocks: List of clock handles. The parent clocks of the input clocks to the devices in this power domain are set to oscclk before power gating and restored back after powering on a domain. This is required for @@ -43,5 +45,11 @@ Example: #power-domain-cells = <0>; }; + mfc_pd: power-domain@10044060 { + compatible = "samsung,exynos4210-pd", "samsung,exynos7-pd-mfc"; + reg = <0x10044060 0x20>; + #power-domain-cells = <0>; + }; + See Documentation/devicetree/bindings/power/power_domain.txt for description of consumer-side bindings. diff --git a/drivers/soc/samsung/pm_domains.c b/drivers/soc/samsung/pm_domains.c index 69bc8b1..f4f2a6c 100644 --- a/drivers/soc/samsung/pm_domains.c +++ b/drivers/soc/samsung/pm_domains.c @@ -120,12 +120,20 @@ static int exynos_power_domain_probe(struct platform_device *pdev) struct exynos_pm_domain *pd; int i; bool on; + const char *name; pd = devm_kzalloc(&pdev->dev, sizeof(*pd), GFP_KERNEL); if (!pd) return -ENOMEM; - pd->pd.name = kstrdup(np->name, GFP_KERNEL); + /* + * Check if second compatible name found then use as power + * domain name or else use the DT node name as before. + */ + if (of_property_read_string_index(np, "compatible", 1, &name)) + name = np->name; + + pd->pd.name = kstrdup(name, GFP_KERNEL); pd->name = pd->pd.name; pd->base = of_iomap(np, 0); pd->pd.power_off = exynos_pd_power_off; -- 1.7.9.5
WARNING: multiple messages have this Message-ID (diff)
From: amit.daniel@samsung.com (Amit Daniel Kachhap) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH RFC v2 05/12] soc: samsung: pm_domain: Use unique compatible name for power domain Date: Mon, 24 Nov 2014 18:34:09 +0530 [thread overview] Message-ID: <1416834256-11225-5-git-send-email-amit.daniel@samsung.com> (raw) In-Reply-To: <1416834256-11225-1-git-send-email-amit.daniel@samsung.com> This patch adds support for second optional compatible complate name. If this compatible name is present then this name will be used to create the Power Domain and not the DT node name. This will be useful to carry out any power domain specific changes in the PD on/off handlers for new SoCs. This change will not affect the existing DT bindings. Cc: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> --- .../bindings/arm/exynos/power_domain.txt | 8 ++++++++ drivers/soc/samsung/pm_domains.c | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt index abde1ea..00ebda1 100644 --- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt +++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt @@ -12,6 +12,8 @@ Required Properties: must be 0. Optional Properties: +- compatible: This is a second compatible name and gives the complete Power + Domain name like "samsung,exynos7-pd-mfc". - clocks: List of clock handles. The parent clocks of the input clocks to the devices in this power domain are set to oscclk before power gating and restored back after powering on a domain. This is required for @@ -43,5 +45,11 @@ Example: #power-domain-cells = <0>; }; + mfc_pd: power-domain at 10044060 { + compatible = "samsung,exynos4210-pd", "samsung,exynos7-pd-mfc"; + reg = <0x10044060 0x20>; + #power-domain-cells = <0>; + }; + See Documentation/devicetree/bindings/power/power_domain.txt for description of consumer-side bindings. diff --git a/drivers/soc/samsung/pm_domains.c b/drivers/soc/samsung/pm_domains.c index 69bc8b1..f4f2a6c 100644 --- a/drivers/soc/samsung/pm_domains.c +++ b/drivers/soc/samsung/pm_domains.c @@ -120,12 +120,20 @@ static int exynos_power_domain_probe(struct platform_device *pdev) struct exynos_pm_domain *pd; int i; bool on; + const char *name; pd = devm_kzalloc(&pdev->dev, sizeof(*pd), GFP_KERNEL); if (!pd) return -ENOMEM; - pd->pd.name = kstrdup(np->name, GFP_KERNEL); + /* + * Check if second compatible name found then use as power + * domain name or else use the DT node name as before. + */ + if (of_property_read_string_index(np, "compatible", 1, &name)) + name = np->name; + + pd->pd.name = kstrdup(name, GFP_KERNEL); pd->name = pd->pd.name; pd->base = of_iomap(np, 0); pd->pd.power_off = exynos_pd_power_off; -- 1.7.9.5
next prev parent reply other threads:[~2014-11-24 13:15 UTC|newest] Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-11-24 12:52 [PATCH RFC v2 00/12] soc: samsung: Modify and enhance power domain driver Amit Daniel Kachhap 2014-11-24 12:52 ` Amit Daniel Kachhap 2014-11-24 13:04 ` [PATCH RFC v2 01/12] arm: exynos: Add platform driver support for " Amit Daniel Kachhap 2014-11-24 13:04 ` Amit Daniel Kachhap 2014-11-24 13:04 ` [PATCH RFC v2 02/12] soc: exynos: Move exynos power domain file to driver/soc/samsung folder Amit Daniel Kachhap 2014-11-24 13:04 ` Amit Daniel Kachhap 2014-11-24 13:04 ` [PATCH RFC v2 03/12] soc: samsung: exynos-pmu: Register exynos pd driver as a mfd client Amit Daniel Kachhap 2014-11-24 13:04 ` Amit Daniel Kachhap 2014-11-24 13:04 ` [PATCH RFC v2 04/12] soc: samsung: Re-structure PMU driver to create pd on/off handlers Amit Daniel Kachhap 2014-11-24 13:04 ` Amit Daniel Kachhap 2014-11-24 13:04 ` Amit Daniel Kachhap [this message] 2014-11-24 13:04 ` [PATCH RFC v2 05/12] soc: samsung: pm_domain: Use unique compatible name for power domain Amit Daniel Kachhap 2014-11-24 13:04 ` [PATCH RFC v2 06/12] driver: soc: exynos-pmu: Add exynos7 power domain on/off ops Amit Daniel Kachhap 2014-11-24 13:04 ` Amit Daniel Kachhap 2014-11-25 7:30 ` Ulf Hansson 2014-11-25 7:30 ` Ulf Hansson 2014-11-25 7:30 ` Ulf Hansson 2014-11-25 8:33 ` amit daniel kachhap 2014-11-25 8:33 ` amit daniel kachhap 2014-11-25 8:33 ` amit daniel kachhap 2014-11-24 13:04 ` [PATCH RFC v2 07/12] PM / Domains: export pm_genpd_lookup_name Amit Daniel Kachhap 2014-11-24 13:04 ` Amit Daniel Kachhap 2014-11-25 7:35 ` Ulf Hansson 2014-11-25 7:35 ` Ulf Hansson 2014-11-25 7:35 ` Ulf Hansson 2014-11-25 8:48 ` amit daniel kachhap 2014-11-25 8:48 ` amit daniel kachhap 2014-11-25 8:48 ` amit daniel kachhap 2014-11-27 14:20 ` Ulf Hansson 2014-11-27 14:20 ` Ulf Hansson 2014-11-27 14:20 ` Ulf Hansson 2014-11-28 8:52 ` amit daniel kachhap 2014-11-28 8:52 ` amit daniel kachhap 2014-11-28 8:52 ` amit daniel kachhap 2014-11-24 13:04 ` [PATCH RFC v2 08/12] soc: samsung: pm_domain: Add support for parent power domain Amit Daniel Kachhap 2014-11-24 13:04 ` Amit Daniel Kachhap 2014-11-25 7:59 ` Ulf Hansson 2014-11-25 7:59 ` Ulf Hansson 2014-11-25 7:59 ` Ulf Hansson 2014-11-25 8:57 ` amit daniel kachhap 2014-11-25 8:57 ` amit daniel kachhap 2014-11-25 8:57 ` amit daniel kachhap 2014-11-25 9:19 ` Geert Uytterhoeven 2014-11-25 9:19 ` Geert Uytterhoeven 2014-11-25 9:19 ` Geert Uytterhoeven 2014-12-03 8:36 ` Marek Szyprowski 2014-12-03 8:36 ` Marek Szyprowski 2014-12-03 8:36 ` Marek Szyprowski 2014-11-24 13:04 ` [PATCH RFC v2 09/12] drivers: soc: pm_domain: Modify the parent clocks bindings Amit Daniel Kachhap 2014-11-24 13:04 ` Amit Daniel Kachhap 2014-11-24 13:04 ` [PATCH RFC v2 10/12] drivers: soc: samsung: Add support for clock enabling in power domain Amit Daniel Kachhap 2014-11-24 13:04 ` Amit Daniel Kachhap 2014-11-24 13:04 ` [PATCH RFC v2 11/12] drivers: soc: samsung: Add support for clock rate save/restore " Amit Daniel Kachhap 2014-11-24 13:04 ` Amit Daniel Kachhap 2014-11-24 13:04 ` Amit Daniel Kachhap 2014-11-24 13:04 ` [PATCH RFC v2 12/12] arm64: Kconfig: Enable PM_GENERIC_DOMAINS for exynos7 Amit Daniel Kachhap 2014-11-24 13:04 ` Amit Daniel Kachhap
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=1416834256-11225-5-git-send-email-amit.daniel@samsung.com \ --to=amit.daniel@samsung.com \ --cc=devicetree@vger.kernel.org \ --cc=geert@linux-m68k.org \ --cc=kgene.kim@samsung.com \ --cc=khilman@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pm@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=pankaj.dubey@samsung.com \ --cc=rjw@rjwysocki.net \ --cc=s.nawrocki@samsung.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: linkBe 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.