aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
Commit message (Collapse)AuthorAge
* s3c-adc-battery: Fix compilation error due to missing header (module.h)Vasily Khoruzhick2011-08-19
| | | | | | | | | | | | | | | | | | | | | | 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 1 Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Ian Lartey <ian@opensource.wolfsonmicro.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* max8997_charger: Needs module.hAxel Lin2011-08-19
| | | | | | | | | 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 <axel.lin@gmail.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* max8998_charger: Needs module.hRandy Dunlap2011-08-19
| | | | | | | | 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 <rdunlap@xenotime.net> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* Merge git://git.infradead.org/battery-2.6Linus Torvalds2011-07-31
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * gpio-charger: Fix checking return value of request_any_context_irqAxel Lin2011-07-08
| | | | | | | | | | | | | | | | | | 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 <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * power_supply: MAX17042: Support additional propertiesDonggeun Kim2011-07-08
| | | | | | | | | | | | | | | | | | | | | | | | 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 <dg77.kim@samsung.com> 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>
| * max8903_charger: Allow platform data to be __initdataMyungJoo Ham2011-07-08
| | | | | | | | | | | | | | | | | | | | | | 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 <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * power_supply: Add charger driver for MAX8998/LP3974Donggeun Kim2011-07-08
| | | | | | | | | | | | | | | | | | | | This patch supports power supply APIs for MAX8998/LP3974. Signed-off-by: Donggeun Kim <dg77.kim@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: KyungMin Park <kyungmin.park@samsung.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * power_supply: Add charger driver for MAX8997/8966Donggeun Kim2011-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dg77.kim@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: KyungMin Park <kyungmin.park@samsung.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * max17042_battery: Remove obsolete cleanup for clientdataWolfram Sang2011-07-08
| | | | | | | | | | | | | | | | | | | | | | | | 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 <w.sang@pengutronix.de> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * twl4030_charger: Fix warningsGrazvydas Ignotas2011-07-08
| | | | | | | | | | | | | | | | | | | | | | | | 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 conversion While at it, also fix module_param permissions and a typo in my name. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * wm831x_power: Support multiple instancesMark Brown2011-07-08
| | | | | | | | | | | | | | | | | | 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 <broonie@opensource.wolfsonmicro.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * wm831x_backup: Support multiple instancesMark Brown2011-07-08
| | | | | | | | | | | | | | | | | | 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 <broonie@opensource.wolfsonmicro.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * apm_power: Fix style error in macrosKen O'Brien2011-07-08
| | | | | | | | | | | | | | | | Two macros in the changed file contained complex expressions which were not enclosed by parentheses. Signed-off-by: Ken O'Brien <kernel@kenobrien.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * s3c_adc_battery: Fix annotation for s3c_adc_battery_probe()Mark Brown2011-07-08
| | | | | | | | | | | | | | | | | | A probe() function is used at device init time rather than system init time. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * bq20z75: Enable detection after registeringRhyland Klein2011-07-08
| | | | | | | | | | | | | | | | Need to enable detection, which is also blocking the unit conversion logic after registering the power_supply. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * bq20z75: Add support for external notificationRhyland Klein2011-07-08
| | | | | | | | | | | | | | | | | | | | | | | | 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 <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* | Change Ryan Mallon's email address across the kernelRyan Mallon2011-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <rmallon@gmail.com> Cc: Andre Renaud <andre@bluewatersys.com> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Andrew Victor <avictor.za@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Anton Vorontsov <cbou@mail.ru> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Liam Girdwood <lrg@ti.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Joe Perches <joe@perches.com> Cc: Jesper Juhl <jj@chaosbits.net> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: trivial@kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge git://git.infradead.org/battery-2.6Linus Torvalds2011-05-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * PXA: Use dev_pm_ops in z2_batteryMarek Vasut2011-05-20
| | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * ds2760_battery: Fix rated capacity of the hx4700 1800mAh batteryPaul Parsons2011-05-20
| | | | | | | | | | | | | | 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>
| * ds2760_battery: Fix indexing of the 4 active full EEPROM registersPaul Parsons2011-05-20
| | | | | | | | | | | | | | 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>
| * power: Make test_power driver more dynamic.John Stultz2011-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * bq27x00_battery: Name of cycle count propertyPali Rohár2011-05-20
| | | | | | | | | | | | | | | | | | 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>
| * max8903_charger: Add GENERIC_HARDIRQS as a dependency (fixes S390 build)Anton Vorontsov2011-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * isp1704_charger: Allow board specific powering routineKalle Jokiniemi2011-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Add gpio_charger_resumeBenson Leung2011-04-20
| | | | | | | | | | | | | | | | | | | | | | 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>
| * power_supply: Add driver for MAX8903 chargerMyungJoo Ham2011-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | w1: add Maxim/Dallas DS2780 Stand-Alone Fuel Gauge IC supportClifton Barnes2011-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | power_supply: Use max8925 platform_data from cellHaojian Zhuang2011-05-26
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'master' into for-nextJiri Kosina2011-04-26
|\| | | | | | | | | 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.
| * drivers: Final irq namespace conversionThomas Gleixner2011-03-29
| | | | | | | | | | | | Scripted with coccinelle. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * Merge git://git.infradead.org/battery-2.6Linus Torvalds2011-03-26
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 ...
| | * bq20z75: Fix time and temp unitsBenson Leung2011-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * bq20z75: Fix issues with present and suspendRhyland Klein2011-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * z2_battery: Fix count of propertiesVasily Khoruzhick2011-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Fix method names when PM not setHeiko Stuebner2011-03-16
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * z2_battery: Add MODULE_DEVICE_TABLEAxel Lin2011-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * ds2782_battery: Add MODULE_DEVICE_TABLEAxel Lin2011-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * bq20z75: Add MODULE_DEVICE_TABLEAxel Lin2011-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * bq20z75: Add i2c retry mechanismRhyland Klein2011-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * bq20z75: Add optional battery detect gpioRhyland Klein2011-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Merge branch 'bq27x00-for-upstream' of git://git.metafoo.de/linux-2.6Anton Vorontsov2011-02-28
| | |\
| | | * bq27x00: Use single i2c_transfer call for property readGrazvydas Ignotas2011-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing this by using 2 calls sometimes results in unexpected values being returned on OMAP3 i2c controller. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
| | | * bq27x00: Cleanup bq27x00_i2c_readLars-Peter Clausen2011-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some minor stylistic cleanups. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Grazvydas Ignotas <notasas@gmail.com>
| | | * bq27x00: Minor cleanupsPali Rohár2011-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Consistently use uppercase for hexadecimal values. * Clarify/fix the unit of functions return value in its comment. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Grazvydas Ignotas <notasas@gmail.com>
| | | * bq27x00: Give more specific reports on battery statusLars-Peter Clausen2011-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code only reports whether the battery is charging or discharging. But the battery also reports whether it is fully charged, furthermore by look at if the battery is supplied we can tell whether it is discharging or not charging. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Rodolfo Giometti <giometti@linux.it> Tested-by: Grazvydas Ignotas <notasas@gmail.com>
| | | * bq27x00: Add MODULE_DEVICE_TABLEPali Rohár2011-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds MODULE_DEVICE_TABLE for module bq27x00_battery. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Tested-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Rodolfo Giometti <giometti@linux.it> Tested-by: Grazvydas Ignotas <notasas@gmail.com>
| | | * bq27x00: Add new propertiesPali Rohár2011-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add support for reporting properties POWER_SUPPLY_PROP_CHARGE_NOW, POWER_SUPPLY_PROP_CHARGE_FULL, POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, POWER_SUPPLY_PROP_CHARGE_COUNTER, POWER_SUPPLY_PROP_ENERGY_NOW in module bq27x00_battery. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Grazvydas Ignotas <notasas@gmail.com>
| | | * bq27x00: Poll battery stateLars-Peter Clausen2011-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for polling the battery state and generating a power_supply_changed() event if it has changed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Grazvydas Ignotas <notasas@gmail.com>