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.
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
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.