Hi, On Fri, Aug 11, 2017 at 02:57:10PM -0700, Liam Breck wrote: > On Thu, Aug 10, 2017 at 7:50 PM, Rob Herring <robh@xxxxxxxxxx> wrote: > > On Mon, Aug 07, 2017 at 12:54:17PM -0700, Liam Breck wrote: > >> From: Liam Breck <kernel@xxxxxxxxxxxxxxxxx> > >> > >> Document monitored-battery and ti,system-minimum-microvolt properties. > >> > >> Cc: Rob Herring <robh@xxxxxxxxxx> > >> Cc: devicetree@xxxxxxxxxxxxxxx > >> Signed-off-by: Liam Breck <kernel@xxxxxxxxxxxxxxxxx> > >> --- > >> .../devicetree/bindings/power/supply/bq24190.txt | 49 ++++++++++++++++++++++ > >> 1 file changed, 49 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 00000000..82a1c842 > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/power/supply/bq24190.txt > >> @@ -0,0 +1,49 @@ > >> +TI BQ24190 Li-Ion Battery Charger > >> + > >> +Required properties: > >> +- compatible: contains one of the following: > >> + * "ti,bq24190" > >> + * "ti,bq24192i" > >> +- reg: integer, I2C address of the charger. > >> +- interrupts[-extended]: configuration for charger INT pin. > >> + > >> +Optional properties: > >> +- monitored-battery: phandle of battery characteristics devicetree node > >> + The charger uses the following battery properties: > >> + + precharge-current-microamp: maximum charge current during precharge > >> + phase (typically 20% of battery capacity). > >> + + charge-term-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. > > > > Why doesn't the charger driver control this? > > This pin/gpio has to be high when USB is plugged in to make the > charger chip negotiate 500mA from a SDP port. It should generally be > configured that way even if the driver is not loaded, as the chip does > not require a driver to function. Some boards may do that with a > pull-up. Also the user may want to change this via sysfs and not have > the driver "fix" it. drivers/power/supply/qcom_smbb.c exposes the otg feature as regulator. I think in this case it could be exposed as gpio-regulator. -- Sebastian
Attachment:
signature.asc
Description: PGP signature