Commit graph

16 commits

Author SHA1 Message Date
flar2
40861c769c Battery life extender patch from tni.andro
Signed-off-by: flar2 <asegaert@gmail.com>
2018-04-04 10:19:25 +02:00
Hank_Lee
b60cd31fc3 charger: smb345: report wireless online = 0 when OTG is plugged
OTG has higher priority than wireless charging, we need to:
1. bypass wireless irq work when OTG is plugged
2. report wireless online = 0 when using wireless charging then
   plugging OTG
or it will show charging icon even battery status is "Not Charging"

Bug: 11073722
Change-Id: I5a807817a5733d043316d2ad04dde50b0b506895
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
2013-11-08 23:27:22 +00:00
Hank_Lee
f3041f511e charger: smb345: reduce JEITA hot limit temperature to stop charging
modify hot limit temperature from 55°C  to 45°C  to stop charging

Bug: 11222237
Change-Id: I81bc8d75bba59635d5b136bbf41cf3090d4d2b4f
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
2013-10-15 17:16:56 +00:00
Hank_Lee
e7204e7b83 charger: smb345: monitor AICL result in case of VBUS drop
VBUS drop level may not affect VBUS_DET to trigger IRQ,
it results in AICL result much lower without being noticed,
we check AICL result during battery polling and reconfig it
if neccessary

Bug: 10812199
Change-Id: I98dde8cdd5061d02851cb5f519c437b220906add
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
2013-10-09 00:05:05 +00:00
Hank_Lee
149c49f191 charger: smb345: refine JEITA to avoid battery over voltage
In high temperature environment, charger will occur over-voltage
and it will latch charging battery function, we need to refine
JEITA function to avoid it

Bug: 9847839
Change-Id: I1185fd3a49e318ebd83b30d843d2b72c39f22e40
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
2013-07-15 17:31:52 +00:00
Hank_Lee
bf432b3836 charger: smb345: hold wakelock when wireless charging
Bug: 9474292
Change-Id: I6d149bfbf5b2d7557f6aa2a28b1168e5fc7b4499
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
2013-07-11 02:48:17 +00:00
Hank_Lee
b38c87af16 charger: smb345: disable wireless charging IRQ when AC plugged
Because AC has first priority of charging, we need to
disable wireless charging IRQ when AC plugged to avoid
reconfig AC input current frequently

Bug: 9615541
Change-Id: I908b4825193dc463ef11d7eaf47ac61204b6692a
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
2013-06-28 18:34:23 +00:00
Hank_Lee
7c8ac74b83 charger: smb345: reconfig USBIN input current limit
USBIN input current limit may load smb345 default(500mA)
even AC adapter due to VBUS drop, we need to reconfig it

Bug: 9474296
Change-Id: I46ae320180a6ec6c3f9c6e9bab6a2b1f7c7ce05a
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
2013-06-18 19:16:39 +08:00
Hank_Lee
35b0d3174f charger: smb345: hold 2s tiemout wakelock during resume
The system resume then suspend too fast
when put on or remove wireless charging dock

Change-Id: Idddb823036b58f1c390aee500574d8379a91731f
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
2013-06-17 20:28:24 +00:00
Hank_Lee
a5cefa74bb charger: smb345: set float voltage as 4.3V
Bug: 9263415
Change-Id: I6ba49f7d2409476eb85963509ce90f9423b15be7
Signed-off-by: alan_lu <alan_lu@asus.com>
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
2013-06-05 00:13:10 +00:00
Hank_Lee
97a9311d96 charger: smb345: add JEITA function
1. If there is charging source, set Hard/Soft Hot Limit
   when system is awake or suspend(shutdown)
2. Monitor battery temperature to set corresponding float voltage
   and disable/enable charger

Change-Id: Ia804a935570bbb5a1fe22067a712eaef36e903c0
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
2013-05-16 17:42:08 +00:00
Hank_Lee
3291013b3d charger: smb345: setup wireless charging current limit orderly
1. detect wireless charging
2. set input current limit as 300 mA and disable AICL
3. after 2 seconds, set input current limit as 500 mA
4. after 2 seconds, set input current limit as 700 mA

Change-Id: Ia91ea674ba7eea45f92421d13b75a578a2d21a77
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
2013-05-09 16:41:50 +00:00
Hank_Lee
fdf1b1cd3a charger: smb345: config charging type priority since hardware rev_c
Priority is : 1. AC, 2. wireless charging, 3. USB.
Charger default setting is that wireless charger has higher priority,
so disable wireless charging when AC is plugged in since hardare rev_c.

Bug: 8411313
Change-Id: I6da25d1d6fbdf683421918229babba0ab97afebc
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
2013-04-30 16:30:18 +08:00
alan_lu
5fc86932ed charger: smb345: support wireless charging
Change-Id: I8dc909a5befdb4a2d6bbb0457c6ab4ea3e732f28
Signed-off-by: hank_lee <hank_lee@asus.com>
Signed-off-by: alan_lu <alan_lu@asus.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-04-18 16:08:47 -07:00
mars_kao
a7984c9884 TouchScreen: add update power source state.
add callback function in power driver.

Change-Id: I3f6749d21d0fde61e77d4fb12008d08618a43947
Signed-off-by: mars_kao <mars_kao@asus.com>
2013-04-18 16:08:19 -07:00
jerryyc_hu
026fab6399 charger: Add smb345 battery charger driver.
Change-Id: Ifec1f2671989258a7dd53afa2e828d90a4e69e3c
Change-Id: Ieeeea299f3302db284c5eadaa06cc66d35495d7a
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/68144
Reviewed-by: Nick Cheng <nick_cheng@asus.com>
Tested-by: Nick Cheng <nick_cheng@asus.com>
2013-04-18 16:07:58 -07:00