Message ID | 20170321220921.5834-3-liam@networkimprov.net |
---|---|
State | Changes Requested, archived |
Headers | show |
Hi, On 21-03-17 23:09, Liam Breck wrote: > From: Liam Breck <kernel@networkimprov.net> > > Document monitored-battery and ti,system-minimum-microvolt properties. > > Cc: Rob Herring <robh@kernel.org> > Cc: devicetree@vger.kernel.org > Signed-off-by: Liam Breck <kernel@networkimprov.net> Looks good to me: Reviewed-by: Hans de Goede <hdegoede@redhat.com> Regards, Hans > --- > .../devicetree/bindings/power/supply/bq24190.txt | 47 ++++++++++++++++++++++ > 1 file changed, 47 insertions(+) > create mode 100644 Documentation/devicetree/bindings/power/supply/bq24190.txt > > diff --git a/Documentation/devicetree/bindings/power/supply/bq24190.txt b/Documentation/devicetree/bindings/power/supply/bq24190.txt > new file mode 100644 > index 0000000..d252d10 > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/supply/bq24190.txt > @@ -0,0 +1,47 @@ > +Binding for TI BQ24190 Li-Ion Battery Charger > + > +Required properties: > +- compatible: Should contain one of the following: > + * "ti,bq24190" > +- reg: integer, I2C address of the device. > + > +Optional properties: > +- monitored-battery: phandle of battery information devicetree node > + These battery properties are relevant: > + + precharge-current-microamp: maximum charge current during precharge > + phase (typically 20% of battery capacity). > + + endcharge-current-microamp: a charge cycle terminates when the > + battery voltage is above recharge threshold, and the current is below > + this setting (typically 10% of battery capacity). > + See Documentation/devicetree/bindings/power/supply/battery.txt > +- ti,system-minimum-microvolt: when power is connected and the battery > + is below minimum system voltage, the system will be regulated above this > + setting. > + > +Other features: > +- Use gpio-hog to set the OTG pin high to enable 500mA charge current on USB SDP port. > + > +Example: > + > +bat: battery { > + compatible = "simple-battery"; > + precharge-current-microamp = <256000>; > + endcharge-current-microamp = <128000>; > +}; > + > +bq24190 charger@6a { > + compatible = "ti,bq24190"; > + reg = <0x6a>; > + // interrupt configuration here > + monitored-battery = <&bat>; > + ti,system-minimum-microvolt = <3200000>; > +}; > + > +&twl_gpio { > + otg { > + gpio-hog; > + gpios = <6 0>; > + output-high; > + line-name = "otg-gpio"; > + }; > +}; > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, The interrupt must be documented, since its mandatory. On Tue, Mar 21, 2017 at 03:09:16PM -0700, Liam Breck wrote: > From: Liam Breck <kernel@networkimprov.net> > > Document monitored-battery and ti,system-minimum-microvolt properties. > > Cc: Rob Herring <robh@kernel.org> > Cc: devicetree@vger.kernel.org > Signed-off-by: Liam Breck <kernel@networkimprov.net> > --- > .../devicetree/bindings/power/supply/bq24190.txt | 47 ++++++++++++++++++++++ > 1 file changed, 47 insertions(+) > create mode 100644 Documentation/devicetree/bindings/power/supply/bq24190.txt > > diff --git a/Documentation/devicetree/bindings/power/supply/bq24190.txt b/Documentation/devicetree/bindings/power/supply/bq24190.txt > new file mode 100644 > index 0000000..d252d10 > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/supply/bq24190.txt > @@ -0,0 +1,47 @@ > +Binding for TI BQ24190 Li-Ion Battery Charger > + > +Required properties: > +- compatible: Should contain one of the following: > + * "ti,bq24190" > +- reg: integer, I2C address of the device. interrupts: interrupt specifier for bq24190's INT > + > +Optional properties: > +- monitored-battery: phandle of battery information devicetree node > + These battery properties are relevant: > + + precharge-current-microamp: maximum charge current during precharge > + phase (typically 20% of battery capacity). > + + endcharge-current-microamp: a charge cycle terminates when the > + battery voltage is above recharge threshold, and the current is below > + this setting (typically 10% of battery capacity). > + See Documentation/devicetree/bindings/power/supply/battery.txt > +- ti,system-minimum-microvolt: when power is connected and the battery > + is below minimum system voltage, the system will be regulated above this > + setting. > + > +Other features: > +- Use gpio-hog to set the OTG pin high to enable 500mA charge current on USB SDP port. > + > +Example: > + > +bat: battery { > + compatible = "simple-battery"; > + precharge-current-microamp = <256000>; > + endcharge-current-microamp = <128000>; > +}; > + > +bq24190 charger@6a { > + compatible = "ti,bq24190"; > + reg = <0x6a>; > + // interrupt configuration here interrupt-parent = <&gpiochip23>; interrupts = <42 IRQ_TYPE_EDGE_FALLING>; > + monitored-battery = <&bat>; > + ti,system-minimum-microvolt = <3200000>; > +}; > + > +&twl_gpio { > + otg { > + gpio-hog; > + gpios = <6 0>; > + output-high; > + line-name = "otg-gpio"; > + }; > +}; > -- > 2.9.3 >
On Tue, Mar 21, 2017 at 03:09:16PM -0700, Liam Breck wrote: > From: Liam Breck <kernel@networkimprov.net> > > Document monitored-battery and ti,system-minimum-microvolt properties. > > Cc: Rob Herring <robh@kernel.org> > Cc: devicetree@vger.kernel.org > Signed-off-by: Liam Breck <kernel@networkimprov.net> > --- > .../devicetree/bindings/power/supply/bq24190.txt | 47 ++++++++++++++++++++++ > 1 file changed, 47 insertions(+) > create mode 100644 Documentation/devicetree/bindings/power/supply/bq24190.txt > > diff --git a/Documentation/devicetree/bindings/power/supply/bq24190.txt b/Documentation/devicetree/bindings/power/supply/bq24190.txt > new file mode 100644 > index 0000000..d252d10 > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/supply/bq24190.txt > @@ -0,0 +1,47 @@ > +Binding for TI BQ24190 Li-Ion Battery Charger > + > +Required properties: > +- compatible: Should contain one of the following: > + * "ti,bq24190" > +- reg: integer, I2C address of the device. > + > +Optional properties: > +- monitored-battery: phandle of battery information devicetree node > + These battery properties are relevant: > + + precharge-current-microamp: maximum charge current during precharge > + phase (typically 20% of battery capacity). > + + endcharge-current-microamp: a charge cycle terminates when the > + battery voltage is above recharge threshold, and the current is below > + this setting (typically 10% of battery capacity). > + See Documentation/devicetree/bindings/power/supply/battery.txt This isn't really relevant to the binding. The battery properties shouldn't vary with the charger. > +- ti,system-minimum-microvolt: when power is connected and the battery > + is below minimum system voltage, the system will be regulated above this > + setting. > + > +Other features: > +- Use gpio-hog to set the OTG pin high to enable 500mA charge current on USB SDP port. > + > +Example: > + > +bat: battery { > + compatible = "simple-battery"; > + precharge-current-microamp = <256000>; > + endcharge-current-microamp = <128000>; > +}; > + > +bq24190 charger@6a { > + compatible = "ti,bq24190"; > + reg = <0x6a>; > + // interrupt configuration here > + monitored-battery = <&bat>; > + ti,system-minimum-microvolt = <3200000>; > +}; > + > +&twl_gpio { > + otg { > + gpio-hog; > + gpios = <6 0>; > + output-high; > + line-name = "otg-gpio"; > + }; > +}; > -- > 2.9.3 > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Rob, On Tue, Mar 28, 2017 at 5:47 PM, Rob Herring <robh@kernel.org> wrote: > On Tue, Mar 21, 2017 at 03:09:16PM -0700, Liam Breck wrote: >> From: Liam Breck <kernel@networkimprov.net> >> >> Document monitored-battery and ti,system-minimum-microvolt properties. >> >> Cc: Rob Herring <robh@kernel.org> >> Cc: devicetree@vger.kernel.org >> Signed-off-by: Liam Breck <kernel@networkimprov.net> >> --- >> .../devicetree/bindings/power/supply/bq24190.txt | 47 ++++++++++++++++++++++ >> 1 file changed, 47 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/power/supply/bq24190.txt >> >> diff --git a/Documentation/devicetree/bindings/power/supply/bq24190.txt b/Documentation/devicetree/bindings/power/supply/bq24190.txt >> new file mode 100644 >> index 0000000..d252d10 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/power/supply/bq24190.txt >> @@ -0,0 +1,47 @@ >> +Binding for TI BQ24190 Li-Ion Battery Charger >> + >> +Required properties: >> +- compatible: Should contain one of the following: >> + * "ti,bq24190" >> +- reg: integer, I2C address of the device. >> + >> +Optional properties: >> +- monitored-battery: phandle of battery information devicetree node >> + These battery properties are relevant: >> + + precharge-current-microamp: maximum charge current during precharge >> + phase (typically 20% of battery capacity). >> + + endcharge-current-microamp: a charge cycle terminates when the >> + battery voltage is above recharge threshold, and the current is below >> + this setting (typically 10% of battery capacity). >> + See Documentation/devicetree/bindings/power/supply/battery.txt > > This isn't really relevant to the binding. The battery properties > shouldn't vary with the charger. Different components need different properties from the battery node. This charger needs the above two, so we should document that, no? >> +- ti,system-minimum-microvolt: when power is connected and the battery >> + is below minimum system voltage, the system will be regulated above this >> + setting. >> + >> +Other features: >> +- Use gpio-hog to set the OTG pin high to enable 500mA charge current on USB SDP port. >> + >> +Example: >> + >> +bat: battery { >> + compatible = "simple-battery"; >> + precharge-current-microamp = <256000>; >> + endcharge-current-microamp = <128000>; >> +}; >> + >> +bq24190 charger@6a { >> + compatible = "ti,bq24190"; >> + reg = <0x6a>; >> + // interrupt configuration here >> + monitored-battery = <&bat>; >> + ti,system-minimum-microvolt = <3200000>; >> +}; >> + >> +&twl_gpio { >> + otg { >> + gpio-hog; >> + gpios = <6 0>; >> + output-high; >> + line-name = "otg-gpio"; >> + }; >> +}; >> -- >> 2.9.3 >> -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Documentation/devicetree/bindings/power/supply/bq24190.txt b/Documentation/devicetree/bindings/power/supply/bq24190.txt new file mode 100644 index 0000000..d252d10 --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/bq24190.txt @@ -0,0 +1,47 @@ +Binding for TI BQ24190 Li-Ion Battery Charger + +Required properties: +- compatible: Should contain one of the following: + * "ti,bq24190" +- reg: integer, I2C address of the device. + +Optional properties: +- monitored-battery: phandle of battery information devicetree node + These battery properties are relevant: + + precharge-current-microamp: maximum charge current during precharge + phase (typically 20% of battery capacity). + + endcharge-current-microamp: a charge cycle terminates when the + battery voltage is above recharge threshold, and the current is below + this setting (typically 10% of battery capacity). + See Documentation/devicetree/bindings/power/supply/battery.txt +- ti,system-minimum-microvolt: when power is connected and the battery + is below minimum system voltage, the system will be regulated above this + setting. + +Other features: +- Use gpio-hog to set the OTG pin high to enable 500mA charge current on USB SDP port. + +Example: + +bat: battery { + compatible = "simple-battery"; + precharge-current-microamp = <256000>; + endcharge-current-microamp = <128000>; +}; + +bq24190 charger@6a { + compatible = "ti,bq24190"; + reg = <0x6a>; + // interrupt configuration here + monitored-battery = <&bat>; + ti,system-minimum-microvolt = <3200000>; +}; + +&twl_gpio { + otg { + gpio-hog; + gpios = <6 0>; + output-high; + line-name = "otg-gpio"; + }; +};