Re: [PATCH v2 2/3] devicetree: bq27425: add documentation for bq27425 fuel gauge

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

 




Hi,

On Wed, Jan 04, 2017 at 06:10:06PM -0800, Matt Ranostay wrote:
> Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
> ---
>  .../devicetree/bindings/power/bq27425.txt          | 25 ++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/power/bq27425.txt
> 
> diff --git a/Documentation/devicetree/bindings/power/bq27425.txt b/Documentation/devicetree/bindings/power/bq27425.txt
> new file mode 100644
> index 000000000000..5d33b61cf9b7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/bq27425.txt
> @@ -0,0 +1,25 @@
> +* TI BQ27425 Fuel Gauge
> +
> +http://www.ti.com/lit/ds/symlink/bq27425-g2a.pdf
> +
> +Please note that if any of the optional properties are defined
> +then all settings must be.
> +
> +Required properties:
> +- compatible: Should be "ti,bq27425"
> +- reg: integer, I2C address of the device
> +
> +Optional properties:
> +- ti,design-microamp-hours: integer of mAh of the battery
> +- ti,design-microvolt-hours: integer of the mWh of the battery
> +- ti,terminate-microvolt: integer of mV of the dead voltage of
> +		the battery
> +
> +bq27425 {
> +	compatible = "ti,bq27425";
> +	reg = <0x55>;
> +
> +	ti,design-microamp-hours = <1360>;
> +	ti,design-microwatt-hours = <4970>;
> +	ti,terminate-microvolt = <3200>;
> +};

The design capacity of the battery is not a property of the fuel
gauge. It should be modelled more like this:

/ {
    bat0: battery {
        /* Nokia BL-5J */
        nominal-microvolt = <3700000>;
        design-microwatt-hours = <4900000>;
        design-microamp-hours = <1320000>;
        chemistry-type = <POWER_SUPPLY_LI_ION>;

        /* other battery specific stuff */
    };
};

&i2c3 {
    bq27425 {
        compatible = "ti,bq27425";
        reg = <0x55>;

        monitored-battery = <&bat0>;

        /* other fuel-gauge specific stuff */
    };
};

Also there is another pending patch series, that documents bq27xxx.
bq27425 should be documented inside of it. The battery binding would
be generic, so it should be described in its own document.

-- 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