public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] iio: adc: qcom-pm8xxx-xoadc: add support for reading channel labels from DT
@ 2026-04-05 16:52 Antony Kurniawan Soemardi
  2026-04-05 16:52 ` [PATCH v3 1/3] ARM: dts: qcom: pm8921: add labels for ADC channels Antony Kurniawan Soemardi
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Antony Kurniawan Soemardi @ 2026-04-05 16:52 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-iio, phone-devel,
	Antony Kurniawan Soemardi, Konrad Dybcio, Dmitry Baryshkov

This series adds support for reading channel labels from the device tree
in the Qualcomm PM8xxx XOADC driver, along with the corresponding DT
updates for the PM8921 PMIC. Also removes the redundant error logs when
reading values, as returning -EINVAL and -ETIMEDOUT are sufficient to
report failures.

Tested on Sony Xperia SP (PM8921):
> cat /sys/bus/iio/devices/iio\:device0/in_voltage7_label
usb_vbus
> cat /sys/bus/iio/devices/iio\:device0/in_temp12_label
ref_muxoff
> sensors
iio_hwmon-isa-0000
Adapter: ISA adapter
vbat:        267.86 V
dcin:          4.82 kV
...
chg_temp:    +1071.4°C

Note: the sensor readings above are incorrect due to pending calibration
fixes are not included in this series. This patch only addresses label
visibility. The values are expected to be wrong until the calibration
fixes lands separately.

Signed-off-by: Antony Kurniawan Soemardi <linux@smankusors.com>
---
Changes in v3:
- Simplify label assignment logic by removing the unnecessary
  conditional branch.
- Remove redundant error logging in pm8xxx_read_channel_rsv, since
  -ETIMEDOUT is sufficient to report failures.
- Link to v2: https://lore.kernel.org/r/20260403-pm8xxx-xoadc-label-v2-0-29b50bf821e6@smankusors.com

Changes in v2:
- Remove redundant error logging in pm8xxx_read_raw, since -EINVAL is
  sufficient to report failures.
- Reword the uncommon Tested-by commit tag to freeform text
- Link to v1: https://lore.kernel.org/r/20260326-pm8xxx-xoadc-label-v1-0-027805dad4db@smankusors.com

Changes since original patch:
- The label is now read from the platform description (device tree)
  instead of the internal datasheet name.
- Link to original patch:
  https://lore.kernel.org/all/20251028-pm8xxx-xoadc-fix-v1-1-b000e1036e41@smankusors.com/

---
Antony Kurniawan Soemardi (3):
      ARM: dts: qcom: pm8921: add labels for ADC channels
      iio: adc: qcom-pm8xxx-xoadc: remove redundant error logs when reading values
      iio: adc: qcom-pm8xxx-xoadc: add support for reading channel labels

 arch/arm/boot/dts/qcom/pm8921.dtsi  | 12 ++++++++++++
 drivers/iio/adc/qcom-pm8xxx-xoadc.c | 34 ++++++++++++++++++++--------------
 2 files changed, 32 insertions(+), 14 deletions(-)
---
base-commit: 5619b098e2fbf3a23bf13d91897056a1fe238c6d
change-id: 20260321-pm8xxx-xoadc-label-47afdf7f06a9

Best regards,
--
Antony Kurniawan Soemardi <linux@smankusors.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-04-06 19:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-05 16:52 [PATCH v3 0/3] iio: adc: qcom-pm8xxx-xoadc: add support for reading channel labels from DT Antony Kurniawan Soemardi
2026-04-05 16:52 ` [PATCH v3 1/3] ARM: dts: qcom: pm8921: add labels for ADC channels Antony Kurniawan Soemardi
2026-04-05 16:52 ` [PATCH v3 2/3] iio: adc: qcom-pm8xxx-xoadc: remove redundant error logs when reading values Antony Kurniawan Soemardi
2026-04-06  1:07   ` Dmitry Baryshkov
2026-04-06 19:44   ` Andy Shevchenko
2026-04-05 16:52 ` [PATCH v3 3/3] iio: adc: qcom-pm8xxx-xoadc: add support for reading channel labels Antony Kurniawan Soemardi
2026-04-06 19:46   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox