Re: [PATCH] iio: adc: qcom-spmi-adc5-gen3: Allocate unique ADC_TM aux device IDs

From: Jonathan Cameron

Date: Wed Oct 21 2026 - 14:54:25 EST


On Mon, 19 Oct 2026 14:05:10 +0800
Shawn Guo <shengchao.guo@xxxxxxxxxxxxxxxx> wrote:

> On Thu, Oct 08, 2026 at 11:11:54AM +0800, Shawn Guo wrote:
> > adc5_gen3_add_aux_tm_device() never sets the auxiliary device id, so
> > every ADC5 Gen3 instance with at least one qcom,adc-tm channel tries
> > to register the same device name. With ADC_TM channels on more than
> > one PMIC, the second instance to probe fails:
> >
> > sysfs: cannot create duplicate filename '/bus/auxiliary/devices/qcom_spmi_adc5_gen3.adc5_tm_gen3.0'
> > ...
> > auxiliary qcom_spmi_adc5_gen3.adc5_tm_gen3.0: adding auxiliary device failed!: -17
> > qcom-spmi-adc5-gen3 c400000.spmi:pmic@8:adc@7200: error -EEXIST: Failed to add auxiliary TM device
> >
> > The ADC probe then fails as a whole, so that PMIC loses both its IIO
> > channels and its thermal zones. This shows up on Nord, which has
> > thermistor channels on two PMAU0102 PMICs.
> >
> > Allocate the id from a driver-wide IDA and release it from the
> > auxiliary device release callback. The ADC_TM driver matches on the
> > device name only, so the instance number does not affect binding.
> >
>
> Fixes: baff45179e90 ("iio: adc: Add support for QCOM PMIC5 Gen3 ADC")
>
> > Assisted-by: LLM
> > Signed-off-by: Shawn Guo <shengchao.guo@xxxxxxxxxxxxxxxx>

Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks,

Jonathan