mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
Extend TSU6721 BCD timer to 3.6 seconds
If the user plug in the charger really slowly, VBUS and GND will make
contact before ID pin. Currently timer is set to fire in 0.6 seconds,
which means ID pin need to make contact within 0.6 seconds after VBUS
make contact. This is causing chargers to be recognized as non-standard
charger. Let's extend this to 3.6 seconds.
BUG=chrome-os-partner:19765
TEST=Plug in a charger half-way through and see device type 0x20000.
Wait for 3.6 seconds, and see it changes to 0x60000.
TEST=Plug in a charger half-way through, wait for 2 seconds, and then
plug it in all the way. See device type 0x20010.
TEST=Plug in a charger to the end. See device type 0x20010 immediately.
BRANCH=spring
Change-Id: I46c408e7bc733fe4f3655db253f4065a4f12ee1a
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/56772
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
@@ -136,7 +136,7 @@ void tsu6721_init(void)
|
||||
|
||||
/* set USB charger detection timeout to 600ms */
|
||||
settings = tsu6721_read(TSU6721_REG_TIMER);
|
||||
settings = (settings & ~0x38);
|
||||
settings = (settings & ~0x38) | 0x28;
|
||||
tsu6721_write(TSU6721_REG_TIMER, settings);
|
||||
|
||||
tsu6721_set_interrupt_mask(TSU6721_INT_ATTACH |
|
||||
|
||||
Reference in New Issue
Block a user