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

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

 




On Sun, Jan 29, 2017 at 10:06 AM, Sebastian Reichel <sre@xxxxxxxxxx> wrote:
> On Sun, Jan 22, 2017 at 02:22:12PM -0800, Liam Breck wrote:
...
>> +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";
>> +             terminate-microvolt = <3700000>;
>> +             design-microwatt-hours = <5290000>;
>> +             design-microamp-hours = <1430000>;
>> +     };
>> +
>> +     charger: charger@0 {
>> +             ....
>> +             monitored-battery = <&bat>;
>> +             ...
>> +     };
>> +
>> +     fuel_gauge: fuel_gauge@0 {
>> +             ....
>> +             monitored-battery = <&bat>;
>> +             ...
>> +     };
>
> The charger stuff does does not integrate well with
> pre-existing support for power-supplies property
> described in
> Documentation/devicetree/bindings/power/supply/power_supply.txt
>
> I think the proper chain would be:
>
> bat: battery {
>         compatible = "fixed-battery";
>         terminate-microvolt = <3700000>;
>         design-microwatt-hours = <5290000>;
>         design-microamp-hours = <1430000>;
> };
>
> fuel_gauge: fuel_gauge@0 {
>         ...
>         monitored-battery = <&bat>;
>         power-supplies = <&charger>;
>         ...
> };
>
> charger: charger@0 {
>         ...
> };
>
> I added the power-supplies node to the fuel-gauge instead of the battery,
> since fuel-gauge + fixed-battery is basically a smart battery.

BQ24190 charger will need other params from a battery node. How does
it get them in this scenario?
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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