From ff8af86c1eddfb64205076db5b5417693d858db9 Mon Sep 17 00:00:00 2001 From: Jishnu Prakash Date: Tue, 15 Sep 2020 18:26:20 +0530 Subject: [PATCH] dt-bindings: iio: qcom,spmi-vadc: Add compatible string for ADC lite driver Add the compatible string for ADC-lite driver for reading parallel charger current channel. Change-Id: Ie0d3f90d06be4bf28661736058c5d1fb2af1ac8f Signed-off-by: Jishnu Prakash [quic_amelende@quicinc.com: converted binding change from .txt to .yaml] Signed-off-by: Anjelique Melendez --- bindings/iio/adc/qcom,spmi-vadc.yaml | 31 ++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/bindings/iio/adc/qcom,spmi-vadc.yaml b/bindings/iio/adc/qcom,spmi-vadc.yaml index ad7d6fc4..79b3b87c 100644 --- a/bindings/iio/adc/qcom,spmi-vadc.yaml +++ b/bindings/iio/adc/qcom,spmi-vadc.yaml @@ -25,6 +25,7 @@ properties: - enum: - qcom,spmi-vadc - qcom,spmi-adc5 + - qcom,spmi-adc5-lite - qcom,spmi-adc-rev2 - qcom,spmi-adc7 @@ -114,10 +115,9 @@ patternProperties: channel calibration. If property is not found, channel will be calibrated with 0.625V and 1.25V reference channels, also known as absolute calibration. - - For compatible property "qcom,spmi-adc5", "qcom,spmi-adc7" and - "qcom,spmi-adc-rev2", if this property is specified VADC will use - the VDD reference (1.875V) and GND for channel calibration. If - property is not found, channel will be calibrated with 0V and 1.25V + - For all other compatible properties, if this property is specified + VADC will use the VDD reference (1.875V) and GND for channel calibration. + If property is not found, channel will be calibrated with 0V and 1.25V reference channels, also known as absolute calibration. type: boolean @@ -209,6 +209,29 @@ allOf: enum: [ 1, 2, 4, 8, 16 ] default: 1 + - if: + properties: + compatible: + contains: + const: qcom,spmi-adc5-lite + + then: + patternProperties: + "^channel@[0-9a-f]+$": + properties: + qcom,decimation: + enum: [ 250, 420, 840 ] + default: 840 + + qcom,hw-settle-time: + enum: [ 15, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1, 2, + 4, 6, 8, 10] + default: 15 + + qcom,avg-samples: + enum: [ 1, 2, 4, 8, 16 ] + default: 1 + - if: properties: compatible: