summaryrefslogtreecommitdiff
path: root/drivers/power/ab5500_charger.c
AgeCommit message (Collapse)Author
2011-12-16Squashandroid-20111223Benn Pörscke
Change-Id: I2fcf46d1fc4b0cd4c61e5be3654c43b80db86015
2011-10-21power:ab5500-charger: check the usb type in notifier callArun Murthy
When a usb notifier is called, update the notified current only if the plugge in device is a standard host else do not update the current just return. The notifier call that is called in the usb driver is not only for the battery driver but other usb instances, hence usb cannot stop calling the notifier call and do a check to call only if it is a standard host. Hence this check is done in the battery driver, and if relevant update else just return. ST-Ericsson Linux next: NA ST-Ericsson ID: 362955 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I83026aba60b8a60c9f80e2a699b8eded285f8a09 Signed-off-by: Arun Murthy <arun.murthy@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34799 Reviewed-by: Mian Yousaf KAUKAB <mian.yousaf.kaukab@stericsson.com> Reviewed-by: QABUILD Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
2011-10-10power: ab5500-bm: set default charging currentArun Murthy
In case of standard host, current that can be drawn for charging is to be notified by the usb driver. Until this notification battery driver can go ahead charging by consuming 100mA as per the specs. Change-Id: I2687afa5dca39d0e800011848b38f2822d0bc7e7 Signed-off-by: Arun Murthy <arun.murthy@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31934 Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com> Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com> Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
2011-09-22power: ab5500-bm: update usb state change interface to otg notifierArun Murthy
Remove usb_state_changed() exported function. Replace it with otg notifier call. This makes static_di redundant so it is removed. Moreover, there is no need to protect usb_state.usb_changed with usb_lock. So usb_lock is removed as well. Usb state is fabricated based on the reported mA. State is not as accurate as reading it directly from the usb controller. This should not matter as battery- manager driver should care more about mA than the state anyway. Change-Id: I180062a87ca773b5c215aee3ef1c60315d309d42 Signed-off-by: Arun Murthy <arun.murthy@stericsson.com> Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31577 Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
2011-09-19ab5500: move to separate headerRabin Vincent
Change-Id: I11dd2a23323229096b6e0ee2d4dc68cab8919bff
2011-09-19power: ab5500-charger: update the watchdog rekick seqArun Murthy
In AB5500 there exist no charger watchdog, instead all the charging registers that are written during enabling charging are to be re-written which acts as a watchdog re-kick. Even though its usb charging DCIOCURRENT register has to be written in order to kick charging, else charging is not started. ST-Ericsson Linux next: Not Tested ST-Ericsson ID: WP257120 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Iad283349e21027908df8aec560c9f44f2861f0ee Signed-off-by: Arun Murthy <arun.murthy@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/27220 Reviewed-by: Johan PALSSON <johan.palsson@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
2011-09-19power: ab5500-power: usb type detectionArun Murthy
usb type can be detected based on the usb line status register. USB line status register gets updated on receiving usb line status interrupt. This usb line status interrupt is obtained after doing a chip select in usb rising edge interrupt handler and this is done by the usb driver. Now on getting usb rising edge interrupt, if the usb line status register is read, it ends up with unknown device connected. USB line status register must be read only after getting the usb line status interrupt, else will not be updated. ST-Ericsson Linux next: Not Tested ST-Ericsson ID: ER350732 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ibca3a8e8032e23fb2b52ac45f9172269f868ae42 Signed-off-by: Arun Murthy <arun.murthy@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/26709 Reviewed-by: QATEST Reviewed-by: Johan PALSSON <johan.palsson@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
2011-09-19power: ab5500-charger: update the usb presence statusArun Murthy
When usb is removed, since there are no status registers, verify the same by reading the interrupt source register and send an uevent. ST-Ericsson Linux next: Not Tested ST-Ericsson ID: ER351099 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ife573551319e91e3651c19e40601bb850c186a14 Signed-off-by: Arun Murthy <arun.murthy@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/26703 Reviewed-by: Johan PALSSON <johan.palsson@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
2011-09-19power: ab5500-charger - usb line status interrupt correctionArun Murthy
After getting usb rising edge interrupt, usb chip select should be enabled in order to get the usb line status interrupt. This sequence is done in the usb driver, in battery driver, usb charger detect was enabled. This was conflicting with the sequence followed in the usb driver and hence usb line status interrupt was not triggered. Hence reverted the usb detection enable in battery driver. ST-Ericsson Linux next: Not Tested ST-Ericsson ID: ER349171 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Iaa055cdbe59699fe0442489586fd5c7e21c1ed5b Signed-off-by: Arun Murthy <arun.murthy@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25822 Reviewed-by: QATEST Reviewed-by: Johan PALSSON <johan.palsson@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
2011-09-19power: u5500: Fix and activate Battery Management for U5500Philippe Langlais
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
2011-09-19power: ab5500-charger: ab5500 usb charger driverArun Murthy
Adds a power supply class for usb, used to charge the battery. It includes enabling/disabling of usb charging and monitoring the usb. ST-Ericsson Linux next: Not Tested ST-Ericsson ID: WP256401 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I4fa42b3dbe82103ad49293b784243dc0edb61558 Signed-off-by: Arun Murthy <arun.murthy@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23149 Reviewed-by: QATEST Reviewed-by: Johan PALSSON <johan.palsson@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>