From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Andersson Subject: Re: [PATCH 1/3 v2] iio: adc: add device tree bindings for Qualcomm PM8xxx ADCs Date: Mon, 26 Dec 2016 21:58:29 -0800 Message-ID: <20161227055829.GB10531@minitux> References: <1481842089-13999-1-git-send-email-linus.walleij@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1481842089-13999-1-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Sender: linux-iio-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Linus Walleij Cc: Jonathan Cameron , linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "Ivan T . Ivanov" , Andy Gross , Stephen Boyd , Srinivas Kandagatla List-Id: devicetree@vger.kernel.org On Thu 15 Dec 14:48 PST 2016, Linus Walleij wrote: Sorry for taking so long time to give this a test. > --- > .../bindings/iio/adc/qcom,pm8xxx-xoadc.txt | 160 +++++++++++++++++++++ > 1 file changed, 160 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/adc/qcom,pm8xxx-xoadc.txt > > diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,pm8xxx-xoadc.txt b/Documentation/devicetree/bindings/iio/adc/qcom,pm8xxx-xoadc.txt [..] > + > +- reg: should contain the ADC base address in the PMIC, typically > + 0x197. xoadc-ref is "required" by the code (setting 2.2V on the dummy regulator returned in its absence will fail), so it should be mentioned here. On 8064 pm8921_l14 seems to be our reference, which is 1.8V. [..] > + > +- qcom,ratiometric: > + Value type: > + Definition: Channel calibration type. If this property is specified > + VADC will use the VDD reference (1.8V) and GND for channel > + calibration. If the property is not found, the channel will be > + calibrated with the 0.625V and 1.25V reference channels, also > + known as an absolute calibration. So if I specify this property the reference should be 1.8V and if I specify qcom,ratiometric-ref I will override this? Also, the implementation requires that qcom,ratiometric-ref is specified if the boolean property is used. Am I missing something or should we just squash them? > + > +- qcom,ratiometric-ref: > + Value type: > + Definition: The reference voltage pair when using ratiometric > + calibration: > + 0 = XO_IN/XOADC_GND > + 1 = PMIC_IN/XOADC_GND > + 2 = PMIC_IN/BMS_CSP > + 3 (invalid) > + 4 = XOADC_GND/XOADC_GND > + 5 = XOADC_VREF/XOADC_GND > + > +Example: > + > +xoadc: xoadc@197 { > + compatible = "qcom,pm8058-adc"; > + reg = <0x197>; > + interrupt-parent = <&pm8058>; > + interrupts = <76 1>; > + #address-cells = <1>; > + #size-cells = <0>; > + #io-channel-cells = <1>; xoadc-ref-supply = <>; > + > + vcoin { As the node has a "reg" you need to add @0 on these. > + reg = <0x00>; > + }; Regards, Bjorn