[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251028-pm8xxx-xoadc-fix-v1-0-b000e1036e41@smankusors.com>
Date: Mon, 27 Oct 2025 17:29:14 +0000 (UTC)
From: Antony Kurniawan Soemardi <linux@...nkusors.com>
To: Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>
Cc: linux-arm-msm@...r.kernel.org, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org,
Antony Kurniawan Soemardi <linux@...nkusors.com>
Subject: [PATCH 0/2] iio: adc: qcom-pm8xxx-xoadc improvements
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@...nkusors.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@...nkusors.com>
Powered by blists - more mailing lists