[PATCH 2/2] iio: adc: Add Nuvoton MA35D1 EADC driver

Jonathan Cameron jic23 at kernel.org
Wed Jul 1 14:02:13 PDT 2026




> This field has a new name:
> 
> 	chan->scan_type.format = IIO_SCAN_FORMAT_UNSIGNED_INT;
> 
> > +	chan->scan_type.realbits = 12;
> > +	chan->scan_type.storagebits = 16;
> > +	chan->scan_type.endianness = IIO_CPU;
> > +
> > +	if (differential) {
> > +		chan->differential = 1;
> > +		chan->channel2 = vinn;
> > +		snprintf(name, MA35D1_EADC_CHAN_NAME_LEN, "in%d-in%d", vinp,
> > +			 vinn);
> > +	} else {
> > +		snprintf(name, MA35D1_EADC_CHAN_NAME_LEN, "in%d", vinp);
> > +	}
> > +
> > +	chan->datasheet_name = name;  
> 
> We usually don't use datasheet_name. It would make more sense to implement
> labels and get the label from devicetree.

It is used by the consumer interface to find the right channel if we
are using hardcoded iio_map rather than dt based association.

Given this is a SoC ADC it is possible this will be needed. All depends
on how tightly coupled other components are.

It can come in as part of a later series adding such a consumer rather
than now. 

Thanks,

Jonathan



More information about the linux-arm-kernel mailing list