From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Jonathan Albrieux <jonathan.albrieux@gmail.com>
Cc: linux-kernel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht,
Andy Gross <agross@kernel.org>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org
Subject: Re: [PATCH 1/2] iio:adc:qcom-spmi-vadc: add default scale to LR_MUX2_BAT_ID channel
Date: Fri, 15 Jan 2021 10:30:49 -0600 [thread overview]
Message-ID: <YAHDOaZoSSGZexFa@builder.lan> (raw)
In-Reply-To: <20210113151808.4628-2-jonathan.albrieux@gmail.com>
On Wed 13 Jan 09:18 CST 2021, Jonathan Albrieux wrote:
> Checking at both msm8909-pm8916.dtsi and msm8916.dtsi from downstream
> it is indicated that "batt_id" channel has to be scaled with the default
> function:
>
> 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>;
> };
>
> Change LR_MUX2_BAT_ID scaling accordingly.
>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Not entirely sure, but looking at the history I think this used to work
- but it's obvious that no one has read this channel for a while...
But I think below is a regression and should be mentioned:
Fixes: 7c271eea7b8a ("iio: adc: spmi-vadc: Changes to support different scaling")
> Signed-off-by: Jonathan Albrieux <jonathan.albrieux@gmail.com>
Jonathan Cameron, if you merge this through your tree I can take the dts
addition through the Qualcomm tree.
Regards,
Bjorn
> ---
> drivers/iio/adc/qcom-spmi-vadc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/qcom-spmi-vadc.c b/drivers/iio/adc/qcom-spmi-vadc.c
> index b0388f8a69f4..7e7d408452ec 100644
> --- a/drivers/iio/adc/qcom-spmi-vadc.c
> +++ b/drivers/iio/adc/qcom-spmi-vadc.c
> @@ -598,7 +598,7 @@ static const struct vadc_channels vadc_chans[] = {
> VADC_CHAN_NO_SCALE(P_MUX16_1_3, 1)
>
> VADC_CHAN_NO_SCALE(LR_MUX1_BAT_THERM, 0)
> - VADC_CHAN_NO_SCALE(LR_MUX2_BAT_ID, 0)
> + VADC_CHAN_VOLT(LR_MUX2_BAT_ID, 0, SCALE_DEFAULT)
> VADC_CHAN_NO_SCALE(LR_MUX3_XO_THERM, 0)
> VADC_CHAN_NO_SCALE(LR_MUX4_AMUX_THM1, 0)
> VADC_CHAN_NO_SCALE(LR_MUX5_AMUX_THM2, 0)
> --
> 2.17.1
>
next prev parent reply other threads:[~2021-01-15 16:32 UTC|newest]
Thread overview: 5+ 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 [this message]
2021-01-16 17:47 ` Jonathan Cameron
2021-01-16 18:52 ` Jonathan Albrieux
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=YAHDOaZoSSGZexFa@builder.lan \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=jic23@kernel.org \
--cc=jonathan.albrieux@gmail.com \
--cc=lars@metafoo.de \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--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 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).