diff mbox series

[1/5] dt-bindings: power: Introduce one property to describe the battery resistance with temperature changes

Message ID 44f0c19510c7317cb4ee6cac54b3adfa81c2d6d0.1572245011.git.baolin.wang@linaro.org (mailing list archive)
State Not Applicable, archived
Headers show
Series Improve the SC27XX fuel gauge controller | expand

Commit Message

(Exiting) Baolin Wang Oct. 28, 2019, 7:18 a.m. UTC
Since the battery internal resistance can be changed as the temperature
changes, thus add one table to describe the battery resistance percent
in different temperature to get a accurate battery internal resistance.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
---
 .../devicetree/bindings/power/supply/battery.txt   |    5 +++++
 1 file changed, 5 insertions(+)

Comments

Rob Herring (Arm) Oct. 30, 2019, 2:38 p.m. UTC | #1
On Mon, Oct 28, 2019 at 03:18:57PM +0800, Baolin Wang wrote:
> Since the battery internal resistance can be changed as the temperature
> changes, thus add one table to describe the battery resistance percent
> in different temperature to get a accurate battery internal resistance.
> 
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
> ---
>  .../devicetree/bindings/power/supply/battery.txt   |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Documentation/devicetree/bindings/power/supply/battery.txt
> index 5c913d4c..1a6f951 100644
> --- a/Documentation/devicetree/bindings/power/supply/battery.txt
> +++ b/Documentation/devicetree/bindings/power/supply/battery.txt
> @@ -35,6 +35,10 @@ Optional Properties:
>     for each of the battery capacity lookup table. The first temperature value
>     specifies the OCV table 0, and the second temperature value specifies the
>     OCV table 1, and so on.
> + - resistance-temp-table: An array providing the resistance percent and
> +   corresponding temperature in degree Celsius, which is used to look up the
> +   resistance percent according to current temperature to get a accurate
> +   batterty internal resistance.

What's the order of values? The description and example don't seem to 
agree unless negative percent is a thing.

>  
>  Battery properties are named, where possible, for the corresponding
>  elements in enum power_supply_property, defined in
> @@ -61,6 +65,7 @@ Example:
>  		ocv-capacity-table-0 = <4185000 100>, <4113000 95>, <4066000 90>, ...;
>  		ocv-capacity-table-1 = <4200000 100>, <4185000 95>, <4113000 90>, ...;
>  		ocv-capacity-table-2 = <4250000 100>, <4200000 95>, <4185000 90>, ...;
> +		resistance-temp-table = <20 100>, <10 90>, <0 80>, <(-10) 60>;
>  	};
>  
>  	charger: charger@11 {
> -- 
> 1.7.9.5
>
(Exiting) Baolin Wang Oct. 31, 2019, 2:13 a.m. UTC | #2
Hi Rob,

On Wed, 30 Oct 2019 at 22:38, Rob Herring <robh@kernel.org> wrote:
>
> On Mon, Oct 28, 2019 at 03:18:57PM +0800, Baolin Wang wrote:
> > Since the battery internal resistance can be changed as the temperature
> > changes, thus add one table to describe the battery resistance percent
> > in different temperature to get a accurate battery internal resistance.
> >
> > Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
> > ---
> >  .../devicetree/bindings/power/supply/battery.txt   |    5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Documentation/devicetree/bindings/power/supply/battery.txt
> > index 5c913d4c..1a6f951 100644
> > --- a/Documentation/devicetree/bindings/power/supply/battery.txt
> > +++ b/Documentation/devicetree/bindings/power/supply/battery.txt
> > @@ -35,6 +35,10 @@ Optional Properties:
> >     for each of the battery capacity lookup table. The first temperature value
> >     specifies the OCV table 0, and the second temperature value specifies the
> >     OCV table 1, and so on.
> > + - resistance-temp-table: An array providing the resistance percent and
> > +   corresponding temperature in degree Celsius, which is used to look up the
> > +   resistance percent according to current temperature to get a accurate
> > +   batterty internal resistance.
>
> What's the order of values? The description and example don't seem to
> agree unless negative percent is a thing.

Ah, right. I will fix the example according to the description's order
in next version. Thanks.

> >
> >  Battery properties are named, where possible, for the corresponding
> >  elements in enum power_supply_property, defined in
> > @@ -61,6 +65,7 @@ Example:
> >               ocv-capacity-table-0 = <4185000 100>, <4113000 95>, <4066000 90>, ...;
> >               ocv-capacity-table-1 = <4200000 100>, <4185000 95>, <4113000 90>, ...;
> >               ocv-capacity-table-2 = <4250000 100>, <4200000 95>, <4185000 90>, ...;
> > +             resistance-temp-table = <20 100>, <10 90>, <0 80>, <(-10) 60>;
> >       };
> >
> >       charger: charger@11 {
> > --
> > 1.7.9.5
> >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Documentation/devicetree/bindings/power/supply/battery.txt
index 5c913d4c..1a6f951 100644
--- a/Documentation/devicetree/bindings/power/supply/battery.txt
+++ b/Documentation/devicetree/bindings/power/supply/battery.txt
@@ -35,6 +35,10 @@  Optional Properties:
    for each of the battery capacity lookup table. The first temperature value
    specifies the OCV table 0, and the second temperature value specifies the
    OCV table 1, and so on.
+ - resistance-temp-table: An array providing the resistance percent and
+   corresponding temperature in degree Celsius, which is used to look up the
+   resistance percent according to current temperature to get a accurate
+   batterty internal resistance.
 
 Battery properties are named, where possible, for the corresponding
 elements in enum power_supply_property, defined in
@@ -61,6 +65,7 @@  Example:
 		ocv-capacity-table-0 = <4185000 100>, <4113000 95>, <4066000 90>, ...;
 		ocv-capacity-table-1 = <4200000 100>, <4185000 95>, <4113000 90>, ...;
 		ocv-capacity-table-2 = <4250000 100>, <4200000 95>, <4185000 90>, ...;
+		resistance-temp-table = <20 100>, <10 90>, <0 80>, <(-10) 60>;
 	};
 
 	charger: charger@11 {