From: Krzysztof Kozlowski <krzk@kernel.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Javier Martinez Canillas <javier@osg.samsung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Inki Dae <inki.dae@samsung.com>
Subject: Re: [PATCH v2 4/4] soc: samsung: pm_domains: Provide real name for all supported domains
Date: Sat, 28 Jan 2017 17:16:22 +0200 [thread overview]
Message-ID: <20170128151622.scfqft3hxfdjh7ca@kozik-lap> (raw)
In-Reply-To: <1485528538-30256-1-git-send-email-m.szyprowski@samsung.com>
On Fri, Jan 27, 2017 at 03:48:58PM +0100, Marek Szyprowski wrote:
> Device tree nodes for each power domain should use generic "power-domain"
> name, so using it as a domain name doesn't give much benefits. This patch
> adds human readable names for all supported domains, what makes debugging
> much easier.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> Changelog:
> v2:
> - sorted all domains data by domain base address in the arrays
> ---
> drivers/soc/samsung/pm_domains.c | 125 ++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 123 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/soc/samsung/pm_domains.c b/drivers/soc/samsung/pm_domains.c
> index 5a0a46bcbe18..43003318b948 100644
> --- a/drivers/soc/samsung/pm_domains.c
> +++ b/drivers/soc/samsung/pm_domains.c
> @@ -30,6 +30,17 @@ struct exynos_pm_domain_config {
> u32 local_pwr_cfg;
> };
>
> +struct exynos_pm_domain_data {
> + const char *name;
> + u32 base;
> +};
> +
> +struct exynos_pm_domain_soc_data {
> + const char *compatible;
> + unsigned int nr_domains;
> + const struct exynos_pm_domain_data *domains;
> +};
> +
> /*
> * Exynos specific wrapper around the generic power domain
> */
> @@ -123,6 +134,91 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
> return exynos_pd_power(domain, false);
> }
>
> +static const struct exynos_pm_domain_data exynos4210_domains[] __initconst = {
> + { "LCD1", 0x10023CA0 },
> +};
> +
> +static const struct exynos_pm_domain_data exynos4412_domains[] __initconst = {
> + { "CAM", 0x10023C00 },
> + { "TV", 0x10023C20 },
> + { "MFC", 0x10023C40 },
> + { "G3D", 0x10023C60 },
> + { "LCD0", 0x10023C80 },
> + { "ISP", 0x10023CA0 },
> + { "GPS", 0x10023CE0 },
> + { "GPS alive", 0x10023D00 },
That is a kind of duplication of DT and also spreading the description
of hardware between DT and driver. I understand the purpose. Messages
like:
"power-domain has as child subdomain: power-domain."
are useless. However I do not like putting any of these in the driver.
How about adding a property "label" and parse it? Some other
drivers/nodes are using labels already to have a meaningful name, either
for user-space or for just user.
Patches 1-3 look fine.
Best regards,
Krzysztof
next prev parent reply other threads:[~2017-01-28 15:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170127104801eucas1p2ca06f8ba0b44e41c0f7dbf0c571bb9a3@eucas1p2.samsung.com>
2017-01-27 10:47 ` [PATCH 0/4] Provide real domain names for Exynos power domain driver Marek Szyprowski
2017-01-27 10:47 ` [PATCH 1/4] soc: samsung: pm_domains: Use full names in subdomains registration log Marek Szyprowski
2017-01-27 10:47 ` [PATCH 2/4] soc: samsung: pm_domains: Remove unused name field Marek Szyprowski
2017-01-27 10:47 ` [PATCH 3/4] soc: samsung: pm_domains: Remove message about failed memory allocation Marek Szyprowski
2017-01-27 10:47 ` [PATCH 4/4] soc: samsung: pm_domains: Provide real name for all supported domains Marek Szyprowski
2017-01-27 14:48 ` [PATCH v2 " Marek Szyprowski
2017-01-28 15:16 ` Krzysztof Kozlowski [this message]
2017-01-30 10:41 ` Marek Szyprowski
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=20170128151622.scfqft3hxfdjh7ca@kozik-lap \
--to=krzk@kernel.org \
--cc=b.zolnierkie@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=inki.dae@samsung.com \
--cc=javier@osg.samsung.com \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=s.nawrocki@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox