summaryrefslogtreecommitdiffstats
path: root/drivers/power
Commit message (Collapse)AuthorAgeFilesLines
* power: Revert "power_supply: Mark twl4030_charger as broken"Samuel Ortiz2010-10-291-1/+0
| | | | | | | | The missing definitions are now in. This reverts commit 23886839a752401aba66517bff8a8b91549279ce. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* power_supply: Mark twl4030_charger as brokenAnton Vorontsov2010-10-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | The driver is not buildable without MFD changes. For now, let's disable the driver as it breaks build for major platforms (i.e. x86). CC [M] drivers/power/twl4030_charger.o drivers/power/twl4030_charger.c: In function 'twl4030_clear_set_boot_bci': drivers/power/twl4030_charger.c:105: error: 'TWL4030_PM_MASTER_BOOT_BCI' undeclared (first use in this function) drivers/power/twl4030_charger.c:105: error: (Each undeclared identifier is reported only once drivers/power/twl4030_charger.c:105: error: for each function it appears in.) drivers/power/twl4030_charger.c: In function 'twl4030_bci_have_vbus': drivers/power/twl4030_charger.c:137: error: 'TWL4030_PM_MASTER_STS_HW_CONDITIONS' undeclared (first use in this function) drivers/power/twl4030_charger.c: In function 'twl4030_bci_probe': drivers/power/twl4030_charger.c:477: warning: overflow in implicit constant conversion drivers/power/twl4030_charger.c:485: warning: overflow in implicit constant conversion make[2]: *** [drivers/power/twl4030_charger.o] Error 1 We can re-enable it if MFD tree will finally merge into 2.6.37. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* Merge git://git.infradead.org/battery-2.6Linus Torvalds2010-10-2613-26/+1473
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/battery-2.6: power_supply: Makefile cleanup bq27x00_battery: Add missing kfree(di->bus) in bq27x00_battery_remove() power_supply: Introduce maximum current property power_supply: Add types for USB chargers ds2782_battery: Fix units power_supply: Add driver for TWL4030/TPS65950 BCI charger bq20z75: Add support for more power supply properties wm831x_power: Add missing kfree(wm831x_power) in wm831x_power_remove() jz4740-battery: Add missing kfree(jz_battery) in jz_battery_remove() ds2760_battery: Add missing kfree(di) in ds2760_battery_remove() olpc_battery: Fix endian neutral breakage for s16 values ds2760_battery: Fix W1 and W1_SLAVE_DS2760 dependency pcf50633-charger: Add missing sysfs_remove_group() power_supply: Add driver for TI BQ20Z75 gas gauge IC wm831x_power: Remove duplicate chg mask omap: rx51: Add support for USB chargers power_supply: Add isp1704 charger detection driver
| * power_supply: Makefile cleanupmatt mooney2010-10-061-12/+4
| | | | | | | | | | | | | | | | | | | | Replace EXTRA_CFLAGS with ccflags-y; remove if-statements and replace with lists using the kbuild idiom. None of the dependencies are modified. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * bq27x00_battery: Add missing kfree(di->bus) in bq27x00_battery_remove()Axel Lin2010-10-061-0/+1
| | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * power_supply: Introduce maximum current propertyHeikki Krogerus2010-10-061-0/+1
| | | | | | | | | | | | | | USB only gives the maximum current allowed to draw. Signed-off-by: Heikki Krogerus <ext-heikki.krogerus@nokia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * power_supply: Add types for USB chargersHeikki Krogerus2010-10-061-1/+2
| | | | | | | | | | | | | | | | This adds power supply types for USB chargers defined in Battery Charging Specification 1.1. Signed-off-by: Heikki Krogerus <ext-heikki.krogerus@nokia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * ds2782_battery: Fix unitsRyan Mallon2010-10-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Correct the unit names in the ds2782 battery driver. Changes voltage_uA to voltage_uV and capacity_uA to capacity. Signed-off-by: Ryan Mallon <ryan@bluewatersys.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Ben Hutchings <ben@decadent.org.uk> Cc: Yulia Vilensky <vilensky@compulab.co.il> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * power_supply: Add driver for TWL4030/TPS65950 BCI chargerGrazvydas Ignotas2010-09-303-0/+572
| | | | | | | | | | | | | | | | | | | | | | | | TWL4030/TPS65950 is a multi-function device with integrated charger, which allows charging from AC or USB. This driver enables the charger and provides several monitoring functions. Tested on OMAP3 Pandora board. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * bq20z75: Add support for more power supply propertiesRhyland Klein2010-09-281-48/+156
| | | | | | | | | | | | | | | | | | This patch adds properties to support devicekit power. Also, create IO wrapper functions and fix some issues found while testing, including unit conversions to match the power_supply types. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * wm831x_power: Add missing kfree(wm831x_power) in wm831x_power_remove()Axel Lin2010-09-281-0/+1
| | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * jz4740-battery: Add missing kfree(jz_battery) in jz_battery_remove()Axel Lin2010-09-281-0/+1
| | | | | | | | | | | | 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>
| * ds2760_battery: Add missing kfree(di) in ds2760_battery_remove()Axel Lin2010-09-281-0/+1
| | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * olpc_battery: Fix endian neutral breakage for s16 valuesRichard A. Smith2010-09-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | When the driver was updated to be endian neutral (8e9c7716c) the signed part of the s16 values was lost. This is because be16_to_cpu() returns an unsigned value. This patch casts the values back to a s16 number prior to the the implicit cast up to an int. Signed-off-by: Richard A. Smith <richard@laptop.org> Signed-off-by: Daniel Drake <dsd@laptop.org> Cc: <stable@kernel.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * ds2760_battery: Fix W1 and W1_SLAVE_DS2760 dependencyMartin Schwidefsky2010-09-231-2/+1
| | | | | | | | | | | | | | | | | | | | Fix this Kconfig warning on allmodconfig for s390: warning: (BATTERY_DS2760 && POWER_SUPPLY) selects W1 which has unmet direct dependencies (HAS_IOMEM) Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * pcf50633-charger: Add missing sysfs_remove_group()Axel Lin2010-09-221-0/+1
| | | | | | | | | | | | | | sysfs entries should be removed when unload the module. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * power_supply: Add driver for TI BQ20Z75 gas gauge ICRhyland Klein2010-09-063-0/+393
| | | | | | | | | | | | | | | | | | | | This driver depends on I2C and uses SMBUS for communication with the host. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * wm831x_power: Remove duplicate chg maskIan Lartey2010-09-011-1/+0
| | | | | | | | | | | | | | Reported-by: Julia Lawall <julia@diku.dk> Signed-off-by: Ian Lartey <ian@opensource.wolfsonmicro.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * power_supply: Add isp1704 charger detection driverHeikki Krogerus2010-08-193-0/+377
| | | | | | | | | | | | | | | | | | NXP ISP1704 is Battery Charging Specification 1.0 compliant USB transceiver. This adds a power supply driver for ISP1704 and ISP1707 USB transceivers. Signed-off-by: Heikki Krogerus <ext-heikki.krogerus@nokia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* | apm_power: Add missing break statementAnton Vorontsov2010-09-081-0/+1
| | | | | | | | | | | | | | | | | | The missing break statement causes wrong capacity calculation for batteries that report energy. Reported-by: d binderman <dcb314@hotmail.com> Cc: <stable@kernel.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* | intel_pmic_battery: Fix battery charging status on mrstShuduo Sang2010-08-241-3/+3
|/ | | | | | | | | The arguments got swapped on some functions which produces undefined results. The main one got fixed before submit but the other two were missed. Signed-off-by: Shuduo Sang <shuduo.sang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* 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
OpenPOWER on IntegriCloud