Re: [PATCH 2/2] serial: sh-sci: Document r7s9210 bindings

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

 



Hi Chris,

On Wed, Jul 25, 2018 at 2:05 PM Chris Brandt <Chris.Brandt@xxxxxxxxxxx> wrote:
> On Wednesday, July 25, 2018, Geert Uytterhoeven wrote:
> > > However, if "interrupt-names" is specified in DT, then the driver
> > > determines what the interrupt are based on their names, not the order in
> > which
> > > they are listed.
> > >
> > > Correct?
> >
> > Correct.
>
> One final note on this before I submit v2 of the patch.
>
> I just coded up something that works and is more simple and I don't even
> need "interrupt-names".
>
> Basically by using your suggestion from the code review made everything
> work.
>
> On Friday, July 20, 2018, Geert Uytterhoeven wrote:
> > > --- a/drivers/tty/serial/sh-sci.c
> > > +++ b/drivers/tty/serial/sh-sci.c
> > > @@ -65,6 +65,7 @@ enum {
> > >         SCIx_RXI_IRQ,
> > >         SCIx_TXI_IRQ,
> > >         SCIx_BRI_IRQ,
> > > +       SCIx_TEIDRI_IRQ,
> >
> > Why not separate enum values for TEI and DRI? According to the RZ/A2 docs,
> > there are 6 separate interrupts, but they are multiplexed at the interrupt
> > controller level.
>
>
> enum {
>         SCIx_ERI_IRQ,
>         SCIx_RXI_IRQ,
>         SCIx_TXI_IRQ,
>         SCIx_BRI_IRQ,
> +       SCIx_DRI_IRQ,
> +       SCIx_TEI_IRQ,
>         SCIx_NR_IRQS,
>
>         SCIx_MUX_IRQ = SCIx_NR_IRQS,    /* special case */
> };
>
> Listing the same interrupt ID number twice in the DT (because it is
> muxed) is fine because the driver will check for that.
>
> This seems to satisfy all the SCI/SCIF variants in all the SH and ARM
> SoCs in the kernel today (DT and non-DT).
>
> So as long as I describe the interrupt order in the DT Documentation,
> all seems good.

Yes, that should work too.

"interrupt-names" is handy for DTS writers, so they don't have to look up the
order in the bindings, and it's less likely they make mistakes in the
order of the
interrupts.

However, as soon as there will be an SoC where you will need a "hole"
in the list,
you're gonna need interrupt-names anyway.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux