All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Albrieux <jonathan.albrieux@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: ~postmarketos/upstreaming@lists.sr.ht,
	Jonathan Albrieux <jonathan.albrieux@gmail.com>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org
Subject: [PATCH 2/2] arm64: dts: qcom: pm8916: Add batt_id channel node
Date: Wed, 13 Jan 2021 16:18:08 +0100	[thread overview]
Message-ID: <20210113151808.4628-3-jonathan.albrieux@gmail.com> (raw)
In-Reply-To: <20210113151808.4628-1-jonathan.albrieux@gmail.com>

Working on a battery charger and fuel gauge driver it happened to
have the need to read from VADC_LR_MUX2_BAT_ID channel. Here is
the declaration from downstream msm8916.dtsi:

	chan@31 {
		label = "batt_id";
		reg = <0x31>;
		qcom,decimation = <0>;
		qcom,pre-div-channel-scaling = <0>;
		qcom,calibration-type = "ratiometric";
		qcom,scale-function = <0>;
		qcom,hw-settle-time = <0xb>;
		qcom,fast-avg-setup = <0>;
	};

Add VADC_LR_MUX2_BAT_ID accordingly.

Signed-off-by: Jonathan Albrieux <jonathan.albrieux@gmail.com>
---
 arch/arm64/boot/dts/qcom/pm8916.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi
index a7663bf867ec..854e51883289 100644
--- a/arch/arm64/boot/dts/qcom/pm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi
@@ -95,6 +95,11 @@
 			adc-chan@f {
 				reg = <VADC_VDD_VADC>;
 			};
+			adc-chan@g {
+				reg = <VADC_LR_MUX2_BAT_ID>;
+				qcom,hw-settle-time = <2000>;
+				qcom,ratiometric;
+			};
 		};
 
 		rtc@6000 {
-- 
2.17.1


      parent reply	other threads:[~2021-01-13 15:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 15:18 [PATCH 0/2] Allow VADC_LR_MUX2_BAT_ID channel proper reading Jonathan Albrieux
2021-01-13 15:18 ` [PATCH 1/2] iio:adc:qcom-spmi-vadc: add default scale to LR_MUX2_BAT_ID channel Jonathan Albrieux
2021-01-15 16:30   ` Bjorn Andersson
2021-01-16 17:47     ` Jonathan Cameron
2021-01-16 18:52       ` Jonathan Albrieux
2021-01-13 15:18 ` Jonathan Albrieux [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210113151808.4628-3-jonathan.albrieux@gmail.com \
    --to=jonathan.albrieux@gmail.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.