RE: [EXTERNAL] Re: [PATCH v1 2/2] ASoC: tas2781: Add tas5832 support
From: Ding, Shenghao
Date: Fri Mar 06 2026 - 05:09:10 EST
Hi, Krzysztof & Andy,
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
> Sent: Monday, March 2, 2026 6:09 PM
> To: andriy.shevchenko@xxxxxxxxxxxxxxx
> Cc: Xu, Baojun <baojun.xu@xxxxxx>; broonie@xxxxxxxxxx; tiwai@xxxxxxx;
> 13916275206@xxxxxxx; Ding, Shenghao <shenghao-ding@xxxxxx>; linux-
> sound@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; lgirdwood@xxxxxxxxx;
> robh@xxxxxxxxxx; krzk+dt@xxxxxxxxxx; conor+dt@xxxxxxxxxx;
> devicetree@xxxxxxxxxxxxxxx; Yi, Ken <k-yi@xxxxxx>; Lo, Henry
> <henry.lo@xxxxxx>; Chen, Robin <robinchen@xxxxxx>; Wang, Will <will-
> wang@xxxxxx>; jim.shil@xxxxxxxxxxx; toastcheng@xxxxxxxxxx;
> chinkaiting@xxxxxxxxxx
> Subject: Re: [EXTERNAL] Re: [PATCH v1 2/2] ASoC: tas2781: Add tas5832
> support
>
...
> > ...
> >
> >>>>>>>>> static const struct of_device_id tasdevice_of_match[] = {
> >
> >>>>>>>>> { .compatible = "ti,tas5827" },
> >>>>>>>>> { .compatible = "ti,tas5828" },
> >>>>>>>>> { .compatible = "ti,tas5830" },
> >>>>>>>>> + { .compatible = "ti,tas5832" },
> >>>>>>>>
...
> >
> > 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?
>
> Show me please then how the OF table is used here at all to get the name.
This code will also be used for ACPI devices. To ensure consistent bin file
naming between ACPI and DTS devices, the mapping table tasdevice_id[]
has been introduced.
The code retrieves the corresponding name of the chip from tasdevice_id[]
based on its order in tasdevice_of_match[] or tasdevice_acpi_match[].
This information is then concatenated to form the name of the bin file.
>
> >
> > The code in question is i2c_of_match_device_sysfs() call in
> > i2c_of_match_device() which does this magic.
>
> Added entry is not by i2c_of_match_device(), so if you use that as argument we
> can conclude - this is completely redundant, so remove it.
>
>
>
> Best regards,
> Krzysztof
BR
Shenghao