lkml.org 
[lkml]   [2019]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/12] clocksource/drivers/tcb_clksrc: stop depending on atmel_tclib
On 11/04/2019 18:19:34+0200, Daniel Lezcano wrote:
> > + tc.clk[0] = t0_clk;
> > + tc.clk[1] = of_clk_get_by_name(node->parent, "t1_clk");
> > + if (IS_ERR(tc.clk[1]))
> > + tc.clk[1] = t0_clk;
> > + tc.clk[2] = of_clk_get_by_name(node->parent, "t2_clk");
> > + if (IS_ERR(tc.clk[2]))
> > + tc.clk[2] = t0_clk;
> > + tc.irq[0] = irq;
> > + tc.irq[1] = of_irq_get(node->parent, 1);
> > + if (tc.irq[1] <= 0)
> > + tc.irq[1] = irq;
> > + tc.irq[2] = of_irq_get(node->parent, 2);
> > + if (tc.irq[2] <= 0)
> > + tc.irq[2] = irq;
>
> Why are clk[1/2] and irq[1/2] defaulting back to t0 in case of error?
>

This is how the DT binding is madewhen the same IRQ/clk is used for all
the channels of the TCB, then it is only specified once. Unfortunately,
this has to be kept to keep backward DT compatibility. Still, I'm
reworking the irq paring as the driver only needs the irq for channel 2.

--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

\
 
 \ /
  Last update: 2019-04-15 16:15    [W:0.070 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site