Messages in this thread | | | Date | Thu, 3 Dec 2009 13:03:32 +0200 | From | Felipe Balbi <> | Subject | Re: [PATCH] power_supply: Add driver for TWL4030/TPS65950 BCI charger |
| |
Hi,
On Thu, Dec 03, 2009 at 11:55:12AM +0100, ext Grazvydas Ignotas wrote: >TPS65950 is catalog part of TWL4030 and has documentation here: >http://focus.ti.com/docs/prod/folders/print/tps65950.html#technicaldocuments > >It says that it is software's responsibility to detect the device and >set the right charge mode/current..
yes, the BCI (or bq24xxx) will never be able to know which configuration we were enumerated with...
>> yes, that'll work. But how about start charging always with 100mA and if >> userland sees that we were enumerated it reconfigures charging as necessary. >> But this would mean that we have the EM daemon started up just after the >> driver itself is loaded to avoid the problem with 100ms no enumeration. How >> does that sound ? Do we start making some writeable power_supply sysfs ??? > >There are also USB chargers that don't enumerate and have D+ and D- >shorted with a resistor (see "dedicated charger port" in the charging >spec), how do we support those?
dedicated chargers are simple. You kick the charger detection according to USB BC 1.x and if it returns true, you configure high current charging. Host/Hub chargers are also simple, after kicking charger detection, you enable Data pullups (e.g. SOFTCONN bit in musb's power register) and see if the host sends a setup packet...
the complicated part is passing the information of which configuration you were enumerated with to the charger chip.
-- balbi
| |