* [PATCH 0/2] Support ADC5_BAT_ID_100K_PU and use on PM7250b
@ 2023-01-06 15:39 Luca Weiss
2023-01-06 15:39 ` [PATCH 1/2] iio: adc: qcom-spmi-adc5: define ADC5_BAT_ID_100K_PU channel Luca Weiss
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Luca Weiss @ 2023-01-06 15:39 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jonathan Cameron,
Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-iio,
linux-kernel, devicetree, Luca Weiss
Add the bat_id channel to vadc driver and add channel to pm7250b dts.
To: Andy Gross <agross@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
To: Rob Herring <robh+dt@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: ~postmarketos/upstreaming@lists.sr.ht
Cc: phone-devel@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Luca Weiss (2):
iio: adc: qcom-spmi-adc5: define ADC5_BAT_ID_100K_PU channel
arm64: dts: qcom: pm7250b: Add BAT_ID vadc channel
arch/arm64/boot/dts/qcom/pm7250b.dtsi | 8 ++++++++
drivers/iio/adc/qcom-spmi-adc5.c | 2 ++
2 files changed, 10 insertions(+)
---
base-commit: 88603b6dc419445847923fcb7fe5080067a30f98
change-id: 20230106-pm7250b-bat_id-1050c2f6d016
Best regards,
--
Luca Weiss <luca.weiss@fairphone.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] iio: adc: qcom-spmi-adc5: define ADC5_BAT_ID_100K_PU channel
2023-01-06 15:39 [PATCH 0/2] Support ADC5_BAT_ID_100K_PU and use on PM7250b Luca Weiss
@ 2023-01-06 15:39 ` Luca Weiss
2023-01-08 13:04 ` Jonathan Cameron
2023-01-06 15:39 ` [PATCH 2/2] arm64: dts: qcom: pm7250b: Add BAT_ID vadc channel Luca Weiss
2023-01-11 19:49 ` (subset) [PATCH 0/2] Support ADC5_BAT_ID_100K_PU and use on PM7250b Bjorn Andersson
2 siblings, 1 reply; 6+ messages in thread
From: Luca Weiss @ 2023-01-06 15:39 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jonathan Cameron,
Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-iio,
linux-kernel, devicetree, Luca Weiss
Define the ADC channel used for battery identification purposes so it
can be used in drivers.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/iio/adc/qcom-spmi-adc5.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c
index 821fee60a765..8c33da9de257 100644
--- a/drivers/iio/adc/qcom-spmi-adc5.c
+++ b/drivers/iio/adc/qcom-spmi-adc5.c
@@ -543,6 +543,8 @@ static const struct adc5_channels adc5_chans_pmic[ADC5_MAX_CHANNEL] = {
SCALE_HW_CALIB_DEFAULT)
[ADC5_XO_THERM_100K_PU] = ADC5_CHAN_TEMP("xo_therm", 0,
SCALE_HW_CALIB_XOTHERM)
+ [ADC5_BAT_ID_100K_PU] = ADC5_CHAN_TEMP("bat_id", 0,
+ SCALE_HW_CALIB_DEFAULT)
[ADC5_AMUX_THM1_100K_PU] = ADC5_CHAN_TEMP("amux_thm1_100k_pu", 0,
SCALE_HW_CALIB_THERM_100K_PULLUP)
[ADC5_AMUX_THM2_100K_PU] = ADC5_CHAN_TEMP("amux_thm2_100k_pu", 0,
--
2.39.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] arm64: dts: qcom: pm7250b: Add BAT_ID vadc channel
2023-01-06 15:39 [PATCH 0/2] Support ADC5_BAT_ID_100K_PU and use on PM7250b Luca Weiss
2023-01-06 15:39 ` [PATCH 1/2] iio: adc: qcom-spmi-adc5: define ADC5_BAT_ID_100K_PU channel Luca Weiss
@ 2023-01-06 15:39 ` Luca Weiss
2023-01-07 10:21 ` Konrad Dybcio
2023-01-11 19:49 ` (subset) [PATCH 0/2] Support ADC5_BAT_ID_100K_PU and use on PM7250b Bjorn Andersson
2 siblings, 1 reply; 6+ messages in thread
From: Luca Weiss @ 2023-01-06 15:39 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jonathan Cameron,
Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-iio,
linux-kernel, devicetree, Luca Weiss
Add a node describing the ADC5_BAT_ID_100K_PU channel with the
properties taken from downstream kernel.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
arch/arm64/boot/dts/qcom/pm7250b.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/pm7250b.dtsi b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
index 61f7a6345150..d709d955a2f5 100644
--- a/arch/arm64/boot/dts/qcom/pm7250b.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
@@ -110,6 +110,14 @@ adc-chan@1e {
label = "chg_mid";
};
+ adc-chan@4b {
+ reg = <ADC5_BAT_ID_100K_PU>;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
+ qcom,ratiometric;
+ label = "bat_id";
+ };
+
adc-chan@83 {
reg = <ADC5_VPH_PWR>;
qcom,pre-scaling = <1 3>;
--
2.39.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] arm64: dts: qcom: pm7250b: Add BAT_ID vadc channel
2023-01-06 15:39 ` [PATCH 2/2] arm64: dts: qcom: pm7250b: Add BAT_ID vadc channel Luca Weiss
@ 2023-01-07 10:21 ` Konrad Dybcio
0 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2023-01-07 10:21 UTC (permalink / raw)
To: Luca Weiss, Andy Gross, Bjorn Andersson, Jonathan Cameron,
Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-iio,
linux-kernel, devicetree
On 6.01.2023 16:39, Luca Weiss wrote:
> Add a node describing the ADC5_BAT_ID_100K_PU channel with the
> properties taken from downstream kernel.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> arch/arm64/boot/dts/qcom/pm7250b.dtsi | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/pm7250b.dtsi b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
> index 61f7a6345150..d709d955a2f5 100644
> --- a/arch/arm64/boot/dts/qcom/pm7250b.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
> @@ -110,6 +110,14 @@ adc-chan@1e {
> label = "chg_mid";
> };
>
> + adc-chan@4b {
> + reg = <ADC5_BAT_ID_100K_PU>;
> + qcom,hw-settle-time = <200>;
> + qcom,pre-scaling = <1 1>;
> + qcom,ratiometric;
> + label = "bat_id";
> + };
> +
> adc-chan@83 {
> reg = <ADC5_VPH_PWR>;
> qcom,pre-scaling = <1 3>;
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] iio: adc: qcom-spmi-adc5: define ADC5_BAT_ID_100K_PU channel
2023-01-06 15:39 ` [PATCH 1/2] iio: adc: qcom-spmi-adc5: define ADC5_BAT_ID_100K_PU channel Luca Weiss
@ 2023-01-08 13:04 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2023-01-08 13:04 UTC (permalink / raw)
To: Luca Weiss
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lars-Peter Clausen,
Rob Herring, Krzysztof Kozlowski, ~postmarketos/upstreaming,
phone-devel, linux-arm-msm, linux-iio, linux-kernel, devicetree
On Fri, 06 Jan 2023 16:39:41 +0100
Luca Weiss <luca.weiss@fairphone.com> wrote:
> Define the ADC channel used for battery identification purposes so it
> can be used in drivers.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Applied to the togreg branch of iio.git and pushed out as testing for
0-day to take a look at it.
If anyone else has comments, then there is still time as I won't push
this out as a non-rebasing branch for a few days at least
(and I'm aware I picked it up very quickly :)
Thanks,
Jonathan
> ---
> drivers/iio/adc/qcom-spmi-adc5.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c
> index 821fee60a765..8c33da9de257 100644
> --- a/drivers/iio/adc/qcom-spmi-adc5.c
> +++ b/drivers/iio/adc/qcom-spmi-adc5.c
> @@ -543,6 +543,8 @@ static const struct adc5_channels adc5_chans_pmic[ADC5_MAX_CHANNEL] = {
> SCALE_HW_CALIB_DEFAULT)
> [ADC5_XO_THERM_100K_PU] = ADC5_CHAN_TEMP("xo_therm", 0,
> SCALE_HW_CALIB_XOTHERM)
> + [ADC5_BAT_ID_100K_PU] = ADC5_CHAN_TEMP("bat_id", 0,
> + SCALE_HW_CALIB_DEFAULT)
> [ADC5_AMUX_THM1_100K_PU] = ADC5_CHAN_TEMP("amux_thm1_100k_pu", 0,
> SCALE_HW_CALIB_THERM_100K_PULLUP)
> [ADC5_AMUX_THM2_100K_PU] = ADC5_CHAN_TEMP("amux_thm2_100k_pu", 0,
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: (subset) [PATCH 0/2] Support ADC5_BAT_ID_100K_PU and use on PM7250b
2023-01-06 15:39 [PATCH 0/2] Support ADC5_BAT_ID_100K_PU and use on PM7250b Luca Weiss
2023-01-06 15:39 ` [PATCH 1/2] iio: adc: qcom-spmi-adc5: define ADC5_BAT_ID_100K_PU channel Luca Weiss
2023-01-06 15:39 ` [PATCH 2/2] arm64: dts: qcom: pm7250b: Add BAT_ID vadc channel Luca Weiss
@ 2023-01-11 19:49 ` Bjorn Andersson
2 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2023-01-11 19:49 UTC (permalink / raw)
To: krzysztof.kozlowski+dt, agross, lars, jic23, konrad.dybcio,
luca.weiss, robh+dt
Cc: linux-kernel, linux-arm-msm, phone-devel,
~postmarketos/upstreaming, devicetree, linux-iio
On Fri, 06 Jan 2023 16:39:41 +0100, Luca Weiss wrote:
> Add the bat_id channel to vadc driver and add channel to pm7250b dts.
>
>
Applied, thanks!
[2/2] arm64: dts: qcom: pm7250b: Add BAT_ID vadc channel
commit: 7592ba4d3e9bf1cce40323f59e48f4ca03b105e9
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-01-11 19:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06 15:39 [PATCH 0/2] Support ADC5_BAT_ID_100K_PU and use on PM7250b Luca Weiss
2023-01-06 15:39 ` [PATCH 1/2] iio: adc: qcom-spmi-adc5: define ADC5_BAT_ID_100K_PU channel Luca Weiss
2023-01-08 13:04 ` Jonathan Cameron
2023-01-06 15:39 ` [PATCH 2/2] arm64: dts: qcom: pm7250b: Add BAT_ID vadc channel Luca Weiss
2023-01-07 10:21 ` Konrad Dybcio
2023-01-11 19:49 ` (subset) [PATCH 0/2] Support ADC5_BAT_ID_100K_PU and use on PM7250b Bjorn Andersson
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).