From aff0ffb1792f35d003dfa3caf93501426a5153a0 Mon Sep 17 00:00:00 2001 From: Shyam Kumar Thella Date: Sat, 8 Aug 2020 10:32:09 +0530 Subject: [PATCH] dt-bindings: power: Update QG compatible strings and add IIO channels Update QPNP QG compatible strings to distinguish between QG on different PMICs. Change-Id: I0eb19769b02143bef67fa934921e2dc420367003 --- bindings/power/supply/qcom/qpnp-qg.txt | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/bindings/power/supply/qcom/qpnp-qg.txt b/bindings/power/supply/qcom/qpnp-qg.txt index f095303c..45be8ad5 100644 --- a/bindings/power/supply/qcom/qpnp-qg.txt +++ b/bindings/power/supply/qcom/qpnp-qg.txt @@ -19,13 +19,20 @@ First Level Node - QGAUGE device - compatible Usage: required Value type: - Definition: Should be "qcom,qpnp-qg" or "qcom,qpnp-qg-lite". + Definition: Should be "qcom,qpnp-qg-lite" for PM2250. + Should be "qcom,pm6150-qg" for PM6150. + Should be "qcom,pmi632-qg" for PMI632. + Should be "qcom,pm7250b-qg" for PM7250B. -- qcom,pmic-revid +- io-channels Usage: required - Value type: - Definition: Should specify the phandle of PMIC revid module. This is - used to identify the PMIC subtype. + Value type: + Definition: IIO channel specifiers for each name in io-channel-names. + +- io-channel-names + Usage: required + Value type: + Definition: Names of the IIO channels that are used by QG device. - qcom,qg-vadc Usage: required @@ -473,13 +480,17 @@ Example ======== pmi632_qg: qpnp,qg { - compatible = "qcom,qpnp-qg"; - qcom,pmic-revid = <&pmi632_revid>; + compatible = "qcom,pm7250b-qg"; qcom,qg-vadc = <&pmi632_vadc>; qcom,vbatt-empty-mv = <3200>; qcom,vbatt-low-mv = <3500>; qcom,vbatt-cutoff-mv = <3400>; qcom,qg-iterm-ma = <100>; + #io-channel-cells = <1>; + io-channels = <&pm7250b_charger PSY_IIO_RECHARGE_SOC>, + <&pm7250b_charger PSY_IIO_CHARGE_DONE>; + io-channel-names = "recharge_soc", + "charge_done"; qcom,qgauge@4800 { status = "okay";