diff mbox series

[v2,5/8] clk: versatile: clk-icst: Support 'reg' in addition to 'vco-offset' for register address

Message ID 20210913192816.1225025-6-robh@kernel.org
State New
Headers show
Series Arm boards syscon 'unit_address_format' clean-ups | expand

Commit Message

Rob Herring Sept. 13, 2021, 7:28 p.m. UTC
The ICST binding now also supports 'reg' in addition to 'vco-offset' for
the VCO register address. Add support to the driver to get the VCO
address from 'reg'.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-clk@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>

---
 drivers/clk/versatile/clk-icst.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.30.2

Comments

Stephen Boyd Sept. 14, 2021, 7:59 p.m. UTC | #1
Quoting Rob Herring (2021-09-13 12:28:13)
> The ICST binding now also supports 'reg' in addition to 'vco-offset' for
> the VCO register address. Add support to the driver to get the VCO
> address from 'reg'.
> 
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-clk@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>

I don't think this driver is changing much so you can take it through DT
tree if you prefer.
Rob Herring Sept. 14, 2021, 10 p.m. UTC | #2
On Tue, Sep 14, 2021 at 12:59:48PM -0700, Stephen Boyd wrote:
> Quoting Rob Herring (2021-09-13 12:28:13)

> > The ICST binding now also supports 'reg' in addition to 'vco-offset' for

> > the VCO register address. Add support to the driver to get the VCO

> > address from 'reg'.

> > 

> > Cc: Linus Walleij <linus.walleij@linaro.org>

> > Cc: Stephen Boyd <sboyd@kernel.org>

> > Cc: linux-arm-kernel@lists.infradead.org

> > Cc: linux-clk@vger.kernel.org

> > Signed-off-by: Rob Herring <robh@kernel.org>

> > ---

> 

> Reviewed-by: Stephen Boyd <sboyd@kernel.org>

> 

> I don't think this driver is changing much so you can take it through DT

> tree if you prefer.


clk tree is fine. :)

Rob
Linus Walleij Sept. 14, 2021, 10:13 p.m. UTC | #3
On Mon, Sep 13, 2021 at 9:28 PM Rob Herring <robh@kernel.org> wrote:

> The ICST binding now also supports 'reg' in addition to 'vco-offset' for

> the VCO register address. Add support to the driver to get the VCO

> address from 'reg'.

>

> Cc: Linus Walleij <linus.walleij@linaro.org>

> Cc: Stephen Boyd <sboyd@kernel.org>

> Cc: linux-arm-kernel@lists.infradead.org

> Cc: linux-clk@vger.kernel.org

> Signed-off-by: Rob Herring <robh@kernel.org>


This is nice.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>


Yours,
Linus Walleij
Stephen Boyd Sept. 15, 2021, 1:10 a.m. UTC | #4
Quoting Rob Herring (2021-09-14 15:00:08)
> On Tue, Sep 14, 2021 at 12:59:48PM -0700, Stephen Boyd wrote:

> > Quoting Rob Herring (2021-09-13 12:28:13)

> > > The ICST binding now also supports 'reg' in addition to 'vco-offset' for

> > > the VCO register address. Add support to the driver to get the VCO

> > > address from 'reg'.

> > > 

> > > Cc: Linus Walleij <linus.walleij@linaro.org>

> > > Cc: Stephen Boyd <sboyd@kernel.org>

> > > Cc: linux-arm-kernel@lists.infradead.org

> > > Cc: linux-clk@vger.kernel.org

> > > Signed-off-by: Rob Herring <robh@kernel.org>

> > > ---

> > 

> > Reviewed-by: Stephen Boyd <sboyd@kernel.org>

> > 

> > I don't think this driver is changing much so you can take it through DT

> > tree if you prefer.

> 

> clk tree is fine. :)

> 


Alright alright
diff mbox series

Patch

diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c
index fdd6aa3cb1fc..77fd0ecaf155 100644
--- a/drivers/clk/versatile/clk-icst.c
+++ b/drivers/clk/versatile/clk-icst.c
@@ -501,7 +501,8 @@  static void __init of_syscon_icst_setup(struct device_node *np)
 		return;
 	}
 
-	if (of_property_read_u32(np, "vco-offset", &icst_desc.vco_offset)) {
+	if (of_property_read_u32(np, "reg", &icst_desc.vco_offset) &&
+	    of_property_read_u32(np, "vco-offset", &icst_desc.vco_offset)) {
 		pr_err("no VCO register offset for ICST clock\n");
 		return;
 	}