aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.infradead.org/battery-2.6Linus Torvalds2010-08-125-1/+1246
|\ | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/battery-2.6: intel_mid_battery: Fix battery scaling intel_mid_battery: Fix the argument order to intel_scu_ipc_command olpc_battery: Fix build failure caused by sysfs changes Add s3c-adc-battery driver Intel MID platform battery driver Fix up trivial conflicts (battery drivers added from different branches) in drivers/power/{Kconfig,Makefile}
| * intel_mid_battery: Fix battery scalingAlan Cox2010-08-101-1/+1
| | | | | | | | | | | | | | | | There are 3600 seconds per not 3600 hours per second. Correcting this along with the previous fix gives sensible numbers. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * intel_mid_battery: Fix the argument order to intel_scu_ipc_commandArjan van de Ven2010-08-101-1/+1
| | | | | | | | | | | | | | | | | | The arguments to intel_scu_ipc_command are "command, subcommand" the battery driver got this the wrong way around. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * olpc_battery: Fix build failure caused by sysfs changesDavid Woodhouse2010-08-091-2/+1
| | | | | | | | | | | | | | | | | | | | drivers/power/olpc_battery.c:387: error: unknown field 'owner' specified in initializer drivers/power/olpc_battery.c:387: warning: excess elements in struct initializer drivers/power/olpc_battery.c:387: warning: (near initialization for 'olpc_bat_eeprom.attr') The .owner field has been dropped from the attr struct. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * Add s3c-adc-battery driverVasily Khoruzhick2010-07-233-0/+438
| | | | | | | | | | | | | | | | | | | | s3c-adc-battery is driver for monitoring and charging battery on iPAQ H1930/H1940/RX1950. It depends on s3c-adc driver to get battery voltage and current. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * Intel MID platform battery driverNithish Mahalingam2010-06-173-0/+807
| | | | | | | | | | | | | | | | | | | | | | | | | | The PMIC Battery driver provides battery charging and battery gauge functionality on Intel MID platforms. This provides the basic functions. There are some USB drivers to merge before the selection of charging between the different USB power levels can be enabled. Moved to a platform device by Alek Du. Signed-off-by: Nithish Mahalingam <nithish.mahalingam@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* | Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2010-08-111-16/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (226 commits) ARM: 6323/1: cam60: don't use __init for cam60_spi_{flash_platform_data,partitions} ARM: 6324/1: cam60: move cam60_spi_devices to .init.data ARM: 6322/1: imx/pca100: Fix name of spi platform data ARM: 6321/1: fix syntax error in main Kconfig file ARM: 6297/1: move U300 timer to dynamic clock lookup ARM: 6296/1: clock U300 intcon and timer properly ARM: 6295/1: fix U300 apb_pclk split ARM: 6306/1: fix inverted MMC card detect in U300 ARM: 6299/1: errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID ARM: 6294/1: etm: do a dummy read from OSSRR during initialization ARM: 6292/1: coresight: add ETM management registers ARM: 6288/1: ftrace: document mcount formats ARM: 6287/1: ftrace: clean up mcount assembly indentation ARM: 6286/1: fix Thumb-2 decompressor broken by "Auto calculate ZRELADDR" ARM: 6281/1: video/imxfb.c: allow usage without BACKLIGHT_CLASS_DEVICE ARM: 6280/1: imx: Fix build failure when including <mach/gpio.h> without <linux/spinlock.h> ARM: S5PV210: Fix on missing s3c-sdhci card detection method for hsmmc3 ARM: S5P: Fix on missing S5P_DEV_FIMC in plat-s5p/Kconfig ARM: S5PV210: Override FIMC driver name on Aquila board ARM: S5PC100: enable FIMC on SMDKC100 ... Fix up conflicts in arch/arm/mach-{s5pc100,s5pv210}/cpu.c due to different subsystem 'setname' calls, and trivial port types in include/linux/serial_core.h
| * \ Merge branch 'devel' of ↵Russell King2010-08-061-16/+0
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel-stable Conflicts: arch/arm/mach-pxa/palmt5.c arch/arm/mach-pxa/palmtreo.c
| | * | [ARM] wm97xx_batt: remove now useless header fileMarek Vasut2010-08-051-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
* | | | power: Remove owner field from attribute initialization code in OLPC driverGuenter Roeck2010-08-101-1/+0
|/ / / | | | | | | | | | | | | Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | POWER: Add JZ4740 battery driver.Lars-Peter Clausen2010-08-053-0/+457
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the battery voltage measurement part of the JZ4740 ADC unit. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/1416/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | Merge git://git.infradead.org/users/cbou/battery-2.6.35Linus Torvalds2010-07-271-15/+14
|\ \ \ | | |/ | |/| | | | | | | * git://git.infradead.org/users/cbou/battery-2.6.35: ds2782_battery: Rename get_current to fix build failure / name conflict
| * | ds2782_battery: Rename get_current to fix build failure / name conflictPeter Huewe2010-06-141-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the name of get_current function pointer to get_battery_current to resolve a name conflict with the get_current macro defined in current.h. This conflict resulted in a build-failure[1] for the sh4 arch allyesconfig: drivers/power/ds2782_battery.c:216:48: error: macro "get_current" passed 2 arguments, but takes just This patch fixes the issue. To be consistent the other function pointers (_voltage,_capacity) were renamed too. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Acked-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* | | Merge git://git.infradead.org/users/cbou/battery-2.6.35Linus Torvalds2010-07-201-1/+1
|\ \ \ | |_|/ |/| | | | | | | | * git://git.infradead.org/users/cbou/battery-2.6.35: ds2782_battery: Fix ds2782_get_capacity return value
| * | ds2782_battery: Fix ds2782_get_capacity return valueRyan Mallon2010-06-211-1/+1
| |/ | | | | | | | | | | | | | | The ds2782_get_capacity function should return 0 on success, not the capacity value. Signed-off-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* | [ARM] pxa/z2: fix missing include in battery driverMarek Vasut2010-06-131-9/+3
|/ | | | | | | Remove redundant includes and add slab.h to fix problem with building. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
* i2c: Remove all i2c_set_clientdata(client, NULL) in driversWolfram Sang2010-06-031-2/+0
| | | | | | | | | | | | | | | | | | | | | I2C drivers can use the clientdata-pointer to point to private data. As I2C devices are not really unregistered, but merely detached from their driver, it used to be the drivers obligation to clear this pointer during remove() or a failed probe(). As a couple of drivers forgot to do this, it was agreed that it was cleaner if the i2c-core does this clearance when appropriate, as there is no guarantee for the lifetime of the clientdata-pointer after remove() anyhow. This feature was added to the core with commit e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers. As there is no need anymore to clear the clientdata-pointer, remove all current occurrences in the drivers to simplify the code and prevent confusion. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Richard Purdie <rpurdie@linux.intel.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* Merge git://git.infradead.org/battery-2.6Linus Torvalds2010-05-251-2/+4
|\ | | | | | | | | * git://git.infradead.org/battery-2.6: power_supply: Fix regression for 'type' property
| * power_supply: Fix regression for 'type' propertyDaniel Mack2010-05-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5f487cd34f4337f9bc27ca19da72a39d1b0a0ab4 (power_supply: Use attribute groups) causes a regression the power supply core does not export the 'type' attribute anymore. POWER_SUPPLY_PROP_TYPE is handled by the power supply core without the low-level driver, so power_supply_attr_is_visible() must always return the entry as readable. Reported-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Daniel Mack <daniel@caiaq.de> Tested-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* | Merge git://git.infradead.org/battery-2.6Linus Torvalds2010-05-2413-168/+848
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/battery-2.6: ds2760_battery: Document ABI change ds2760_battery: Make charge_now and charge_full writeable power_supply: Add support for writeable properties power_supply: Use attribute groups power_supply: Add test_power driver tosa_battery: Fix build error due to direct driver_data usage wm97xx_battery: Quieten sparse warning (bat_set_pdata not declared) ds2782_battery: Get rid of magic numbers in driver_data ds2782_battery: Add support for ds2786 battery gas gauge pda_power: Add function callbacks for suspend and resume wm831x_power: Use genirq Driver for Zipit Z2 battery chip ds2782_battery: Fix clientdata on removal
| * ds2760_battery: Make charge_now and charge_full writeableDaniel Mack2010-05-191-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For userspace tools and daemons, it might be necessary to adjust the charge_now and charge_full properties of the ds2760 battery monitor, for example for unavoidable corrections due to aging batteries. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Matt Reimer <mreimer@vpop.net> Cc: Evgeniy Polyakov <zbr@ioremap.net> Cc: Tejun Heo <tj@kernel.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Alexey Starikovskiy <astarikovskiy@suse.de> Cc: Len Brown <len.brown@intel.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * power_supply: Add support for writeable propertiesDaniel Mack2010-05-191-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for writeable power supply properties and exposes them as writeable to sysfs. A power supply implementation must implement two new function calls in order to use that feature: int set_property(struct power_supply *psy, enum power_supply_property psp, const union power_supply_propval *val); int property_is_writeable(struct power_supply *psy, enum power_supply_property psp); Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Alexey Starikovskiy <astarikovskiy@suse.de> Cc: Len Brown <len.brown@intel.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Matt Reimer <mreimer@vpop.net> Cc: Evgeniy Polyakov <zbr@ioremap.net> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * power_supply: Use attribute groupsAnton Vorontsov2010-05-193-96/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a race between power supply device and initial attributes creation, plus makes it possible to implement writable properties. [Daniel Mack - removed superflous return statement and dropped .mode attribute from POWER_SUPPLY_ATTR] Suggested-by: Greg KH <gregkh@suse.de> Suggested-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Tested-by: Daniel Mack <daniel@caiaq.de>
| * power_supply: Add test_power driverAnton Vorontsov2010-05-183-0/+169
| | | | | | | | | | | | Just a handy driver that is used for testing purposes. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * tosa_battery: Fix build error due to direct driver_data usageDmitry Eremin-Solenikov2010-05-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver isn't buildable since 2.6.32 (i.e. commit b4028437 "Driver core: move dev_get/set_drvdata to drivers/base/dd.c"): CC tosa_battery.o tosa_battery.c: In function 'tosa_read_bat': tosa_battery.c:64: error: 'struct device' has no member named 'driver_data' tosa_battery.c: In function 'tosa_read_temp': tosa_battery.c:84: error: 'struct device' has no member named 'driver_data' Nowadays we must not access driver_data directly, use dev_get_drvdata() instead. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * wm97xx_battery: Quieten sparse warning (bat_set_pdata not declared)Anton Vorontsov2010-05-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes following sparse warning: drivers/power/wm97xx_battery.c:311:6: warning: symbol 'wm97xx_bat_set_pdata' was not declared. Should it be static? Note that we can't just include linux/wm97xx_batt.h because the header is deprecated, and so this pops up: In file included from drivers/power/wm97xx_battery.c:22: include/linux/wm97xx_batt.h:6: warning: #warning This file will be removed soon, use wm97xx.h instead! Since wm97xx_bat_set_pdata() is also deprecated (in favour of pdata passed via AC97 bus), just workaround the issue by declaring the function in wm97xx_battery.c. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * ds2782_battery: Get rid of magic numbers in driver_dataAnton Vorontsov2010-05-021-6/+11
| | | | | | | | | | | | | | | | | | Constructions like 'if (id->driver_data == 1)' look quite weird. This patch introduces 'enum ds278x_num_id', which makes things much more understandable, i.e. 'if (id->driver_data == DS2786)'. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Acked-by: Mike Rapoport <mike@compulab.co.il>
| * ds2782_battery: Add support for ds2786 battery gas gaugeYulia Vilensky2010-04-262-50/+138
| | | | | | | | | | | | Signed-off-by: Yulia Vilensky <vilensky@compulab.co.il> Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * Merge branch 'master' of ↵Anton Vorontsov2010-04-2613-0/+13
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * | pda_power: Add function callbacks for suspend and resumeDaniel Mack2010-04-161-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add function prototypes for power management events so they can be handled and used by platform implementations. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Dmitry Baryshkov <dbaryshkov@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * | wm831x_power: Use genirqMark Brown2010-04-061-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since the WM831x core has been converted to use genirq for the interrupt controller there is no longer any need for chip specific wrappers for IRQ operations. Convert to use genirq directly. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * | Driver for Zipit Z2 battery chipMarek Vasut2010-04-063-0/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds driver for Zipit Z2 battery chip called AER915. No details are known about the chip. The chip is available through I2C bus at address 0x55 and it's register 0x02 contains battery voltage. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * | ds2782_battery: Fix clientdata on removalWolfram Sang2010-04-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Probably due to a copy & paste bug, clientdata was set again to the data structure (which is freed immediately afterwards) when it should be NULLed. Just remove the calls as the i2c-core does this automatically now. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Ryan Mallon <ryan@bluewatersys.com> Cc: Hans Verkuil <hverkuil@xs4all.nl> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* | | sysfs: add struct file* to bin_attr callbacksChris Wright2010-05-211-1/+1
| |/ |/| | | | | | | | | | | | | | | This allows bin_attr->read,write,mmap callbacks to check file specific data (such as inode owner) as part of any privilege validation. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-3013-0/+13
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
*---. Merge branches 'battery-2.6.34', 'bugzilla-10805', 'bugzilla-14668', ↵Len Brown2010-03-147-64/+701
|\ \ \ | | | | | | | | | | | | 'bugzilla-531916-power-state', 'ht-warn-2.6.34', 'pnp', 'processor-rename', 'sony-2.6.34', 'suse-bugzilla-531547', 'tz-check', 'video' and 'misc-2.6.34' into release
| | | * power_supply: Enable power supply of max8925Haojian Zhuang2010-03-073-0/+542
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MAX8925 is a PMIC that contains charger component Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| | | * mfd: Update WM8350 drivers for changed interrupt numbersMark Brown2010-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The headphone detect and charger are using the IRQ numbers so need to take account of irq_base with the genirq conversion. I obviously picked the wrong system for initial testing. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| | | * mfd: Add a data argument to the WM8350 IRQ free functionMark Brown2010-03-071-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To better match genirq. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| | | * power_supply: bq27x00: fix voltage and current unitsGrazvydas Ignotas2010-02-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The chip returns voltage and current in mV and mA, but power supply class uses uV and uA, so add missing conversion. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| | | * power_supply: bq27x00: add status and time propertiesGrazvydas Ignotas2010-02-271-2/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BQ27x00 series of chips can report time-to-empty and time-to-full, so let's add corresponding properties. Also report charge status based on status flag register. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| | | * power_supply: bq27x00: add BQ27500 supportGrazvydas Ignotas2010-02-162-30/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BQ27500 is newer fuel gauge chip from TI with slightly changed register layout and some different register semantics. Add new i2c ID for it and handle differences where needed. Also rename bq27200 functions to bq27x00, as they are no longer bq27200 specific. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Rodolfo Giometti <giometti@linux.it> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| | | * power_supply: bq27x00: fix temperature conversionGrazvydas Ignotas2010-02-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The power supply class requires tenths of degree Celsius. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Rodolfo Giometti <giometti@linux.it> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| | | * power_supply: bq27x00: remove unused struct fieldsGrazvydas Ignotas2010-02-161-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are probably leftover from old TI code. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Rodolfo Giometti <giometti@linux.it> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| | | * power_supply: bq27x00: remove double endian swapGrazvydas Ignotas2010-02-161-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bq27x00 registers are little endian, so just read them as such and don't do double endian swap on LE machines. This also gets rid of strange looking shift that was done after reading 8bit register because endian swap in bq27x00_read() was messing it up. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Rodolfo Giometti <giometti@linux.it> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| | | * da9030_battery: fix spelling in commentStefan Weil2010-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platfrom -> platform monotor -> monitor Signed-off-by: Stefan Weil <weil@mail.berlios.de> Cc: Anton Vorontsov <cbouatmailru@gmail.com> Acked-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
| | | * wm97xx_battery: Clean up some warningsMark Brown2010-01-291-2/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | Staticise work_lock (nothing outside the driver has any reason to see it) and specify dev when requesting the charger IRQ (since that's what we pass in when we free it). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
| * | wm97xx_battery: Handle missing platform data gracefullyMark Brown2010-01-291-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | Don't unconditionally dereference the WM97xx core platform data since it may not be present, causing an oops. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
* | | POWER: Add support for cycle_countAlexey Starikovskiy2010-01-151-0/+1
|/ / | | | | | | | | Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | pmu_battery: Fix battery full reportingThomas Champagne2009-12-181-0/+2
|/ | | | | | | | | | | Prior to this patch, pmu_battery was unable to report battery full status. This patch fixes the issue by adding a proper handling code into pmu_bat_get_property(): if we're on AC and the battery isn't charging, then the battery is considered full. Signed-off-by: Thomas Champagne <lafeuil@gmail.com> Acked-By: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>