Re: [PATCH 1/2] iio: adc: qcom-pm8xxx-xoadc: add support for reading channel labels

From: Andy Shevchenko

Date: Tue Oct 28 2025 - 05:55:21 EST


On Mon, Oct 27, 2025 at 05:29:16PM +0000, Antony Kurniawan Soemardi wrote:
> This allows user-space tools to identify ADC channels by name through
> the IIO sysfs interface.

...

> +static int pm8xxx_read_label(struct iio_dev *indio_dev,
> + struct iio_chan_spec const *chan, char *label)
> +{
> + return sysfs_emit(label, "%s\n", chan->datasheet_name);
> +}

Hmm... In another thread there is a discussion on label vs. datasheet_name.
So, why datasheet name and not something that it's more reliable as a platform
description? As far as I understand there many mysterious ways of HW
engineering and how to connect available pins to something interesting. Even
datasheet names may be quite mislead on a certain platform (due to above).
I would expect this to come from DT or another platform description and user
space should rely on the information from _there_.

--
With Best Regards,
Andy Shevchenko