linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/7] iio: adc: introduce Qualcomm SPMI Round Robin ADC
@ 2022-01-06 17:31 Caleb Connolly
  2022-01-06 17:31 ` [PATCH v3 1/7] mfd: qcom-spmi-pmic: expose the PMIC revid information to clients Caleb Connolly
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Caleb Connolly @ 2022-01-06 17:31 UTC (permalink / raw)
  To: caleb.connolly, Jonathan Cameron, Lars-Peter Clausen,
	Rob Herring, Andy Gross, Bjorn Andersson, Lee Jones, linux-iio,
	devicetree, linux-kernel, linux-arm-msm
  Cc: sumit.semwal, amit.pundir, john.stultz

The RRADC is responsible for reading data about the current and
voltage from the USB or DC in jacks, it can also read the battery
ID (resistence) and some temperatures. It is found on the PMI8998 and
PM660 Qualcomm PMICs.

The RRADC has to calibrate some ADC values based on which chip fab
the PMIC was produced in, to facilitate this the patch
("mfd: qcom-spmi-pmic: expose the PMIC revid information to clients")
exposes the PMIC revision information as a struct and registers it
as driver data in the Qualcomm SPMI PMIC driver so that it can be 
read by the RRADC.

Changes since v2:
 * Add missing include (thanks kernel test robot :D)
 * Rework some confusing function return values, specifically
   rradc_read_status_in_cont_mode and rradc_prepare_batt_id_conversion
   both of which didn't correctly handle "ret". This also bought up an
   issue as the previous implementation didn't actually wait for the
   channel to be ready. It doesn't seem like that's strictly necessary
   (same data is reported if I wait for the status to be good or not)
   but I've included it anyway for good measure.

Changes since v1:
 * Rework the RRADC driver based on Jonathan's feedback
 * Pick up Rob's reviewed by for the dt-binding patch.

Caleb Connolly (7):
  mfd: qcom-spmi-pmic: expose the PMIC revid information to clients
  dt-bindings: iio: adc: document qcom-spmi-rradc
  iio: adc: qcom-spmi-rradc: introduce round robin adc
  arm64: dts: qcom: pmi8998: add rradc node
  arm64: dts: qcom: sdm845-oneplus: enable rradc
  arm64: dts: qcom: sdm845-db845c: enable rradc
  arm64: dts: qcom: sdm845-xiaomi-beryllium: enable RRADC

 .../bindings/iio/adc/qcom,spmi-rradc.yaml     |   54 +
 arch/arm64/boot/dts/qcom/pmi8998.dtsi         |    8 +
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts    |    4 +
 .../boot/dts/qcom/sdm845-oneplus-common.dtsi  |    4 +
 .../boot/dts/qcom/sdm845-xiaomi-beryllium.dts |    4 +
 drivers/iio/adc/Kconfig                       |   13 +
 drivers/iio/adc/Makefile                      |    1 +
 drivers/iio/adc/qcom-spmi-rradc.c             | 1070 +++++++++++++++++
 drivers/mfd/qcom-spmi-pmic.c                  |  108 +-
 include/soc/qcom/qcom-pmic.h                  |   63 +
 10 files changed, 1272 insertions(+), 57 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/qcom,spmi-rradc.yaml
 create mode 100644 drivers/iio/adc/qcom-spmi-rradc.c
 create mode 100644 include/soc/qcom/qcom-pmic.h

-- 
2.34.1


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

end of thread, other threads:[~2022-01-21 13:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-06 17:31 [PATCH v3 0/7] iio: adc: introduce Qualcomm SPMI Round Robin ADC Caleb Connolly
2022-01-06 17:31 ` [PATCH v3 1/7] mfd: qcom-spmi-pmic: expose the PMIC revid information to clients Caleb Connolly
2022-01-09 16:57   ` Jonathan Cameron
2022-01-10 11:46     ` Caleb Connolly
2022-01-15 13:06       ` Jonathan Cameron
2022-01-10 18:41   ` Bjorn Andersson
2022-01-06 17:31 ` [PATCH v3 2/7] dt-bindings: iio: adc: document qcom-spmi-rradc Caleb Connolly
2022-01-06 17:31 ` [PATCH v3 3/7] iio: adc: qcom-spmi-rradc: introduce round robin adc Caleb Connolly
2022-01-09 17:29   ` Jonathan Cameron
2022-01-19 17:42     ` Caleb Connolly
2022-01-21 13:45       ` Jonathan Cameron
2022-01-06 17:31 ` [PATCH v3 4/7] arm64: dts: qcom: pmi8998: add rradc node Caleb Connolly
2022-01-06 17:31 ` [PATCH v3 5/7] arm64: dts: qcom: sdm845-oneplus: enable rradc Caleb Connolly
2022-01-06 17:31 ` [PATCH v3 6/7] arm64: dts: qcom: sdm845-db845c: " Caleb Connolly
2022-01-06 17:31 ` [PATCH v3 7/7] arm64: dts: qcom: sdm845-xiaomi-beryllium: enable RRADC Caleb Connolly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).