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

Ding, Shenghao
2026-03-06T10:08:57Z

Hi, Krzysztof & Andy,

> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: Monday, March 2, 2026 6:09 PM
> To: andriy.shevchenko@linux.intel.com
> Cc: Xu, Baojun <baojun.xu@ti.com>; broonie@kernel.org; tiwai@suse.de;
> 13916275206@139.com; Ding, Shenghao <shenghao-ding@ti.com>; linux-
> sound@vger.kernel.org; linux-kernel@vger.kernel.org; lgirdwood@gmail.com;
> robh@kernel.org; krzk+dt@kernel.org; conor+dt@kernel.org;
> devicetree@vger.kernel.org; Yi, Ken <k-yi@ti.com>; Lo, Henry
> <henry.lo@ti.com>; Chen, Robin <robinchen@ti.com>; Wang, Will <will-
> wang@ti.com>; jim.shil@goertek.com; toastcheng@google.com;
> chinkaiting@google.com
> 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