Re: [PATCH v2 3/3] clk: qcom: lcc-ipq806x: convert to parent data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 06, 2022 at 10:34:04AM +0300, Dmitry Baryshkov wrote:
> On Tue, 5 Jul 2022 at 23:48, Christian Marangi <ansuelsmth@xxxxxxxxx> wrote:
> >
> > On Tue, Jun 21, 2022 at 11:43:10PM +0300, Dmitry Baryshkov wrote:
> > > On Tue, 21 Jun 2022 at 23:23, Christian Marangi <ansuelsmth@xxxxxxxxx> wrote:
> > > >
> > > > On Tue, Jun 21, 2022 at 08:15:57PM +0300, Dmitry Baryshkov wrote:
> > > > > On Tue, 21 Jun 2022 at 19:33, Christian Marangi <ansuelsmth@xxxxxxxxx> wrote:
> > > > > >
> > > > > > Convert lcc-ipq806x driver to parent_data API.
> > > > > >
> > > > > > Signed-off-by: Christian Marangi <ansuelsmth@xxxxxxxxx>
> > > > > > ---
> > > > > > v2:
> > > > > > - Fix Sob tag
> > > > > >
> > > > > >  drivers/clk/qcom/lcc-ipq806x.c | 79 +++++++++++++++++++---------------
> > > > > >  1 file changed, 44 insertions(+), 35 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/clk/qcom/lcc-ipq806x.c b/drivers/clk/qcom/lcc-ipq806x.c
> > > > > > index ba90bebba597..c07ca8dc6e3a 100644
> > > > > > --- a/drivers/clk/qcom/lcc-ipq806x.c
> > > > > > +++ b/drivers/clk/qcom/lcc-ipq806x.c
> > > > > > @@ -24,6 +24,10 @@
> > > > > >  #include "clk-regmap-mux.h"
> > > > > >  #include "reset.h"
> > > > > >
> > > > > > +static const struct clk_parent_data gcc_pxo[] = {
> > > > > > +       { .fw_name = "pxo", .name = "pxo" },
> > > > >
> > > > > I think you'd use .name = "pxo_board" here. You don't need to use the
> > > > > interim clock.
> > > > >
> > > >
> > > > In gcc and in the rest of this driver we use pxo. Wonder what is right?
> > >
> > > I'd use .fw_name = "pxo", .name = "pxo_board", like the rest of drivers do.
> > >
> >
> > Will do the change, but I need an explaination... Is the use of
> > pxo_board correct?
> >
> > I'm sending a patch that sets the pxo_board fixed clock in dts to output
> > "pxo". The only clock that still use pxo_board is rpm, everything else
> > at least for ipq806x use pxo and i'm sending a patch to use pxo for rpm.
> >
> > Considering pxo is always present and pxo_board should be dropped
> > because every ipq806x driver use "pxo".
> >
> > What is correct naming pxo or pxo_board? I assume pxo right?
> 
> This might be not the case for the ipq806x, but here is the story for
> all other (old) platforms:
> - gcc driver manually registered pxo/cxo/xo fixed factor clocks.
> - Then we started adding *xo_board clocks to the DT, as they represent
> the external oscillators
> -  PXO clock consumers receive a clocks entry with clock-names = "pxo"
> which points to the pxo_board
> - All clock drivers are now being switched to use .fw_name = "pxo",
> .name = "pxo_board" to use the DT-defined pxo_board clock.
> 
> Hopefully at some point we can then drop the manually registered pxo
> clock and always use the DT-based one.
>

Okok. I got confused since looking at the code factor clock is really
just a hack to handle both driver that use pxo_board and pxo cause from
what I notice it's the same clock with different naming.

Sooo keep using pxo_board with the fact that pxo is always present seems
to be redundant but if that's the pattern then I will just keep
pxo_board in .name where it's used.

> -- 
> With best wishes
> Dmitry

-- 
	Ansuel



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux