On Tuesday 05 April 2022 15:14:52 Stefan Roese wrote:
> On 4/5/22 14:49, Pali Rohár wrote:
> > atsha204 chip is predecessor of atsha204a chip. Current U-Boot driver
> > atsha204a-i2c.c can use both atsha204 and atsha204a chips because it does
> > not call specific functions to just one of these chips.
> > 
> > So just add compatible string for atsha204.
> > 
> > Signed-off-by: Pali Rohár <p...@kernel.org>
> > ---
> >   drivers/misc/atsha204a-i2c.c | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c
> > index 63fe541dade3..8b0055f99893 100644
> > --- a/drivers/misc/atsha204a-i2c.c
> > +++ b/drivers/misc/atsha204a-i2c.c
> > @@ -399,6 +399,7 @@ static int atsha204a_of_to_plat(struct udevice *dev)
> >   }
> >   static const struct udevice_id atsha204a_ids[] = {
> > +   { .compatible = "atmel,atsha204" },
> >     { .compatible = "atmel,atsha204a" },
> >     { }
> >   };
> 
> Why do we need this new compatible here in the driver?

They are different chips, so should have different compatible strings.

> A quick grep
> doesn't show this in any of the dts files, not in U-Boot and not in the
> Kernel.

Not yet. I'm preparing patches for a board which has atsha204 and will
use this u-boot driver.

> Just checking...
> 
> Thanks,
> Stefan

Reply via email to