[PATCH 0/2] iio: adc: qcom-pm8xxx-xoadc improvements

Antony Kurniawan Soemardi posted 2 patches 3 months, 2 weeks ago
drivers/iio/adc/qcom-pm8xxx-xoadc.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
[PATCH 0/2] iio: adc: qcom-pm8xxx-xoadc improvements
Posted by Antony Kurniawan Soemardi 3 months, 2 weeks ago
This small series improves the Qualcomm PM8xxx XOADC driver in two ways:

1. Adds support for reading channel labels through sysfs.
   This helps user-space tools identify ADC channels by name.

2. Fixes incorrect calibration values used on msm8960-based devices.
   Previously, the driver failed to apply the proper ratiometric scaling
   and incorrectly set certain bits in the ADC_ARB_USRP_DIG_PARAM
   register. This resulted in inaccurate voltage readings from the IIO
   interface. With the fix, calibration values now match downstream
   implementations, and readings for channels like USB_VBUS and 125V
   are correct.

Tested on Sony Xperia SP.

Signed-off-by: Antony Kurniawan Soemardi <linux@smankusors.com>
---
Antony Kurniawan Soemardi (2):
      iio: adc: qcom-pm8xxx-xoadc: add support for reading channel labels
      iio: adc: qcom-pm8xxx-xoadc: fix incorrect calibration values

 drivers/iio/adc/qcom-pm8xxx-xoadc.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
---
base-commit: dcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa
change-id: 20251018-pm8xxx-xoadc-fix-b98f8ff20f57

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