| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Some code cleanup was made.
Functionality didn't changed.
Change-Id: I57b5f629869dd1e59c30fa7245639347fa858cdc
Signed-off-by: Volodymyr Riazantsev <v.riazantsev@ti.com>
|
|
|
|
|
|
|
| |
Set/Reset Fuel Gauge during resume/suspend.
Change-Id: Id799c63c66114fde3803acce05a4498a0458ee15
Signed-off-by: Ambresh K <ambresh@ti.com>
|
|
|
|
|
|
|
|
|
| |
Disable/Enable GPADC temperature feature during suspend/resume.
Will ensure that VANA/VRTC are driven to lp state and potentially
save couple of uA.
Change-Id: Iedba0f0c961e623f584a760a71d672a5ced75abe
Signed-off-by: Ambresh K <ambresh@ti.com>
|
|
|
|
|
|
|
|
| |
Estimate capacity not only when battery is discharged, but
also when charger is plugged.
Change-Id: I776f65929d5adbc8db06aea214ed502105880682
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During the battery charging process interrupts can occur and
software must read the reason of the interrupt. One of the reasons
is battery removed/insert event, which is already analyzed in interrupt
service routine.
During AC removal, due to transient reading battery ID resistor may
return low value and absence of battery could be falsely detected.
Checking battery presence in ISR prevents reading the reason of
interrupt, which should be done.
Change-Id: I6e0a13b69d029916f02a46480f1cfd2bdf03296c
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If device is using the battery simulator set battery level
to 100%.
This is a HACK until the test scripts are updated to handle the
battery < 5% window on Android
Change-Id: Iee8e215e89514274636b745705b79f1ef019511d
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
Acked-by: Akash Choudhari <akashc@ti.com>
Signed-off-by: Huzefa Kankroliwala <huzefank@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If board is booted with AC power supply connected, then
first disconnect event is not detected and
/sys/class/power_supply/twl6030_ac/online returns '2'
meaning AC charging.
Now, charge state value detected when probe was called
is saved in device info structure.
Change-Id: I5534acc40456d39b4f37f30797b9bcae500cdc3b
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initialise statically allocated blocking_notifier_head
structure at compile time.
It was initialised when driver's probe function was called.
If any other driver registered its notifier_block in notifier_list
before probe was called, then registered notifier_block would be
lost.
Change-Id: I5d611cbdb5b789f55a1e62fbe690039cd33ed287
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support for the battery charging component of the
Phoenix IC. It enables charging via USB.
Change-Id: Ia076c3f6009c7d064a68153f9193b7f927553ad9
Signed-off-by: Nishant Kamat <nskamat@ti.com>
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
bq2415x has 32 second watchdog timer. If within 32 second
the watchdog timer is not reset then the charge is terminated.
The work to reset watchdog was scheduled every 30 seconds, and
sometimes time out expired. Reduce schedule period to 20 seconds
to reset the watchdog more frequently.
Change-Id: I1680a0db15a566abe38a0aa1c25572e01fe5d844
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
|
|
|
|
|
|
|
|
|
|
| |
Create bq2415x_charger.c for BQ24156 AC charger
BQ24156 interacts with TWL6030 for AC charger detection and
charge control. Add support in Kconfig and Makefile.
Change-Id: I3ee6a7a058174d43102a9d36736a3fb682424fcd
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
|
|\
| |
| |
| |
| | |
Change-Id: I336ba4d61beba035ecc237ccc68b012e48702a87
Signed-off-by: Todd Poynor <toddpoynor@google.com>
|
| |\
| | |
| | |
| | |
| | | |
Change-Id: I86dcae86b15baab2cb26e2c53faafb57c606a2b5
Signed-off-by: Todd Poynor <toddpoynor@google.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
commit 0e053fcbbbc4d945247cb32cad2767b483cb65f8 upstream.
Fixes the deadlock when inserting and removing the ds2780.
Signed-off-by: Clifton Barnes <cabarnes@indesign-llc.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
commit 853eee72f74f449797f0500ea19fc1bf497428d8 upstream.
Simply creates one point to call the w1 interface.
Signed-off-by: Clifton Barnes <cabarnes@indesign-llc.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some max1704x devices have been seen to issue a bogus fuel alert.
When this happens, we sanity check the capacity value to make sure
that it is not a transient condition.
Added some more verbose logging when this condition occurs.
Change-Id: I537fb81ab2521469f53ee1ce6b4c16e255128dbe
Signed-off-by: Dima Zavin <dima@android.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I719df67a12be42730695d406476892c90ec67fce
Signed-off-by: Dima Zavin <dima@android.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I387b3a971fe62edcbcfd1a841bfd5a4546528b28
Signed-off-by: Dima Zavin <dima@android.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I133f19836ff9ee0fb3f0ccb0f0edca33ab56e196
Signed-off-by: Dima Zavin <dima@android.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a flag to enable/disable the use of the fuel alert irq.
Change-Id: I38fbffd7febec0813502c6d5b30e87de40fa9638
Signed-off-by: Marty Fouts <mfouts@sta.samsung.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I496b39269855abfb076a12b754301ae8d5c3cc81
Signed-off-by: Todd Poynor <toddpoynor@google.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I9bd675ce5dd1b775fa5ac95223859b395809726e
Signed-off-by: Todd Poynor <toddpoynor@google.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I67eac879a05e5a3e5a008d7ac0133d6296a85b7f
Signed-off-by: Todd Poynor <toddpoynor@google.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Most importantly, don't report a zero remaining battery capacity
on I2C error, causing a low battery shutdown from userspace.
For now, continue to report the previous value. We may want to
eventually report an error that will cause the UI show a warning
indication.
Change-Id: I78a0a4924c0c36d41934a356a96e020d7910a814
Signed-off-by: Todd Poynor <toddpoynor@google.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a dump of state information each time the battery gauge updates
state. This is to help tracking issues with the accuracy of the gauge.
Change-Id: I087529c085b9aa93314f0bd56b34ac61ec44c740
Signed-off-by: Marty Fouts <mfouts@sta.samsung.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add battery temperature and type property
to display in application.
Change-Id: I26c04cf4d0424c2856bf95c8de469e9dc03a100e
Signed-off-by: SON HONG MIN <hongmin.son@samsung.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1. Discharging
- Modified full charging check.(check charging current by used adc)
- Temperature. (Low temp : -5', High temp : 50')
- Set charging limit time.
(before first fully charged : 6hour, after fully charged : 90min)
2. Recharging
- case of Full : under 4.14v
- Case of Temperature :
(Low temp : 0', High temp : 42')
- case of limit time : under 4.15v
Change-Id: I903fc3fa45f6b2bdc9ebbd70df0284df8e09e6d1
Signed-off-by: SON HONG MIN <hongmin.son@samsung.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
max17043 supports low battery alert interrupt. This patch add hook for the
low SOC alert interrupt. It shuts down the system when interrupt is triggered.
Change-Id: I419c25d6d6df242125cea52cd84f991f86a31cb2
Signed-off-by: Larry Guan <hguan@sta.samsung.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
conversion."
This reverts commit 89aec7ab59f04861e7f5352c5f08d15800bdfc60.
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I9c2b59b0b96121d0f15a6aa2689f2fb96ca02f9c
Signed-off-by: Todd Poynor <toddpoynor@google.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix I2C register read/write functions to perform 16 bits read/write instead
of 8 bits. On max17043 datasheet p7, it states "Register reads and writes
are only valid if all 16 bits are transferred".
Change-Id: Ic12d8640039e854570d6add114cd501c6f256267
Signed-off-by: Larry Guan <hguan@sta.samsung.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The battery capacity reported may not always be representative of
how much charge is actually remaining. When the battery is almost empty,
the output voltage may dip and go below the threshold for safe operation.
The "almost empty" watermark will be different for different designs so it
needs to be passed through platform data.
The battery reported capacity is thus scaled from [min,~100] to [0,100].
Change-Id: I257c67bcc9b47d833f0bcea9831f6c4a4486a58b
Signed-off-by: Dima Zavin <dima@android.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
PM structural changes in order to use the alarm.
(Use PM notifier instead of PM function)
Change-Id: I8626fd706f4c4006c2fe77ea4826418e08f576a4
Signed-off-by: Hong-Min Son <hongmin.son@samsung.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I5616337a6efc8cdb1a9afeb47b5378e7e95b6c70
Signed-off-by: Todd Poynor <toddpoynor@google.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Allow reset on probe to be skipped
Change-Id: I2fb58718ff5e585447dbb9847066bffd0fe7eeea
Signed-off-by: Hong-Min Son <hongmin.son@samsung.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Initialize the worker before calling power_supply_register(). The
external_power_changed callback may be called immediately by
power_supply, which will schedule the worker, prior to initializing
the worker. The uninitialized data structure can trigger a BUG in
the workqueue code, causing the worker thread to die.
Also move the reset prior to power_supply_register(), to ensure
the worker isn't run prior to, or concurrent with, the reset.
Change-Id: I969cc04dc6eb4579b8b91f788383addeb7f8d129
Signed-off-by: Todd Poynor <toddpoynor@google.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use cancel_delayed_work_sync before freeing the associated data
structures at remove time.
Change-Id: I746680c952b9cf23f667221645e5d9979184ae1d
Signed-off-by: Todd Poynor <toddpoynor@google.com>
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If the platform data sets the use_otg_notifier flag,
the driver will now register an otg notifier callback and listen
to transceiver events for AC/USB plug-in events instead. This would
normally be used by not specifying is_xx_online callbacks and
not specifying any irqs so the state machine is completely driven
from OTG xceiver events.
Change-Id: Ic4b3bc4010f299156e41fd2411696c7ff5a88e92
Signed-off-by: Dima Zavin <dima@android.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ifbfe137c9f7b6a3b12fcb79dd3f9c6660a36a7a7
Signed-off-by: Axel Haslam <axelhaslam@ti.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I9579bc154c366b8cbad5f1be88219b167c35c61f
Signed-off-by: Dima Zavin <dima@android.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I0cb4234b74f06572d7b0b11cb22f50041579cba1
Signed-off-by: Dima Zavin <dima@android.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ia8f103bb232e6329fd1e8235f8f82668554de987
Signed-off-by: Dima Zavin <dima@android.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ib9ba81ca257a7ff2f97480b26642ca931ef42d92
Signed-off-by: Dima Zavin <dima@android.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
After resetting the fuel gauge, trigger a quick start to get
reasonable starting values.
Change-Id: I1e9e9fbf68b62818a93d6e05acccfa503e8d4ec6
Signed-off-by: Colin Cross <ccross@android.com>
|
|/
|
|
|
|
|
|
|
|
| |
pending
When connecting usb or the charger the device would often go back to sleep
before the charge led and screen turned on.
Change-Id: I01def6d86ddece0d4e31d2a91d176ed0975b6b9d
Signed-off-by: Arve Hjønnevåg <arve@android.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* git://git.infradead.org/battery-2.6:
PXA: Use dev_pm_ops in z2_battery
ds2760_battery: Fix rated capacity of the hx4700 1800mAh battery
ds2760_battery: Fix indexing of the 4 active full EEPROM registers
power: Make test_power driver more dynamic.
bq27x00_battery: Name of cycle count property
max8903_charger: Add GENERIC_HARDIRQS as a dependency (fixes S390 build)
ARM: RX-51: Enable isp1704 power on/off
isp1704_charger: Allow board specific powering routine
gpio-charger: Add gpio_charger_resume
power_supply: Add driver for MAX8903 charger
|
| |
| |
| |
| |
| | |
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
Fix rated capacity of the HP iPAQ hx4700 3.7V 1800mAh (359113-001) battery. For this battery the value of the rated capacity EEPROM register at 0x32 is 7; thus rated_capacities[7] = 1800.
Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
Fix indexing of the 4 active full EEPROM registers. The indexing was out by 1, accessing the EEPROM registers at 0x23 to 0x26 instead of 0x22 to 0x25.
Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|