aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
Commit message (Collapse)AuthorAgeFilesLines
...
| | * power_supply: Add new LED trigger charging-blink-solid-fullVasily Khoruzhick2011-01-311-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add new trigger to power_supply LEDs. It will blink when battery is charging, and stay solid when battery is charged. It's usefull to indicate battery state when there's only one LED available. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| | * bq20z75: Add support for charge propertiesRhyland Klein2011-01-311-11/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding support for charge properties for gas gauge. Also ensuring that battery mode is correct now for energy as well as charge properties by setting it on the fly. I also added 2 functions to power_supply.h to help identify the units for specific properties more easily by power supplies. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * | jz4740: silence warnings related to mfd_get_cell changesAndres Salomon2011-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | mfd_get_cell returns a const, so change the jz4740 clients to store a const mfd cell. This silences type mismatch warnings. Signed-off-by: Andres Salomon <dilinger@queued.net> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | mfd: mfd_cell is now implicitly available to jz4740 driversAndres Salomon2011-03-231-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | No need to explicitly set the cell's platform_data/data_size. Modify clients to use mfd_get_cell helper function instead of accessing platform_data directly. Signed-off-by: Andres Salomon <dilinger@queued.net> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | treewide: remove extra semicolonsJustin P. Mattock2011-04-101-1/+1
|/ | | | | Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge git://git.infradead.org/battery-2.6Linus Torvalds2011-01-1415-69/+766
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/battery-2.6: (21 commits) power_supply: Add MAX17042 Fuel Gauge Driver olpc_battery: Fix up XO-1.5 properties list olpc_battery: Add support for CURRENT_NOW and VOLTAGE_NOW olpc_battery: Add support for CHARGE_NOW olpc_battery: Add support for CHARGE_FULL_DESIGN olpc_battery: Ambient temperature is not available on XO-1.5 jz4740-battery: Should include linux/io.h s3c_adc_battery: Add gpio_inverted field to pdata power_supply: Don't use flush_scheduled_work() power_supply: Fix use after free and memory leak gpio-charger: Fix potential race between irq handler and probe/remove gpio-charger: Provide default name for the power_supply gpio-charger: Check result of kzalloc jz4740-battery: Check if platform_data is supplied isp1704_charger: Detect charger after probe isp1704_charger: Set isp->dev before anything needs it isp1704_charger: Detect HUB/Host chargers isp1704_charger: Correct length for storing model power_supply: Add gpio charger driver jz4740-battery: Protect against concurrent battery readings ...
| * power_supply: Add MAX17042 Fuel Gauge DriverMyungJoo Ham2011-01-143-0/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MAX17042 is a fuel gauge with an I2C interface for lithium-ion betteries. Unlike its predecessor MAX17040, MAX17042 uses 16bit registers. Besides, MAX17042 has much more features than MAX17040; e.g., a thermistor, current and current accumulation measurement, battery internal resistance estimate, average values of measurement, and others. This patch implements a driver for MAX17042. In this initial release, we have implemented the most basic features of a fuel gauge: measure the battery capacity and voltage. 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>
| * olpc_battery: Fix up XO-1.5 properties listSascha Silbe2011-01-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | The patches adding support for CURRENT_NOW, VOLTAGE_NOW, CHARGE_NOW and CHARGE_FULL_DESIGN were based on a tree not including c566d299 ("olpc_battery: Ambient temperature is not available on XO-1.5") and therefore only modified the then-common, now-XO-1 properties list. This patch adds the new properties to XO-1.5 as well. Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * olpc_battery: Add support for CURRENT_NOW and VOLTAGE_NOWSascha Silbe2011-01-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | {CURRENT,VOLTAGE}_AVG are actually {CURRENT,VOLTAGE}_NOW (the EC code directly passes through the value from the gas gauge instead of the internally used average). We retain {CURRENT,VOLTAGE}_AVG as an alias for compatibility reasons, it will be removed later. Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org> [ pgf@laptop.org: added VOLTAGE_NOW, aliased to VOLTAGE_AVG ] Signed-off-by: Paul Fox <pgf@laptop.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * olpc_battery: Add support for CHARGE_NOWSascha Silbe2011-01-121-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | CHARGE_NOW is needed by some user space software (read: UPower) for internal calculations. This patch violates the power supply class definition (as we already do for CAPACITY though it isn't as obvious there), but this is the best we can do without adding rather sophisticated algorithms to either the EC or UPower. Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org> Signed-off-by: Paul Fox <pgf@laptop.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * olpc_battery: Add support for CHARGE_FULL_DESIGNSascha Silbe2011-01-121-0/+54
| | | | | | | | | | | | | | | | | | | | Some user space software (read: UPower) uses CHARGE_FULL_DESIGN for internal calculations. The design capacity of the OLPC batteries is effectively fixed and only needs to be exported. Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org> Signed-off-by: Paul Fox <pgf@laptop.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * olpc_battery: Ambient temperature is not available on XO-1.5Daniel Drake2011-01-121-3/+25
| | | | | | | | | | | | | | | | | | | | The XO-1.5 does not support the ambient temperature property. Create a separate list of properties for that configuration where ambient temperature is not included, and apply the correct property list at runtime. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * jz4740-battery: Should include linux/io.hAnton Vorontsov2010-12-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During test-build (with disabled 'depends on') I found that jz4740-battery driver lacks linux/io.h, which makes build break like this (on x86): CC [M] drivers/power/isp1704_charger.o jz4740-battery.c: In function 'jz_battery_read_voltage': jz4740-battery.c:84: error: implicit declaration of function 'readw’ jz4740-battery.c: In function 'jz_battery_probe': jz4740-battery.c:284: error: implicit declaration of function 'ioremap_nocache’ jz4740-battery.c:285: warning: assignment makes pointer from integer without a cast jz4740-battery.c:372: error: implicit declaration of function 'iounmap' make[2]: *** [drivers/power/jz4740-battery.o] Error 1 This patch fixes the issues, and thus makes it easier to build-test the driver for me. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * s3c_adc_battery: Add gpio_inverted field to pdataVasily Khoruzhick2010-12-221-3/+9
| | | | | | | | | | | | | | | | Add support for inverted gpio_charge_finished values. This change is necessary for H1940 support. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * power_supply: Don't use flush_scheduled_work()Tejun Heo2010-12-226-20/+20
| | | | | | | | | | | | | | | | | | | | | | flush_scheduled_work() is deprecated and scheduled to be removed. In battery drivers, the work can be canceled on probe failure and removal and should be flushed on suspend. Replace flush_scheduled_work() usages with direct cancels and flushes. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * power_supply: Fix use after free and memory leakVasiliy Kulikov2010-12-221-2/+2
| | | | | | | | | | | | | | | | | | device_unregister() might free its argument. This leads to freed memory use in kfree(). Also use put_device() instead of kfree() as dev may be already used in another layer after call to device_add(). Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * gpio-charger: Fix potential race between irq handler and probe/removeLars-Peter Clausen2010-12-221-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a potential race between the irq handler and the probe and remove functions. The irq should not be requested before the chargers power_supply has been registered and has to be freed before the power_supply is unregistered, otherwise it is possible that the irq fires while the power_supply is not initialized yet or has already been freed. While we are at it replace request_irq with request_any_context_irq. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * gpio-charger: Provide default name for the power_supplyLars-Peter Clausen2010-12-221-1/+1
| | | | | | | | | | | | | | | | This patch sets a default name for the power_supply in case there was no name supplied through the platform_data. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * gpio-charger: Check result of kzallocLars-Peter Clausen2010-12-221-0/+4
| | | | | | | | | | | | | | | | | | Since kzalloc can return NULL we have to check its result. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * jz4740-battery: Check if platform_data is suppliedLars-Peter Clausen2010-11-181-0/+5
| | | | | | | | | | | | | | | | | | | | Currently platform_data is dereferenced without checking whether it is actually set, which can lead to kernel crashes. This patch adds a check which will abort the drivers probe function gracefully if no platform_data is supplied. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * isp1704_charger: Detect charger after probeHeikki Krogerus2010-11-181-0/+17
| | | | | | | | | | | | | | | | | | | | | | If the device is booted up with cable connected, or the module is loaded after plugging in the cable, the notification has come and gone, so not relying on it at probe time. Instead this checks the VBUS level manually after probe. Signed-off-by: Heikki Krogerus <heikki.krogerus@nokia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * isp1704_charger: Set isp->dev before anything needs itHeikki Krogerus2010-11-181-3/+3
| | | | | | | | | | | | | | | | isp1704_test_ulpi() is the first place that needs isp->dev member, so it must be set before calling the function. Signed-off-by: Heikki Krogerus <heikki.krogerus@nokia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * isp1704_charger: Detect HUB/Host chargersHeikki Krogerus2010-11-181-38/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid breaking high speed chirp handshaking with CDP chargers, no more then 500mA should be drawn. To make sure of this, utilizing current_max property. After the device has enumerated, it's safe to draw the maximum 1800mA as defined in the Battery Charging Specification. This can be also used with normal USB connection if the controller sends ENUMERATED notification with the milliamps as data. From now on the online property indicates VBUS, present property if there is a charger and current_max the milliamps possible to draw from VBUS. Signed-off-by: Heikki Krogerus <heikki.krogerus@nokia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * isp1704_charger: Correct length for storing modelAmeya Palande2010-11-181-1/+1
| | | | | | | | | | | | | | | | | | Model should have room to accommodate the trailing null byte, "isp170[4|7]\0". Signed-off-by: Ameya Palande <ameya.palande@nokia.com> Acked-by: Heikki Krogerus <heikki.krogerus@nokia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * power_supply: Add gpio charger driverLars-Peter Clausen2010-11-183-0/+196
| | | | | | | | | | | | | | | | This patch adds a simple driver for chargers indicating their online status through a GPIO pin. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * jz4740-battery: Protect against concurrent battery readingsLars-Peter Clausen2010-11-181-0/+7
| | | | | | | | | | | | | | | | | | We can not handle more then one ADC request at a time to the battery. The patch adds a mutex around the ADC read code to ensure this. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: stable@kernel.org Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
| * ds2760_battery: Fix calculation of time_to_empty_nowSven Neumann2010-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A check against division by zero was modified in commit b0525b48. Since this change time_to_empty_now is always reported as zero while the battery is discharging and as a negative value while the battery is charging. This is because current is negative while the battery is discharging. Fix the check introduced by commit b0525b48 so that time_to_empty_now is reported correctly during discharge and as zero while charging. Signed-off-by: Sven Neumann <s.neumann@raumfeld.com> Acked-by: Daniel Mack <daniel@caiaq.de> Cc: stable@kernel.org [2.6.32..2.6.36] Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* | Merge branch 'for-next' of ↵Linus Torvalds2011-01-131-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) Documentation/trace/events.txt: Remove obsolete sched_signal_send. writeback: fix global_dirty_limits comment runtime -> real-time ppc: fix comment typo singal -> signal drivers: fix comment typo diable -> disable. m68k: fix comment typo diable -> disable. wireless: comment typo fix diable -> disable. media: comment typo fix diable -> disable. remove doc for obsolete dynamic-printk kernel-parameter remove extraneous 'is' from Documentation/iostats.txt Fix spelling milisec -> ms in snd_ps3 module parameter description Fix spelling mistakes in comments Revert conflicting V4L changes i7core_edac: fix typos in comments mm/rmap.c: fix comment sound, ca0106: Fix assignment to 'channel'. hrtimer: fix a typo in comment init/Kconfig: fix typo anon_inodes: fix wrong function name in comment fix comment typos concerning "consistent" poll: fix a typo in comment ... Fix up trivial conflicts in: - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c) - fs/ext4/ext4.h Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
| * | tree-wide: fix comment/printk typosUwe Kleine-König2010-11-011-2/+2
| |/ | | | | | | | | | | | | | | | | | | "gadget", "through", "command", "maintain", "maintain", "controller", "address", "between", "initiali[zs]e", "instead", "function", "select", "already", "equal", "access", "management", "hierarchy", "registration", "interest", "relative", "memory", "offset", "already", Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | workqueue: convert cancel_rearming_delayed_work[queue]() users to ↵Tejun Heo2010-12-152-8/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cancel_delayed_work_sync() cancel_rearming_delayed_work[queue]() has been superceded by cancel_delayed_work_sync() quite some time ago. Convert all the in-kernel users. The conversions are completely equivalent and trivial. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: "David S. Miller" <davem@davemloft.net> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: netdev@vger.kernel.org Cc: Anton Vorontsov <cbou@mail.ru> Cc: David Woodhouse <dwmw2@infradead.org> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Neil Brown <neilb@suse.de> Cc: Alex Elder <aelder@sgi.com> Cc: xfs-masters@oss.sgi.com Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: netfilter-devel@vger.kernel.org Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: linux-nfs@vger.kernel.org
* 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>