Re: [EXTERNAL] Re: [PATCH v1 2/2] ASoC: tas2781: Add tas5832 support

From: andriy.shevchenko@xxxxxxxxxxxxxxx

Date: Mon Mar 02 2026 - 04:45:12 EST


On Mon, Mar 02, 2026 at 10:27:49AM +0100, Krzysztof Kozlowski wrote:
> On 02/03/2026 10:22, Xu, Baojun wrote:
> >> From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
> >> Sent: 02 March 2026 16:58
> >> On 02/03/2026 09:24, Xu, Baojun wrote:

...

> >>>>>>> static const struct of_device_id tasdevice_of_match[] = {

> >>>>>>> { .compatible = "ti,tas5827" },
> >>>>>>> { .compatible = "ti,tas5828" },
> >>>>>>> { .compatible = "ti,tas5830" },
> >>>>>>> + { .compatible = "ti,tas5832" },
> >>>>>>
> >>>>>> So it is fully compatible with tas5830 and most of the changes here are
> >>>>>> not needed?
> >>>>>
> >>>>> Yes, it's fully compatible with tas5827/28/30.
> >>>>
> >>>> Then above hunk and many others are not needed.
> >>>
> >>> Hi, because those chips have different on the voltage, so the parameters
> >>> is different, have to use different firmware binary, so we must identify
> >>> every chip in the driver.
> >>
> >> That would explain other ID tables (and should be briefly mentioned in
> >> the commit msg), but not this one, because here you do not customize the
> >> binary at all.
> >
> > Hi, we save the chip_id in the dev_name:
> > strscpy(tas_priv->dev_name, tasdevice_id[tas_priv->chip_id].name,
> > sizeof(tas_priv->dev_name));
>
> And where do you see the name in above table?

I don't know what you are trying to get from them, but I²C enumeration
on DT platforms works in a way that it takes two tables into account,
hence, if there is no compatible (with given part number) there will be
no matching name.

AFAIK it has to have a compatible to make it work in such a case.
What did I miss?

The code in question is i2c_of_match_device_sysfs() call in
i2c_of_match_device() which does this magic.

> > And get firmware binary from this dev_name:
> > scnprintf(tas_priv->rca_binaryname, 64, "%sRCA%d.bin",
> > tas_priv->dev_name, tas_priv->ndev);
>
> Or here?

--
With Best Regards,
Andy Shevchenko