* [PATCH v5 1/8] devicetree: power: Add battery.txt [not found] <20170204091603.32242-1-liam@networkimprov.net> @ 2017-02-04 9:15 ` Liam Breck [not found] ` <20170204091603.32242-2-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> [not found] ` <20170204091603.32242-1-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> 1 sibling, 1 reply; 7+ messages in thread From: Liam Breck @ 2017-02-04 9:15 UTC (permalink / raw) To: Sebastian Reichel Cc: Andrew F. Davis, Matt Ranostay, linux-pm, Rob Herring, devicetree, Liam Breck From: Matt Ranostay <matt@ranostay.consulting> From: Matt Ranostay <matt@ranostay.consulting> Documentation of static battery characteristics that can be defined for batteries which cannot self-identify. This information is required by fuel-gauge and charger chips for proper handling of the battery. Cc: Rob Herring <robh@kernel.org> Cc: devicetree@vger.kernel.org Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Liam Breck <kernel@networkimprov.net> --- .../devicetree/bindings/power/supply/battery.txt | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/battery.txt diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Documentation/devicetree/bindings/power/supply/battery.txt new file mode 100644 index 0000000..d663c48 --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/battery.txt @@ -0,0 +1,39 @@ +Battery Characteristics + +Required Properties: + - compatible: Must be "fixed-battery" + +Optional Properties: + - voltage-min-design-microvolt: drained battery voltage + - voltage-max-design-microvolt: charged battery voltage + - energy-full-design-microwatt-hours: battery design energy + - charge-full-design-microamp-hours: battery design capacity + +Future Properties must be named for the corresponding elements in +enum power_supply_property, defined in include/linux/power_supply.h. + +Batteries must be referenced by chargers and/or fuel-gauges +using a phandle. The phandle's property should be named +"monitored-battery". + +Example: + + bat: battery { + compatible = "fixed-battery"; + voltage-min-design-microvolt = <3200000>; + voltage-max-design-microvolt = <4200000>; + energy-full-design-microwatt-hours = <5290000>; + charge-full-design-microamp-hours = <1430000>; + }; + + charger: charger@0 { + .... + monitored-battery = <&bat>; + ... + }; + + fuel_gauge: fuel_gauge@0 { + .... + monitored-battery = <&bat>; + ... + }; -- 2.9.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
[parent not found: <20170204091603.32242-2-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org>]
* Re: [PATCH v5 1/8] devicetree: power: Add battery.txt [not found] ` <20170204091603.32242-2-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> @ 2017-02-04 10:03 ` Matt Ranostay 2017-02-08 21:58 ` Rob Herring 1 sibling, 0 replies; 7+ messages in thread From: Matt Ranostay @ 2017-02-04 10:03 UTC (permalink / raw) To: Liam Breck Cc: Sebastian Reichel, Andrew F. Davis, linux-pm-u79uwXL29TY76Z2rM5mHXA, Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA, Liam Breck On Sat, Feb 4, 2017 at 1:15 AM, Liam Breck <liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> wrote: > From: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> > > From: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> How are the double from me happening? :) Seems odds > > Documentation of static battery characteristics that can be defined > for batteries which cannot self-identify. This information is required > by fuel-gauge and charger chips for proper handling of the battery. > > Cc: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> > Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Signed-off-by: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> > Signed-off-by: Liam Breck <kernel-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> > --- > .../devicetree/bindings/power/supply/battery.txt | 39 ++++++++++++++++++++++ > 1 file changed, 39 insertions(+) > create mode 100644 Documentation/devicetree/bindings/power/supply/battery.txt > > diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Documentation/devicetree/bindings/power/supply/battery.txt > new file mode 100644 > index 0000000..d663c48 > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/supply/battery.txt > @@ -0,0 +1,39 @@ > +Battery Characteristics > + > +Required Properties: > + - compatible: Must be "fixed-battery" > + > +Optional Properties: > + - voltage-min-design-microvolt: drained battery voltage > + - voltage-max-design-microvolt: charged battery voltage > + - energy-full-design-microwatt-hours: battery design energy > + - charge-full-design-microamp-hours: battery design capacity > + > +Future Properties must be named for the corresponding elements in > +enum power_supply_property, defined in include/linux/power_supply.h. > + > +Batteries must be referenced by chargers and/or fuel-gauges > +using a phandle. The phandle's property should be named > +"monitored-battery". > + > +Example: > + > + bat: battery { > + compatible = "fixed-battery"; > + voltage-min-design-microvolt = <3200000>; > + voltage-max-design-microvolt = <4200000>; > + energy-full-design-microwatt-hours = <5290000>; > + charge-full-design-microamp-hours = <1430000>; > + }; > + > + charger: charger@0 { > + .... > + monitored-battery = <&bat>; > + ... > + }; > + > + fuel_gauge: fuel_gauge@0 { > + .... > + monitored-battery = <&bat>; > + ... > + }; > -- > 2.9.3 > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 1/8] devicetree: power: Add battery.txt [not found] ` <20170204091603.32242-2-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> 2017-02-04 10:03 ` Matt Ranostay @ 2017-02-08 21:58 ` Rob Herring 2017-02-11 2:03 ` Liam Breck 1 sibling, 1 reply; 7+ messages in thread From: Rob Herring @ 2017-02-08 21:58 UTC (permalink / raw) To: Liam Breck Cc: Sebastian Reichel, Andrew F. Davis, Matt Ranostay, linux-pm-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, Liam Breck On Sat, Feb 04, 2017 at 01:15:56AM -0800, Liam Breck wrote: > From: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> > > From: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> > > Documentation of static battery characteristics that can be defined > for batteries which cannot self-identify. This information is required > by fuel-gauge and charger chips for proper handling of the battery. I hope this is a common binding and not yet another battery binding. > > Cc: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> > Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Signed-off-by: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> > Signed-off-by: Liam Breck <kernel-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> > --- > .../devicetree/bindings/power/supply/battery.txt | 39 ++++++++++++++++++++++ > 1 file changed, 39 insertions(+) > create mode 100644 Documentation/devicetree/bindings/power/supply/battery.txt > > diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Documentation/devicetree/bindings/power/supply/battery.txt > new file mode 100644 > index 0000000..d663c48 > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/supply/battery.txt > @@ -0,0 +1,39 @@ > +Battery Characteristics > + > +Required Properties: > + - compatible: Must be "fixed-battery" The "fixed" part seems a bit pointless. Just "battery" would be a bit generic. Don't you need to know the battery chemistry typically? Or number of cells? > + > +Optional Properties: > + - voltage-min-design-microvolt: drained battery voltage > + - voltage-max-design-microvolt: charged battery voltage > + - energy-full-design-microwatt-hours: battery design energy > + - charge-full-design-microamp-hours: battery design capacity > + > +Future Properties must be named for the corresponding elements in > +enum power_supply_property, defined in include/linux/power_supply.h. > + > +Batteries must be referenced by chargers and/or fuel-gauges > +using a phandle. The phandle's property should be named > +"monitored-battery". > + > +Example: > + > + bat: battery { > + compatible = "fixed-battery"; > + voltage-min-design-microvolt = <3200000>; > + voltage-max-design-microvolt = <4200000>; > + energy-full-design-microwatt-hours = <5290000>; > + charge-full-design-microamp-hours = <1430000>; > + }; > + > + charger: charger@0 { > + .... > + monitored-battery = <&bat>; > + ... > + }; > + > + fuel_gauge: fuel_gauge@0 { fuel-gauge@... > + .... > + monitored-battery = <&bat>; > + ... > + }; > -- > 2.9.3 > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 1/8] devicetree: power: Add battery.txt 2017-02-08 21:58 ` Rob Herring @ 2017-02-11 2:03 ` Liam Breck 0 siblings, 0 replies; 7+ messages in thread From: Liam Breck @ 2017-02-11 2:03 UTC (permalink / raw) To: Rob Herring Cc: Sebastian Reichel, Andrew F. Davis, Matt Ranostay, linux-pm, devicetree, Liam Breck On Wed, Feb 8, 2017 at 1:58 PM, Rob Herring <robh@kernel.org> wrote: > On Sat, Feb 04, 2017 at 01:15:56AM -0800, Liam Breck wrote: >> From: Matt Ranostay <matt@ranostay.consulting> >> >> From: Matt Ranostay <matt@ranostay.consulting> >> >> Documentation of static battery characteristics that can be defined >> for batteries which cannot self-identify. This information is required >> by fuel-gauge and charger chips for proper handling of the battery. > > I hope this is a common binding and not yet another battery binding. Yes, Sebastian had us add support for this in power_supply_core with int power_supply_get_battery_info( struct power_supply *psy, struct power_suppy_battery_info *info) >> Cc: Rob Herring <robh@kernel.org> >> Cc: devicetree@vger.kernel.org >> Signed-off-by: Matt Ranostay <matt@ranostay.consulting> >> Signed-off-by: Liam Breck <kernel@networkimprov.net> >> --- >> .../devicetree/bindings/power/supply/battery.txt | 39 ++++++++++++++++++++++ >> 1 file changed, 39 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/power/supply/battery.txt >> >> diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Documentation/devicetree/bindings/power/supply/battery.txt >> new file mode 100644 >> index 0000000..d663c48 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/power/supply/battery.txt >> @@ -0,0 +1,39 @@ >> +Battery Characteristics >> + >> +Required Properties: >> + - compatible: Must be "fixed-battery" > > The "fixed" part seems a bit pointless. Just "battery" would be a > bit generic. Don't you need to know the battery chemistry typically? Or > number of cells? Sebastian suggested fixed-battery to indicate a non-smart battery, i.e. a pack without self-awareness besides a protection circuit. I don't know what compatible would have for a smart battery. That might be useful to establish now... I'll be posting v6 shortly, with no change re compatible. ~.~ ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20170204091603.32242-1-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org>]
* [PATCH v5 2/8] devicetree: property-units: Add uWh and uAh units [not found] ` <20170204091603.32242-1-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> @ 2017-02-04 9:15 ` Liam Breck 2017-02-04 9:15 ` [PATCH v5 3/8] devicetree: power: bq27xxx: Add monitored-battery documentation Liam Breck 1 sibling, 0 replies; 7+ messages in thread From: Liam Breck @ 2017-02-04 9:15 UTC (permalink / raw) To: Sebastian Reichel Cc: Andrew F. Davis, Matt Ranostay, linux-pm-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Liam Breck From: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> From: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> Add entries for microwatt-hours and microamp-hours. Cc: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Signed-off-by: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> Signed-off-by: Liam Breck <kernel-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> Acked-by: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> --- Documentation/devicetree/bindings/property-units.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/property-units.txt b/Documentation/devicetree/bindings/property-units.txt index 12278d7..0849618 100644 --- a/Documentation/devicetree/bindings/property-units.txt +++ b/Documentation/devicetree/bindings/property-units.txt @@ -25,8 +25,10 @@ Distance Electricity ---------------------------------------- -microamp : micro amps +-microamp-hours : micro amp-hours -ohms : Ohms -micro-ohms : micro Ohms +-microwatt-hours: micro Watt-hours -microvolt : micro volts Temperature -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v5 3/8] devicetree: power: bq27xxx: Add monitored-battery documentation [not found] ` <20170204091603.32242-1-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> 2017-02-04 9:15 ` [PATCH v5 2/8] devicetree: property-units: Add uWh and uAh units Liam Breck @ 2017-02-04 9:15 ` Liam Breck [not found] ` <20170204091603.32242-4-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> 1 sibling, 1 reply; 7+ messages in thread From: Liam Breck @ 2017-02-04 9:15 UTC (permalink / raw) To: Sebastian Reichel Cc: Andrew F. Davis, Matt Ranostay, linux-pm-u79uwXL29TY76Z2rM5mHXA, Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA, Liam Breck From: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> From: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> Document monitored-battery = <&battery_node> Cc: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Signed-off-by: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> Signed-off-by: Liam Breck <kernel-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> --- Documentation/devicetree/bindings/power/supply/bq27xxx.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/power/supply/bq27xxx.txt b/Documentation/devicetree/bindings/power/supply/bq27xxx.txt index b0c95ef..f799181 100644 --- a/Documentation/devicetree/bindings/power/supply/bq27xxx.txt +++ b/Documentation/devicetree/bindings/power/supply/bq27xxx.txt @@ -28,9 +28,18 @@ Required properties: * "ti,bq27621" - BQ27621 - reg: integer, i2c address of the device. +Optional properties: +- monitored-battery: phandle of battery information devicetree node + + See Documentation/devicetree/bindings/power/supply/battery.txt + If either of the referenced battery's *-full-design-*-hours properties are set, + then both must be. + Example: bq27510g3 { compatible = "ti,bq27510g3"; reg = <0x55>; + + monitored-battery = <&bat>; }; -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 7+ messages in thread
[parent not found: <20170204091603.32242-4-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org>]
* Re: [PATCH v5 3/8] devicetree: power: bq27xxx: Add monitored-battery documentation [not found] ` <20170204091603.32242-4-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> @ 2017-02-08 22:00 ` Rob Herring 0 siblings, 0 replies; 7+ messages in thread From: Rob Herring @ 2017-02-08 22:00 UTC (permalink / raw) To: Liam Breck Cc: Sebastian Reichel, Andrew F. Davis, Matt Ranostay, linux-pm-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, Liam Breck On Sat, Feb 04, 2017 at 01:15:58AM -0800, Liam Breck wrote: > From: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> > > From: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> > > Document monitored-battery = <&battery_node> > > Cc: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> > Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Signed-off-by: Matt Ranostay <matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org> > Signed-off-by: Liam Breck <kernel-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> > --- > Documentation/devicetree/bindings/power/supply/bq27xxx.txt | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/Documentation/devicetree/bindings/power/supply/bq27xxx.txt b/Documentation/devicetree/bindings/power/supply/bq27xxx.txt > index b0c95ef..f799181 100644 > --- a/Documentation/devicetree/bindings/power/supply/bq27xxx.txt > +++ b/Documentation/devicetree/bindings/power/supply/bq27xxx.txt > @@ -28,9 +28,18 @@ Required properties: > * "ti,bq27621" - BQ27621 > - reg: integer, i2c address of the device. > > +Optional properties: > +- monitored-battery: phandle of battery information devicetree node > + > + See Documentation/devicetree/bindings/power/supply/battery.txt > + If either of the referenced battery's *-full-design-*-hours properties are set, > + then both must be. > + > Example: > > bq27510g3 { charger@55 Or fuel-gauge@..., I can't tell. > compatible = "ti,bq27510g3"; > reg = <0x55>; > + > + monitored-battery = <&bat>; > }; > -- > 2.9.3 > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-02-11 2:03 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20170204091603.32242-1-liam@networkimprov.net> 2017-02-04 9:15 ` [PATCH v5 1/8] devicetree: power: Add battery.txt Liam Breck [not found] ` <20170204091603.32242-2-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> 2017-02-04 10:03 ` Matt Ranostay 2017-02-08 21:58 ` Rob Herring 2017-02-11 2:03 ` Liam Breck [not found] ` <20170204091603.32242-1-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> 2017-02-04 9:15 ` [PATCH v5 2/8] devicetree: property-units: Add uWh and uAh units Liam Breck 2017-02-04 9:15 ` [PATCH v5 3/8] devicetree: power: bq27xxx: Add monitored-battery documentation Liam Breck [not found] ` <20170204091603.32242-4-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org> 2017-02-08 22:00 ` Rob Herring
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).