From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] clk: hi3660: Clock driver support for Hisilicon hi3660 SoC
Date: Thu, 22 Dec 2016 12:51:12 -0800 [thread overview]
Message-ID: <20161222205112.GD8288@codeaurora.org> (raw)
In-Reply-To: <fc7bebd2-ad03-6479-d6e7-42f5d724216c@linaro.org>
On 12/22, zhangfei wrote:
> On 2016?12?22? 07:25, Stephen Boyd wrote:
> >On 12/15, Zhangfei Gao wrote:
> >>Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
> >
> >>+
> >>+ switch (type) {
> >>+ case HI3660_CRGCTRL:
> >>+ hi3660_clk_crgctrl_init(np);
> >>+ break;
> >>+ case HI3660_PCTRL:
> >>+ hi3660_clk_pctrl_init(np);
> >>+ break;
> >>+ case HI3660_PMUCTRL:
> >>+ hi3660_clk_pmuctrl_init(np);
> >>+ break;
> >>+ case HI3660_SCTRL:
> >>+ hi3660_clk_sctrl_init(np);
> >>+ break;
> >>+ case HI3660_IOMCU:
> >>+ hi3660_clk_iomcu_init(np);
> >>+ break;
> >This "multi-device" driver design is sort of odd. Why not have
> >different files and struct drivers for the different devices in
> >the system that are clock controllers? I don't really understand
> >why we're controlling the devices with one struct driver
> >instance. Is something shared between the devices?
> Do you mean put in different .c / drivers?
Yes.
> They have to be put in the same file, since the parent / child
> relate to each other.
We handle clk parent/child relationships through strings. So why
does that mean we need to put these in the same file with the
same struct driver?
> They are for the same chip, but some put in different region for
> privilege control.
Ok.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: zhangfei <zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
haojian.zhuang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
guodong Xu <guodong.xu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] clk: hi3660: Clock driver support for Hisilicon hi3660 SoC
Date: Thu, 22 Dec 2016 12:51:12 -0800 [thread overview]
Message-ID: <20161222205112.GD8288@codeaurora.org> (raw)
In-Reply-To: <fc7bebd2-ad03-6479-d6e7-42f5d724216c-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
On 12/22, zhangfei wrote:
> On 2016年12月22日 07:25, Stephen Boyd wrote:
> >On 12/15, Zhangfei Gao wrote:
> >>Signed-off-by: Zhangfei Gao <zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> >
> >>+
> >>+ switch (type) {
> >>+ case HI3660_CRGCTRL:
> >>+ hi3660_clk_crgctrl_init(np);
> >>+ break;
> >>+ case HI3660_PCTRL:
> >>+ hi3660_clk_pctrl_init(np);
> >>+ break;
> >>+ case HI3660_PMUCTRL:
> >>+ hi3660_clk_pmuctrl_init(np);
> >>+ break;
> >>+ case HI3660_SCTRL:
> >>+ hi3660_clk_sctrl_init(np);
> >>+ break;
> >>+ case HI3660_IOMCU:
> >>+ hi3660_clk_iomcu_init(np);
> >>+ break;
> >This "multi-device" driver design is sort of odd. Why not have
> >different files and struct drivers for the different devices in
> >the system that are clock controllers? I don't really understand
> >why we're controlling the devices with one struct driver
> >instance. Is something shared between the devices?
> Do you mean put in different .c / drivers?
Yes.
> They have to be put in the same file, since the parent / child
> relate to each other.
We handle clk parent/child relationships through strings. So why
does that mean we need to put these in the same file with the
same struct driver?
> They are for the same chip, but some put in different region for
> privilege control.
Ok.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-12-22 20:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-15 5:58 [PATCH 0/2] add clk-hi3660 Zhangfei Gao
2016-12-15 5:58 ` Zhangfei Gao
2016-12-15 5:58 ` [PATCH 1/2] dt-bindings: Document the hi3660 clock bindings Zhangfei Gao
2016-12-15 5:58 ` Zhangfei Gao
2016-12-19 22:15 ` Rob Herring
2016-12-19 22:15 ` Rob Herring
2016-12-15 5:58 ` [PATCH 2/2] clk: hi3660: Clock driver support for Hisilicon hi3660 SoC Zhangfei Gao
2016-12-15 5:58 ` Zhangfei Gao
2016-12-21 23:25 ` Stephen Boyd
2016-12-21 23:25 ` Stephen Boyd
2016-12-22 2:01 ` zhangfei
2016-12-22 2:01 ` zhangfei
2016-12-22 20:51 ` Stephen Boyd [this message]
2016-12-22 20:51 ` Stephen Boyd
2016-12-23 2:37 ` zhangfei
2016-12-23 2:37 ` zhangfei
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=20161222205112.GD8288@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.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.