Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added

From: Andrew Lunn
Date: Fri Sep 08 2017 - 10:12:34 EST


On Fri, Sep 08, 2017 at 04:32:35PM +0300, Maxim Uvarov wrote:
> 2017-09-08 0:54 GMT+03:00 Andrew Lunn <andrew@xxxxxxx>:
> >> -- compatible: For external switch chips, compatible string must be exactly one
> >> - of: "microchip,ksz9477"
> >> +- compatible: Should be "microchip,ksz9477" for KSZ9477 chip,
> >> + "microchip,ksz8795" for KSZ8795 chip,
> >> + "microchip,ksz8794" for KSZ8794 chip,
> >> + "microchip,ksz8765" for KSZ8765 chip,
> >> + "microchip,ksz8895" for KSZ8895 chip,
> >> + "microchip,ksz8864" for KSZ8864 chip,
> >> + "microchip,ksz8873" for KSZ8873 chip,
> >> + "microchip,ksz8863" for KSZ8863 chip,
> >> + "microchip,ksz8463" for KSZ8463 chip
> >
>
> all that chips have the same spi access to get chip id on probe(). I
> prefer common microship,ksz-spi rather than somebody will always
> maintain that list.

The Marvell DSA driver is similar. The compatibility string tells you
enough to go find the switch ID in the switch itself.

I suppose this comes down to, is there going to be one SPI driver for
all the devices, or lots of drivers? In general, DSA has one driver
for lots of devices. The mv88e6xxx supports around 25 devices. The b53
has around 17, etc.

So i would suggest one driver supporting all the different devices.

Andrew