> That's moving the same problem from one place to another instead of
> eliminating it: you need to rewrite some part of the driver for each
> chip/subchip.
 
No, you wouldn't need that. The device driver will receive a generic GPIO 
handling
interface and it would simply assert/deassert CS line without knowing the 
specifics
of the GPIO impementation on the given architecture. The GPIO interface would be
implemented at arch level (and I believe some arch's are already implemented).

During initialization of this device driver lower-half, the GPIO interface 
instance
would be initialized to the correct CS line for this driver instance.

Further improvements (minimizing board bringup code to support a driver) could 
be achieved
but with more involved changes. I have some ideas on that (related to my 
initial attempt at
supporting device tree) but I would like to discuss that only when I think I 
would be
able to pursue it.

Best,
Matias


Reply via email to