Re: [PATCH 5/6] Clocklib: Use correct clock for IrDA on pxa

From: Dmitry
Date: Tue Apr 08 2008 - 05:47:47 EST


Hi,

2008/4/8, Russell King <rmk+lkml@xxxxxxxxxxxxxxxx>:
> On Mon, Apr 07, 2008 at 04:00:29PM -0700, Andrew Morton wrote:
> > On Thu, 3 Apr 2008 17:24:02 +0400
> > Dmitry Baryshkov <dbaryshkov@xxxxxxxxx> wrote:
> >
> > > Signed-off-by: Dmitry Baryshkov <dbaryshkov@xxxxxxxxx>
> > > ---
> > > drivers/net/irda/pxaficp_ir.c | 2 +-
> > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
> > > index 8c09344..36d2ec0 100644
> > > --- a/drivers/net/irda/pxaficp_ir.c
> > > +++ b/drivers/net/irda/pxaficp_ir.c
> > > @@ -814,7 +814,7 @@ static int pxa_irda_probe(struct platform_device *pdev)
> > > si->dev = &pdev->dev;
> > > si->pdata = pdev->dev.platform_data;
> > >
> > > - si->sir_clk = clk_get(&pdev->dev, "UARTCLK");
> > > + si->sir_clk = clk_get(&pdev->dev, "SIRCLK");
> > > si->fir_clk = clk_get(&pdev->dev, "FICPCLK");
> > > if (IS_ERR(si->sir_clk) || IS_ERR(si->fir_clk)) {
> > > err = PTR_ERR(IS_ERR(si->sir_clk) ? si->sir_clk : si->fir_clk);
> >
> > When fixing a bug, please describe what the bug is, and how the patch fixes
> > it.
> >
> > A patch needs to be very very obvious to be able to get away with no
> > changelog, and this one is not very very obvious.
>
>
> It's not a bug fix - it's a stupidity of the clock lib that the API
> doesn't really require.
>
> I've not made up my mind what to do with this stuff, but if it requires
> drivers to work around its short comings, then I'm not in favour of it.
>
> (We have the above code working as is.)

Yes, it works currently. But there are a few problems: we declare
STUART's UARTCLK with dev=NULL (all other UARTCLKs are declared with
proper devices).
Therefore, I consider it as a hack and would like to remove it. As
the clocklib allows
to register multiple children clocks with different names, I'd propose
to separate UARTCLK
and SIRCLK functions of STUART clock. The UARTCLK will be used (as
usual) by the pxa uart driver. And IrDA will use SIRCLK.

--
With best wishes
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/