Re: [PATCH v4 2/8] devicetree: power: add battery state machine documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi,

On Wed, Jan 25, 2017 at 11:02:03PM -0800, Matt Ranostay wrote:
> On Wed, Jan 25, 2017 at 10:19 PM, Liam Breck <liam@xxxxxxxxxxxxxxxxx> wrote:
> > On Sun, Jan 22, 2017 at 2:22 PM, Liam Breck <liam@xxxxxxxxxxxxxxxxx> wrote:
> >
> >> diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Documentation/devicetree/bindings/power/supply/battery.txt
> >> new file mode 100644
> >> index 000000000000..398b4d622883
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/power/supply/battery.txt
> >> @@ -0,0 +1,34 @@
> >> +Battery Characteristics
> >> +
> >> +Required Properties:
> >> + - compatible: Must be "fixed-battery"
> >> +
> >> +Optional Properties:
> >> + - termination-microvolt: dead battery voltage
> >> + - design-microwatt-hours: battery design energy
> >> + - design-microamp-hours: battery design capacity
> >
> > Also I suspect the members of struct power_supply_battery_info should
> > use the same names as appear in dts:
> 
> These are internal and we can't be thinking just device tree.. ACPI
> and platform data is also an option.

well platform data just uses the struct. ACPI is probably not
relevant, since in ACPI world one usually has smart batteries.
But yes, the names can be different.

The important part is, that the API is used correctly, so it
should be clear what each property is used for. For example
termination_microvolt is not clear: Is this charge termination
voltage or system shutdown voltage? Also we do not need to add
"micro", since the power-supply subsystem always uses micro
based units.

-- Sebastian

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux