linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Liao <jamesjj.liao@mediatek.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
	Mike Turquette <mturquette@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	<srv_heupstream@mediatek.com>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Daniel Kurtz <djkurtz@chromium.org>,
	"Ricky Liang" <jcliang@chromium.org>,
	Rob Herring <robh+dt@kernel.org>,
	<linux-mediatek@lists.infradead.org>,
	Henry Chen <henryc.chen@mediatek.com>,
	Sascha Hauer <kernel@pengutronix.de>,
	Yingjoe Chen <yingjoe.chen@mediatek.com>,
	Eddie Huang <eddie.huang@mediatek.com>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 5/5] clk: mediatek: Add USB clock support in MT8173 APMIXEDSYS
Date: Tue, 26 May 2015 17:58:19 +0800	[thread overview]
Message-ID: <1432634299.15597.36.camel@mtksdaap41> (raw)
In-Reply-To: <20150526094140.GH6325@pengutronix.de>

Hi Sascha,

On Tue, 2015-05-26 at 11:41 +0200, Sascha Hauer wrote:
> On Tue, May 26, 2015 at 05:11:15PM +0800, James Liao wrote:
> > On Tue, 2015-05-26 at 10:05 +0200, Sascha Hauer wrote:
> > > On Thu, May 21, 2015 at 03:12:56PM +0800, James Liao wrote:
> > > > +static void __init mtk_clk_register_apmixedsys_special(struct device_node *node,
> > > > +			struct clk_onecell_data *clk_data)
> > > > +{
> > > > +	void __iomem *base;
> > > > +	struct clk *clk;
> > > > +
> > > > +	base = of_iomap(node, 0);
> > > > +	if (!base) {
> > > > +		pr_err("%s(): ioremap failed\n", __func__);
> > > > +		return;
> > > > +	}
> > > > +
> > > > +	clk = mtk_clk_register_ref2usb_tx("ref2usb_tx", base + 0x8);
> > > 
> > > The function seems to be for one special clock only. Why do you pass the
> > > name to it? They will never be called with another name, right?
> > 
> > This function decides clock name and associates clock ID for special
> > clocks. In fact there may be another "special clocks" need to add into
> > apmixedsys. I think it's a better way to group clock names and clock IDs
> > in the same function for maintenance.
> 
> How can a function with ref2usb_tx in its name ever register a clock
> with another name? Then it seems the function name is wrong.

I mean mtk_clk_register_apmixedsys_special() decides the clock names and
clock ID bindings.

mtk_clk_register_ref2usb_tx() is only used by ref2usb_tx clock. Other
special clocks will not share the implementation with ref2usb_tx. But we
can set names and clock IDs for different special clocks in the same
function (mtk_clk_register_apmixedsys_special()) to avoid inconsistence
naming.


Best regards,

James 


  reply	other threads:[~2015-05-26  9:59 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21  7:12 [PATCH 0/5] Add Mediatek MT8173 subsystem clocks support James Liao
2015-05-21  7:12 ` [PATCH 1/5] clk: mediatek: Fix apmixedsys clock registration James Liao
2015-05-26  7:42   ` Sascha Hauer
2015-06-04 21:07   ` Stephen Boyd
2015-05-21  7:12 ` [PATCH 2/5] clk: mediatek: mt8173: Fix enabling of critical clocks James Liao
2015-05-26  7:46   ` Sascha Hauer
2015-05-26  8:36     ` James Liao
2015-05-21  7:12 ` [PATCH 3/5] dt-bindings: ARM: Mediatek: Document devicetree bindings for clock controllers James Liao
2015-05-26  7:56   ` Sascha Hauer
2015-05-26  8:55     ` James Liao
2015-05-26 11:08       ` Sascha Hauer
2015-05-27  6:12         ` Yong Wu
2015-05-27  7:27           ` Sascha Hauer
2015-05-28  5:14             ` Yong Wu
2015-05-21  7:12 ` [PATCH 4/5] clk: mediatek: Add subsystem clocks of MT8173 James Liao
2015-05-22  4:22   ` Daniel Kurtz
2015-05-22  6:03     ` James Liao
2015-06-12 17:09   ` Matthias Brugger
2015-06-15  2:10     ` James Liao
2015-05-21  7:12 ` [PATCH 5/5] clk: mediatek: Add USB clock support in MT8173 APMIXEDSYS James Liao
2015-05-26  8:05   ` Sascha Hauer
2015-05-26  9:11     ` James Liao
2015-05-26  9:41       ` Sascha Hauer
2015-05-26  9:58         ` James Liao [this message]
2015-05-28 13:24 ` [PATCH 0/5] Add Mediatek MT8173 subsystem clocks support Sascha Hauer
2015-05-29  2:47   ` James Liao
2015-05-29  6:23     ` Sascha Hauer
2015-06-04 21:02       ` Stephen Boyd
2015-06-05  1:45         ` James Liao
2015-06-06  0:59           ` Stephen Boyd
2015-06-08  7:27             ` James Liao
2015-06-08  7:48             ` Sascha Hauer
2015-06-11 23:52               ` Stephen Boyd
2015-06-12 17:05                 ` Matthias Brugger

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=1432634299.15597.36.camel@mtksdaap41 \
    --to=jamesjj.liao@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=djkurtz@chromium.org \
    --cc=eddie.huang@mediatek.com \
    --cc=henryc.chen@mediatek.com \
    --cc=jcliang@chromium.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mturquette@linaro.org \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sboyd@codeaurora.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=yingjoe.chen@mediatek.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;
as well as URLs for NNTP newsgroup(s).