Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1461547 > unrolled thread

Re: [PATCH v9 06/10] clk: mediatek: Add MT2701 clock support

Started byStephen Boyd <sboyd@codeaurora.org>
First post2016-08-13 02:50 +0200
Last post2016-08-15 20:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v9 06/10] clk: mediatek: Add MT2701 clock support Stephen Boyd <sboyd@codeaurora.org> - 2016-08-13 02:50 +0200
    Re: [PATCH v9 06/10] clk: mediatek: Add MT2701 clock support James Liao <jamesjj.liao@mediatek.com> - 2016-08-15 05:10 +0200
      Re: [PATCH v9 06/10] clk: mediatek: Add MT2701 clock support Stephen Boyd <sboyd@codeaurora.org> - 2016-08-15 20:20 +0200

#1461547 — Re: [PATCH v9 06/10] clk: mediatek: Add MT2701 clock support

FromStephen Boyd <sboyd@codeaurora.org>
Date2016-08-13 02:50 +0200
SubjectRe: [PATCH v9 06/10] clk: mediatek: Add MT2701 clock support
Message-ID<s5vjb-IH-1@gated-at.bofh.it>
On 06/22, Erin Lo wrote:
> diff --git a/drivers/clk/mediatek/clk-mt2701-bdp.c b/drivers/clk/mediatek/clk-mt2701-bdp.c
> new file mode 100644
> index 0000000..81f628c
> --- /dev/null
> +++ b/drivers/clk/mediatek/clk-mt2701-bdp.c
> @@ -0,0 +1,140 @@
> +/*
> + * Copyright (c) 2014 MediaTek Inc.
> + * Author: Shunli Wang <shunli.wang@mediatek.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */
> +
> +#include <linux/clk.h>

Is this include used? I would expect clk-provider.h instead.

> +#include <linux/platform_device.h>
> +
> +#include "clk-mtk.h"
> +#include "clk-gate.h"
> +
> +#include <dt-bindings/clock/mt2701-clk.h>
> +
[..]
> +
> +static void mtk_bdpsys_init(struct device_node *node)
> +{
> +	struct clk_onecell_data *clk_data;
> +	int r;
> +
> +	clk_data = mtk_alloc_clk_data(CLK_BDP_NR);
> +
> +	mtk_clk_register_gates(node, bdp_clks, ARRAY_SIZE(bdp_clks),
> +						clk_data);
> +
> +	r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);

Is it possible to move to of_clk_add_hw_provider()? It can be
done later if that would mean changing all
mtk_clk_register_gates() users.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [next] | [standalone]


#1462534

FromJames Liao <jamesjj.liao@mediatek.com>
Date2016-08-15 05:10 +0200
Message-ID<s6grM-8uf-9@gated-at.bofh.it>
In reply to#1461547
Hi Stephen,

On Fri, 2016-08-12 at 17:44 -0700, Stephen Boyd wrote:
> On 06/22, Erin Lo wrote:
> > diff --git a/drivers/clk/mediatek/clk-mt2701-bdp.c b/drivers/clk/mediatek/clk-mt2701-bdp.c
> > new file mode 100644
> > index 0000000..81f628c
> > --- /dev/null
> > +++ b/drivers/clk/mediatek/clk-mt2701-bdp.c
> > @@ -0,0 +1,140 @@
> > +/*
> > + * Copyright (c) 2014 MediaTek Inc.
> > + * Author: Shunli Wang <shunli.wang@mediatek.com>
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + *
> > + * This program is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > + * GNU General Public License for more details.
> > + */
> > +
> > +#include <linux/clk.h>
> 
> Is this include used? I would expect clk-provider.h instead.

Yes, it can be replaced with clk-provider.h. I'll change it in next
patch series.

> > +#include <linux/platform_device.h>
> > +
> > +#include "clk-mtk.h"
> > +#include "clk-gate.h"
> > +
> > +#include <dt-bindings/clock/mt2701-clk.h>
> > +
> [..]
> > +
> > +static void mtk_bdpsys_init(struct device_node *node)
> > +{
> > +	struct clk_onecell_data *clk_data;
> > +	int r;
> > +
> > +	clk_data = mtk_alloc_clk_data(CLK_BDP_NR);
> > +
> > +	mtk_clk_register_gates(node, bdp_clks, ARRAY_SIZE(bdp_clks),
> > +						clk_data);
> > +
> > +	r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
> 
> Is it possible to move to of_clk_add_hw_provider()? It can be
> done later if that would mean changing all
> mtk_clk_register_gates() users.

I would like to keep current implementation due to test/integration
effort. I prefer to apply clk_hw related APIs on new clk drivers instead
of modify existing drivers.


Best regards,

James

[toc] | [prev] | [next] | [standalone]


#1463073

FromStephen Boyd <sboyd@codeaurora.org>
Date2016-08-15 20:20 +0200
Message-ID<s6uEp-z8-15@gated-at.bofh.it>
In reply to#1462534
On 08/15, James Liao wrote:
> On Fri, 2016-08-12 at 17:44 -0700, Stephen Boyd wrote:
> > On 06/22, Erin Lo wrote:
> > > +
> > > +static void mtk_bdpsys_init(struct device_node *node)
> > > +{
> > > +	struct clk_onecell_data *clk_data;
> > > +	int r;
> > > +
> > > +	clk_data = mtk_alloc_clk_data(CLK_BDP_NR);
> > > +
> > > +	mtk_clk_register_gates(node, bdp_clks, ARRAY_SIZE(bdp_clks),
> > > +						clk_data);
> > > +
> > > +	r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
> > 
> > Is it possible to move to of_clk_add_hw_provider()? It can be
> > done later if that would mean changing all
> > mtk_clk_register_gates() users.
> 
> I would like to keep current implementation due to test/integration
> effort. I prefer to apply clk_hw related APIs on new clk drivers instead
> of modify existing drivers.
> 

Sure, no problem.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web