Re: [PATCH v7 1/2] spi: Add Renesas R-Car Gen3 RPC-IF SPI controller driver
From: Geert Uytterhoeven
Date: Thu Jan 24 2019 - 04:13:10 EST
Hi Mason,
On Thu, Jan 24, 2019 at 3:07 AM <masonccyang@xxxxxxxxxxx> wrote:
> > "Sergei Shtylyov" <sergei.shtylyov@xxxxxxxxxxxxxxxxxx>
> > 2019/01/24 äå 02:04
> > > +static const struct of_device_id rpc_spi_of_ids[] = {
> > > + { .compatible = "renesas,r8a77995-rpc", },
> >
> > Why (if it has no differences with the generic gen3 value below)?
> > Please remove.
>
> By Geert's comments in dts,
>
> rpc: rpc@ee200000 {
> compatible = "renesas,r8a7795-rpc", "renesas,rcar-gen3-rpc";
> reg = <0 0xee200000 0 0x200>, <0 0x08000000 0 0x4000000>,
> <0 0xee208000 0 0x100>;
>
> I modified it to "renesas,r8a77995-rpc" because this is Soc I developed and validated.
There's a difference between compatible values in DT and in drivers:
- DT should list all compatible values that are applicable, from
most-specific to least-specific,
- Drivers should match against the least-specific compatible value that
is sufficient to get the job done.
In this case, that's "renesas,rcar-gen3-rpc".
The driver will probably have to be extended to match against
"renesas,r8a77970-rpc" when R-Car V3M support is added, as RPC on V3M
has an extra register that must be set, and thus cannot be declared
compatible with "renesas,rcar-gen3-rpc".
I hope this explanation makes it clearer.
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