power: smb135x-charger: support parallel charging
In this configuration the DC path is left unused. The D+ D- lines are
not connected to smb135x and the output power only goes to the battery.
This configuration is intended to assist the main charging path in
constant current mode.
The shutdown/suspend pin is connected to a signal which goes high when
any charger is present. The chip is in shutdown state until no charger
is present. The chip is in active state when a charger is inserted,
however charging won't begin as the chip is configured to be in USB
suspended state via pin control. The main charger is expected to enable
smb135x when a strong USB charger is detected. The enable switches from
pin control USB suspend to cmd control and disables USB suspend.
Note that the fault output of the main charger is connected to the EN pin.
This way charging stops on smb135x if the main charger sees a fault
(hot/cold conditions).
It is expected that when a USB charger is inserted the PRESENT property
is set. The driver uses it to initialize registers. I2C access prior
to this may not be available as the chip would be in the shutdown state.
Also when charging has to begin, one has to set the MAX_CURRENT property
with an appropriate value. This puts the USB path out of suspend and
begins drawing current from it. Note that setting MAX_CURRENT = 2mA
means USB host is suspending and the driver will suspend that path.
When a USB charger is removed, it is expected that PRESENT property is
unset. The order between setting of MAX_CURRENT=0 and setting PRESENT=0
doesn't matter.
Change-Id: Ifb208f61d4ea2a380e3a900e4ed85316033cf6da
Signed-off-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Loading
Please register or sign in to comment