Closed
Bug 942386
Opened 11 years ago
Closed 11 years ago
write test script to disable/enable charging using i2c-tools
Categories
(Firefox OS Graveyard :: General, defect, P1)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: huseby, Assigned: huseby)
References
Details
(Keywords: perf, Whiteboard: [c=power p=1 s= u=])
Inside of the s5pc110_battery.c driver, it disables charging using the following i2c calls: ret = max8998_update_reg(i2c, MAX8998_REG_CHGR2, (1 << MAX8998_SHIFT_CHGEN), MAX8998_MASK_CHGEN); ret = max8998_write_reg(i2c, MAX8998_REG_CHGR2, (2 << MAX8998_SHIFT_ESAFEOUT) | (2 << MAX8998_SHIFT_FT) | (0 << MAX8998_SHIFT_CHGEN)); it enables USB charging with: ret = max8998_write_reg(i2c, MAX8998_REG_CHGR1, (6 << MAX8998_SHIFT_TOPOFF) | (3 << MAX8998_SHIFT_RSTR) | (2 << MAX8998_SHIFT_ICHG)); ret = max8998_write_reg(i2c, MAX8998_REG_CHGR2, (2 << MAX8998_SHIFT_ESAFEOUT) | (2 << MAX8998_SHIFT_FT) | (0 << MAX8998_SHIFT_CHGEN)); these constants can easily be translated into commands issued using the i2c-tools.
Assignee | ||
Comment 1•11 years ago
|
||
Not doing this using i2c_tools. Can't modify the registers of the charger from userland because the kernel driver is controlling it and the kernel won't let me set "slave mode" on the dev filesystem node. If you look at the i2c-tools output in Bug 942387 you can see that the charge device comes up as UU meaning it is under driver control.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•