20 Aug, 2011
3 commits
-
Add linux/module.h to fix this compilation error:
drivers/power/s3c_adc_battery.c:435:15: error: expected declaration specifiers or ‘...’ before string constant
drivers/power/s3c_adc_battery.c:435:1: warning: data definition has no type or storage class
drivers/power/s3c_adc_battery.c:435:1: warning: type defaults to ‘int’ in declaration of ‘MODULE_AUTHOR’
drivers/power/s3c_adc_battery.c:435:15: warning: function declaration isn’t a prototype
drivers/power/s3c_adc_battery.c:436:20: error: expected declaration specifiers or ‘...’ before string constant
drivers/power/s3c_adc_battery.c:436:1: warning: data definition has no type or storage class
drivers/power/s3c_adc_battery.c:436:1: warning: type defaults to ‘int’ in declaration of ‘MODULE_DESCRIPTION’
drivers/power/s3c_adc_battery.c:436:20: warning: function declaration isn’t a prototype
drivers/power/s3c_adc_battery.c:437:16: error: expected declaration specifiers or ‘...’ before string constant
drivers/power/s3c_adc_battery.c:437:1: warning: data definition has no type or storage class
drivers/power/s3c_adc_battery.c:437:1: warning: type defaults to ‘int’ in declaration of ‘MODULE_LICENSE’
drivers/power/s3c_adc_battery.c:437:16: warning: function declaration isn’t a prototype
make[2]: *** [drivers/power/s3c_adc_battery.o] Error 1Signed-off-by: Vasily Khoruzhick
Signed-off-by: Ian Lartey
Signed-off-by: Anton Vorontsov -
power/max8997_charger.c uses interfaces from linux/module.h,
so it should include that file. This fixes build errors.Signed-off-by: Axel Lin
Acked-by: MyungJoo Ham
Signed-off-by: Anton Vorontsov -
power/max8998_charger.c uses interfaces from linux/module.h,
so it should include that file. This fixes build errors.Signed-off-by: Randy Dunlap
Signed-off-by: Anton Vorontsov
01 Aug, 2011
1 commit
-
* git://git.infradead.org/battery-2.6:
gpio-charger: Fix checking return value of request_any_context_irq
power_supply: MAX17042: Support additional properties
max8903_charger: Allow platform data to be __initdata
power_supply: Add charger driver for MAX8998/LP3974
power_supply: Add charger driver for MAX8997/8966
max17042_battery: Remove obsolete cleanup for clientdata
twl4030_charger: Fix warnings
wm831x_power: Support multiple instances
wm831x_backup: Support multiple instances
apm_power: Fix style error in macros
s3c_adc_battery: Fix annotation for s3c_adc_battery_probe()
bq20z75: Enable detection after registering
bq20z75: Add support for external notification
08 Jul, 2011
13 commits
-
request_any_context_irq() returns a negative value on failure.
On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED.Signed-off-by: Axel Lin
Acked-by: Lars-Peter Clausen
Signed-off-by: Anton Vorontsov -
This patch supports additional properties (PRESENT, CYCLE_COUNT,
VOLTAGE_MAX, VOLTAGE_MIN_DESIGN, CURRENT_NOW, CURRENT_AVG,
CHARGE_FULL, and TEMP).
Plus, initialization code for registers is added.Signed-off-by: Donggeun Kim
Signed-off-by: MyungJoo Ham
Signed-off-by: KyungMin Park
Signed-off-by: Anton Vorontsov -
Platform files may have declared 8903 platform data as __initdata. This
patch removes the dependency on pdata pointer so that using __initdata
on pdata will not incur errors. Note that such error does not incur
SECTION MISMATCH warning in (at least some) compilers.Signed-off-by: MyungJoo Ham
Signed-off-by: Kyungmin Park
Signed-off-by: Anton Vorontsov -
This patch supports power supply APIs for MAX8998/LP3974.
Signed-off-by: Donggeun Kim
Signed-off-by: MyungJoo Ham
Signed-off-by: KyungMin Park
Acked-by: Samuel Ortiz
Signed-off-by: Anton Vorontsov -
MAX8997/8966 chip is a multi-function device which includes
PMIC, RTC, Fuel Gauge, MUIC, Haptic, Flash control, and
Battery charging control.
The driver for it is located at drivers/mfd.This patch supports battery charging control of MAX8997/8966 chip and
provides power supply class information to userspace.Signed-off-by: Donggeun Kim
Signed-off-by: MyungJoo Ham
Signed-off-by: KyungMin Park
Acked-by: Samuel Ortiz
Signed-off-by: Anton Vorontsov -
A few new i2c-drivers came into the kernel which clear the
clientdata-pointer on exit or error. This is obsolete meanwhile,
the core will do it.Signed-off-by: Wolfram Sang
Cc: MyungJoo Ham
Cc: Kyungmin Park
Acked-by: Jean Delvare
Signed-off-by: Anton Vorontsov -
Fix warnings emitted by some versions of gcc:
drivers/power/twl4030_charger.c:490: warning: overflow in implicit constant conversion
drivers/power/twl4030_charger.c:498: warning: overflow in implicit constant conversionWhile at it, also fix module_param permissions and a typo in my name.
Signed-off-by: Grazvydas Ignotas
Signed-off-by: Jean Delvare
Signed-off-by: Anton Vorontsov -
If there are multiple wm831x devices in the system we need to assign
different names to the power supply devices in order to ensure we can
create the sysfs entries for them.Signed-off-by: Mark Brown
Signed-off-by: Anton Vorontsov -
If there are multiple wm831x devices in the system we need to assign
different names to the power supply devices in order to ensure we can
create the sysfs entries for them.Signed-off-by: Mark Brown
Signed-off-by: Anton Vorontsov -
Two macros in the changed file contained complex expressions which
were not enclosed by parentheses.Signed-off-by: Ken O'Brien
Signed-off-by: Anton Vorontsov -
A probe() function is used at device init time rather than system init
time.Signed-off-by: Mark Brown
Acked-by: Vasily Khoruzhick
Signed-off-by: Anton Vorontsov -
Need to enable detection, which is also blocking the unit conversion logic
after registering the power_supply.Signed-off-by: Rhyland Klein
Signed-off-by: Anton Vorontsov -
Adding support for external power change notification. One problem found
is that there is a lag time before the sensor will return a new status.
To ensure that we only fire off the power_supply_changed event when the
status returned from the sensor is actually different, we delay sending
the the notification, and instead poll on it looking for a change. The
amount of time to poll is configurable via platform data.Signed-off-by: Rhyland Klein
Signed-off-by: Anton Vorontsov
16 Jun, 2011
1 commit
-
I no longer work at Bluewater Systems. Update my email address accordingly. I
have deleted my email address from C files rather than change it. This
was suggested by several people, since the commit from my new email
address will cause scripts/get_maintainer.pl to function properly. I
have not added the .mailmap entry as suggested by Joe because I think
it is no longer necessary if I touch all the files which had my name
in them.Signed-off-by: Ryan Mallon
Cc: Andre Renaud
Cc: H Hartley Sweeten
Cc: Russell King
Cc: Nicolas Ferre
Cc: Andrew Victor
Cc: David Woodhouse
Cc: Anton Vorontsov
Cc: Paul Mundt
Cc: Liam Girdwood
Cc: Mark Brown
Cc: Alan Cox
Cc: Joe Perches
Cc: Jesper Juhl
Cc: Andrew Morton
Cc: trivial@kernel.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Jesper Juhl
Signed-off-by: Jiri Kosina
28 May, 2011
1 commit
-
* 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
27 May, 2011
2 commits
-
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
Tested-by: Haojian Zhuang
Cc: Evgeniy Polyakov
Cc: Ryan Mallon
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Avoid to get platform_data from parent device. Get it from mfd cell
device instead.Signed-off-by: Haojian Zhuang
Acked-by: Anton Vorontsov
Cc: David Woodhouse
Signed-off-by: Samuel Ortiz
20 May, 2011
5 commits
-
Signed-off-by: Marek Vasut
Signed-off-by: Anton Vorontsov -
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
Signed-off-by: Anton Vorontsov -
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
Signed-off-by: Anton Vorontsov -
In 2008 Masashi YOKOTA created the virtual
battery driver found here:
http://downloads.pylone.jp/src/virtual_battery/virtual_battery-0.0.1.tar.bz2It 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
CC: Akihiro MAEDA
CC: Masashi YOKOTA
Signed-off-by: John Stultz
Signed-off-by: Anton Vorontsov -
This patch fix using correct property POWER_SUPPLY_PROP_CYCLE_COUNT
for cycle count instead POWER_SUPPLY_PROP_CHARGE_COUNTERSigned-off-by: Pali Rohár
Tested-by: Pali Rohár
Signed-off-by: Anton Vorontsov
26 Apr, 2011
1 commit
-
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.
22 Apr, 2011
1 commit
-
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
Signed-off-by: Anton Vorontsov
20 Apr, 2011
3 commits
-
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
Acked-By: Heikki Krogerus
Signed-off-by: Anton Vorontsov -
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
Acked-By: Lars-Peter Clausen
Signed-off-by: Anton Vorontsov -
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
Signed-off-by: Kyungmin Park
Signed-off-by: Anton Vorontsov
10 Apr, 2011
1 commit
-
Signed-off-by: Justin P. Mattock
Signed-off-by: Jiri Kosina
29 Mar, 2011
1 commit
-
Scripted with coccinelle.
Signed-off-by: Thomas Gleixner
26 Mar, 2011
1 commit
-
* 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
...
23 Mar, 2011
2 commits
-
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
Acked-by: Anton Vorontsov
Signed-off-by: Samuel Ortiz -
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
Acked-by: Jean Delvare
Signed-off-by: Samuel Ortiz
16 Mar, 2011
4 commits
-
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
Acked-by: Rhyland Klein
Signed-off-by: Anton Vorontsov -
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
Signed-off-by: Anton Vorontsov -
PROP_STATUS property was not counted, as result VOLTAGE_MIN property is
missing in sysfs. Fix it.Signed-off-by: Vasily Khoruzhick
Acked-by: Marek Vasut
Signed-off-by: Anton Vorontsov -
s3c_adc_battery declares wrong method names when CONFIG_PM is not set.
Signed-off-by: Heiko Stuebner
Acked-by: Vasily Khoruzhick
Signed-off-by: Anton Vorontsov