Patrick Wildt <[email protected]> wrote:

> On Tue, Sep 29, 2020 at 11:23:03AM -0600, Theo de Raadt wrote:
> > +       if (strcmp(ia->ia_name, "st,m41t83") == 0)
> > 
> > fine with me.  But in that case, why not call the driver i2c/m41t83.c
> 
> Because it's a series of chips, like m41t80, m41t81, m41t82.  Machines
> and their device trees encode the specific chip, because some versions
> might have a different feature set as others.  We do the same x-place-
> holder-notation for other drivers as well.
> 
> For now I only match on st,m41t83 since that is the version of the chip
> the driver was originally written for.  For every additional supported
> variant of that series, the code needs to be checked for correctness.
> 
> But the file is still supposed to cover more than this one specific
> variant of the series.

If it supports many chips, why are you only matching for one variation?
To save code bytes, I guess.  But later on, will there be any variation
handling in the driver?  Not having checked the vendor docs, I suspect
they are highly compatible.  In chips like this, the variation tends
to be electronics, or power connectivity or such, rather than register
or behaviour layout.

The other way this works, is the new chip has a very similar number
but totally different behaviour.

Which is it?

Reply via email to