Age | Commit message (Collapse) | Author |
|
..linux-linaro-3.0-2011.07-1_glk3.0
Conflicts:
arch/arm/common/Makefile
drivers/misc/Kconfig
drivers/misc/Makefile
kernel/printk.c
Change-Id: I126f34edb1879981909072beefb2738cad26f951
|
|
Since the battery is unknown, do not measure the battery temp
it might provide some value maybe too high or low leading
to system reboot
ST-Ericsson Linux next: Not Tested
ST-Ericsson ID: WP332221
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I70b4cc959bfd2792a25379cc17a25dada4b1c051
Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25661
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
|
|
Enable compilation of ab5500 energy management driver. It depends on ab5500
mfd and ab5500 gpadc driver.
ST-Ericsson Linux next: Not Tested
ST-Ericsson ID: WP256401
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I072f6bfc643897d3a43ad478f05d78ef2fdbffd8
Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23154
Reviewed-by: Johan PALSSON <johan.palsson@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
Temperature monitoring driver for ab5500. Since temperature is the most
important aspect of a battery, this driver monitors the battery temperature
and takes precautionary measurements even in case of hardware failure.
ST-Ericsson Linux next: Not Tested
ST-Ericsson ID: WP332221
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Idd0a4a7f220ffa9693516757aba395ab7f75cfc2
Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23152
Reviewed-by: QATEST
Reviewed-by: Johan PALSSON <johan.palsson@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
This is a low level ab5500 fuel gauge driver. A power supply class of
type fg is registered to display the battery parameters such as energy,
charge, capacity, voltage.
ST-Ericsson Linux next: Not Tested
ST-Ericsson ID: WP332221
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ibe508dd84836a9a4873539ce194b50788ea25cba
Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23151
Reviewed-by: QATEST
Reviewed-by: Johan PALSSON <johan.palsson@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
A generic charging algorithm for all abx500 varants. It is a high
level algorithm and hence doesn't include any low level or hardware
interaction. Each of the abx500 charging drivers will implement low
level hardware interaction function and provide inputs to this
generic charging algorithm to monitor and implement the charging
functionality.
ST-Ericsson Linux next: Not Tested
ST-Ericsson ID: WP256401
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I8634160b2e67132ae68a09fda7a9fd9d36dd23d2
Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23150
Reviewed-by: QATEST
Reviewed-by: Johan PALSSON <johan.palsson@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
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>
|
|
ST-Ericsson Linux Next: -
ST-Ericsson ID: ER334609
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ia914fa6c65d9c4a5ecbc55237882590772c8b44d
Signed-off-by: Kalle Komierowski <karl.komierowski@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25439
Reviewed-by: QATEST
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
|
|
In order for a userspace application to save the maximum capacity
in persistant storage, this driver needs to expose this parameter
in sysfs. This patch enables that functionality
ST-Ericsson Linux Next: -
ST-Ericsson ID: ER334609
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I9dd5e9c1faeb6d41da051417999ebdf53a2eaa72
Signed-off-by: Johan Palsson <johan.palsson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/24951
Reviewed-by: QATEST
Tested-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
|
|
The pointer to the charger from the ab8500 struct is no longer
needed.
ST-Ericsson ID: 256401
ST-Ericsson FOSS-OUT ID: Trivial
ST-Ericsson Linux next: NA
Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Change-Id: Iec4d4fb69c54366f96283ab1e676a874637550f0
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/24710
Reviewed-by: Johan PALSSON <johan.palsson@stericsson.com>
Reviewed-by: QATOOLS
Reviewed-by: QATEST
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
|
|
Debug prove locking warns about inconsistent lock state, this patch fixes that warning
ST-Ericsson Linux next: Not tested
ST-Ericsson ID: ER329423
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I8ebc082ea590f512ad71b197c88a6e6bb80e92bf
Signed-off-by: Kalle Komierowski <kalle.komierowski@gmail.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23366
Reviewed-by: QATEST
Tested-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
|
|
This patch makes it possible to remove the maintenance A and B
charging states and replaces them with a state that restarts the
charging when the battery voltage level dropped below a certain
level. The maintenance charging can now be turned of by setting
a flag in the board configuration.
ST-Ericsson Linux Next: -
ST-Ericsson ID: CR333019
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ie5e8ab20a3b57a1028d544371b10ffbb1fd77660
Signed-off-by: Kalle Komierowski <kalle.komierowski@gmail.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/19916
Reviewed-by: Johan GARDSMARK <johan.gardsmark@stericsson.com>
Reviewed-by: Johan PALSSON <johan.palsson@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Tested-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com>
|
|
Due to a bug in AB8500, BTEMP_HIGH/LOW interrupts
will be triggered everytime we enable the VDD ADC supply.
This will turn off charging for a short while.
It will be avoided by having the regulator on when
there is a charger connected.
ST-Ericsson Linux next: -
ST-Ericsson ID: ER329557
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I2a084945430f1e0a996526a194d898db13c54a29
Signed-off-by: Johan Palsson <johan.palsson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18610
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Conflicts:
arch/arm/mach-ux500/board-mop500-regulators.c
|
|
The charger current optimization loop has been corrected for
when the VBUS voltage collapses
ST-Ericsson Linux next: -
ST-Ericsson ID: ER328139
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ie997402e3c0b868212ad59fe242f393ba0721007
Signed-off-by: Johan Palsson <johan.palsson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18415
Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
|
|
This calibration is to compensate for the offset in the fuel gauge
ST-Ericsson ID: ER327880
Change-Id: Ibf7e37ea65c4e8da334dcd554da71d442f3cdcb7
Signed-off-by: Kalle Komierowski <kalle.komierowski@gmail.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/17815
Reviewed-by: Johan PALSSON <johan.palsson@stericsson.com>
Tested-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
|
|
When the requested USB charger current is more than the
charger can deliver, the output voltage will drop and AB8500
will detect it as a not-ok charger. In this case we will try
to lower the current and try charging again
ST-Ericsson Linux next: -
ST-Ericsson ID: ER327042
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I620663643d08b214b38a7498d891f30e3e4342ca
Signed-off-by: Johan Palsson <johan.palsson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/17544
Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
|
|
During configuration of the charger, a maximum charger current is set. The requested
charger current will never be more than this.
ST-Ericsson Linux next: -
ST-Ericsson ID: WP324204
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I00e71ec126ff5f13fe1e1581020456d6609c788d
Signed-off-by: Johan Palsson <johan.palsson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/17417
Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
|
|
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.
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
|
|
Signed-off-by: Philippe Langlais <philippe.langlais@stericsson.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>
|
|
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
|
|
Add support for the Maxim/Dallas DS2780 Stand-Alone Fuel Gauge IC.
It was suggested to combine this functionality with the current ds2782
driver. Unfortunately, I'm unable to commit the time to refactoring this
driver to that extent and I don't have a platform with the ds2782 part to
validate that there are no regression issues by adding this functionality.
[akpm@linux-foundation.org: use min_t()]
Signed-off-by: Clifton Barnes <cabarnes@indesign-llc.com>
Tested-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Avoid to get platform_data from parent device. Get it from mfd cell
device instead.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Anton Vorontsov <cbou@mail.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
|
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>
|
|
In 2008 Masashi YOKOTA <yokota@pylone.jp> created the virtual
battery driver found here:
http://downloads.pylone.jp/src/virtual_battery/virtual_battery-0.0.1.tar.bz2
It found use out of tree, but was never merged upstream.
Since then the test_power driver has been merged, which provides
very similar functionality.
This patch extends the test_power driver to be more dynamic
at runtime, by merging portions of the Virtual Battery Driver
by Masashi YOKOTA.
With this patch, I can tweak the values in:
/sys/module/test_power/parameters/* and watch the behavior of
the gnome power managment daemon or other battery UI software.
CC: Anton Vorontsov <cbouatmailru@gmail.com>
CC: Akihiro MAEDA <sola.1980.a@gmail.com>
CC: Masashi YOKOTA <yokota@pylone.jp>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
This patch fix using correct property POWER_SUPPLY_PROP_CYCLE_COUNT
for cycle count instead POWER_SUPPLY_PROP_CHARGE_COUNTER
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
Fast-forwarded to current state of Linus' tree as there are patches to be
applied for files that didn't exist on the old branch.
|
|
S390 is special as it doesn't have IRQ lines, so these errors pop up:
drivers/built-in.o: In function 'max8903_remove':
drivers/power/max8903_charger.c:355: undefined reference to 'free_irq'
drivers/power/max8903_charger.c:357: undefined reference to 'free_irq'
drivers/power/max8903_charger.c:359: undefined reference to 'free_irq'
This commit fixes the issue by making the driver depend on
GENERIC_HARDIRQS feature.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
The ISP1704/1707 chip can be put to full power down
state by asserting the CHIP_SEL line. This patch enables
platform or board specific hooks to put the device into
power down mode in case not needed.
This patch is a preparation for enabling this powering
routine in n900 (rx-51) devices.
Thanks to Heikki Krogerus for helping out with the patch.
Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com>
Acked-By: Heikki Krogerus <heikki.krogerus@nokia.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
Gpio charger should notify if the gpio state had changed
during suspend. This will send a CHANGED event each time
the system resumes, ensuring a plug/unplug of the charger
is not missed.
Signed-off-by: Benson Leung <bleung@chromium.org>
Acked-By: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
MAX8903 is an integrated battery charger and selector with two
power inputs (USB and AC adapter). This driver enables the charger,
handles interrupts, and provides power-supply-class information to
userland.
Tested on Exynos4 NURI / S5PC210 SLP7 boards.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
Scripted with coccinelle.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
* git://git.infradead.org/battery-2.6: (30 commits)
bq20z75: Fix time and temp units
bq20z75: Fix issues with present and suspend
z2_battery: Fix count of properties
s3c_adc_battery: Fix method names when PM not set
z2_battery: Add MODULE_DEVICE_TABLE
ds2782_battery: Add MODULE_DEVICE_TABLE
bq20z75: Add MODULE_DEVICE_TABLE
power_supply: Update power_supply_is_watt_property
bq20z75: Add i2c retry mechanism
bq20z75: Add optional battery detect gpio
twl4030_charger: Make the driver atomic notifier safe
bq27x00: Use single i2c_transfer call for property read
bq27x00: Cleanup bq27x00_i2c_read
bq27x00: Minor cleanups
bq27x00: Give more specific reports on battery status
bq27x00: Add MODULE_DEVICE_TABLE
bq27x00: Add new properties
bq27x00: Poll battery state
bq27x00: Cache battery registers
bq27x00: Add bq27000 support
...
|
|
mfd_get_cell returns a const, so change the jz4740 clients to store
a const mfd cell. This silences type mismatch warnings.
Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
|
No need to explicitly set the cell's platform_data/data_size.
Modify clients to use mfd_get_cell helper function instead of
accessing platform_data directly.
Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
|
Corrected temperature and time to empty/full conversions.
Temperature is in 0.1°C, time is in seconds.
Corrected units in comment. "Convert to µWh."
Signed-off-by: Benson Leung <bleung@chromium.org>
Acked-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
There are a few issues found around the battery not being present. If the
battery isn't present, then a few undesirable things happen. The first was
excessive reporting of failed properties. This was fixed by instead
returning ENODATA for all properties other than PRESENT if the battery
isn't present. That way the callers can identify the difference between a
failure and the battery not being there.
The next issue was in the suspend logic. It was found that if the battery
wasn't present, then it would return a failure, preventing the system from
going into suspend. If there is no battery present, the io is expected to
fail, so in that case, we shouldn't return the failure and just
acknowledge that it was expected.
I also found that when a gpio was used, i didn't maintain the internal
is_present state properly. I added a set of that to fix that.
Lastly, the code to see io's fail and figure out that the battery isn't
present when not using a gpio had a problem. In that code, it looked for
the read to fail and if it did, then handled it. The problem is that in
function to get the property, it first writes a value and that write can
fail, causing the code to never reach the logic after the read. Fix is
to move the logic till after the write.
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
PROP_STATUS property was not counted, as result VOLTAGE_MIN property is
missing in sysfs. Fix it.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
s3c_adc_battery declares wrong method names when CONFIG_PM is not set.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
The device table is required to load modules based on modaliases.
After adding the MODULE_DEVICE_TABLE, below entry will be added to
modules.alias:
alias i2c:aer915 z2_battery
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
The device table is required to load modules based on modaliases.
After adding the MODULE_DEVICE_TABLE, below entries will be added to
modules.alias:
alias i2c:ds2786 ds2782_battery
alias i2c:ds2782 ds2782_battery
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
The device table is required to load modules based on modaliases.
After adding the MODULE_DEVICE_TABLE, below entry will be added to
modules.alias:
alias i2c:bq20z75 bq20z75
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
With the support of platform data, now adding support for option i2c
retries on read/write failures. Ths is specified through the optional
platform data.
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
Adding support for an optional gpio for battery detection. This is
passed in through the i2c platform data. It also accepts another
field, battery_detect_present to signify the gpio state which means
the battery is present, either 0 (low) or 1 (high).
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
|
|
|