- 31 1月, 2011 1 次提交
-
-
由 Rhyland Klein 提交于
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: NRhyland Klein <rklein@nvidia.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 14 1月, 2011 1 次提交
-
-
由 MyungJoo Ham 提交于
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: NMyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 13 1月, 2011 5 次提交
-
-
由 Sascha Silbe 提交于
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: NSascha Silbe <sascha-pgp@silbe.org> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Sascha Silbe 提交于
{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: NSascha Silbe <sascha-pgp@silbe.org> [ pgf@laptop.org: added VOLTAGE_NOW, aliased to VOLTAGE_AVG ] Signed-off-by: NPaul Fox <pgf@laptop.org> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Sascha Silbe 提交于
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: NSascha Silbe <sascha-pgp@silbe.org> Signed-off-by: NPaul Fox <pgf@laptop.org> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Sascha Silbe 提交于
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: NSascha Silbe <sascha-pgp@silbe.org> Signed-off-by: NPaul Fox <pgf@laptop.org> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Daniel Drake 提交于
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: NDaniel Drake <dsd@laptop.org> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 22 12月, 2010 7 次提交
-
-
由 Anton Vorontsov 提交于
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: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Vasily Khoruzhick 提交于
Add support for inverted gpio_charge_finished values. This change is necessary for H1940 support. Signed-off-by: NVasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Tejun Heo 提交于
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: NTejun Heo <tj@kernel.org> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Vasiliy Kulikov 提交于
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: NVasiliy Kulikov <segoon@openwall.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Lars-Peter Clausen 提交于
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: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Lars-Peter Clausen 提交于
This patch sets a default name for the power_supply in case there was no name supplied through the platform_data. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Lars-Peter Clausen 提交于
Since kzalloc can return NULL we have to check its result. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NVasiliy Kulikov <segoon@openwall.com> Signed-off-by: NDan Carpenter <error27@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 15 12月, 2010 1 次提交
-
-
由 Tejun Heo 提交于
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: NTejun Heo <tj@kernel.org> Acked-by: N"David S. Miller" <davem@davemloft.net> Acked-by: NGreg Kroah-Hartman <gregkh@suse.de> Acked-by: NEvgeniy 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
-
- 18 11月, 2010 8 次提交
-
-
由 Lars-Peter Clausen 提交于
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: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Heikki Krogerus 提交于
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: NHeikki Krogerus <heikki.krogerus@nokia.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Heikki Krogerus 提交于
isp1704_test_ulpi() is the first place that needs isp->dev member, so it must be set before calling the function. Signed-off-by: NHeikki Krogerus <heikki.krogerus@nokia.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Heikki Krogerus 提交于
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: NHeikki Krogerus <heikki.krogerus@nokia.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Ameya Palande 提交于
Model should have room to accommodate the trailing null byte, "isp170[4|7]\0". Signed-off-by: NAmeya Palande <ameya.palande@nokia.com> Acked-by: NHeikki Krogerus <heikki.krogerus@nokia.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Lars-Peter Clausen 提交于
This patch adds a simple driver for chargers indicating their online status through a GPIO pin. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Lars-Peter Clausen 提交于
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: NLars-Peter Clausen <lars@metafoo.de> Cc: stable@kernel.org Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Sven Neumann 提交于
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: NSven Neumann <s.neumann@raumfeld.com> Acked-by: NDaniel Mack <daniel@caiaq.de> Cc: stable@kernel.org [2.6.32..2.6.36] Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 02 11月, 2010 1 次提交
-
-
由 Uwe Kleine-König 提交于
"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: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 29 10月, 2010 1 次提交
-
-
由 Samuel Ortiz 提交于
The missing definitions are now in. This reverts commit 23886839. Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
- 28 10月, 2010 1 次提交
-
-
由 Anton Vorontsov 提交于
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: NIngo Molnar <mingo@elte.hu> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 06 10月, 2010 5 次提交
-
-
由 matt mooney 提交于
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: Nmatt mooney <mfm@muteddisk.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Axel Lin 提交于
Signed-off-by: NAxel Lin <axel.lin@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Heikki Krogerus 提交于
USB only gives the maximum current allowed to draw. Signed-off-by: NHeikki Krogerus <ext-heikki.krogerus@nokia.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Heikki Krogerus 提交于
This adds power supply types for USB chargers defined in Battery Charging Specification 1.1. Signed-off-by: NHeikki Krogerus <ext-heikki.krogerus@nokia.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Ryan Mallon 提交于
Correct the unit names in the ds2782 battery driver. Changes voltage_uA to voltage_uV and capacity_uA to capacity. Signed-off-by: NRyan 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: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 30 9月, 2010 1 次提交
-
-
由 Grazvydas Ignotas 提交于
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: NGrazvydas Ignotas <notasas@gmail.com> Acked-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 28 9月, 2010 5 次提交
-
-
由 Rhyland Klein 提交于
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: NRhyland Klein <rklein@nvidia.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Axel Lin 提交于
Signed-off-by: NAxel Lin <axel.lin@gmail.com> Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Axel Lin 提交于
Signed-off-by: NAxel Lin <axel.lin@gmail.com> Acked-By: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Axel Lin 提交于
Signed-off-by: NAxel Lin <axel.lin@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Richard A. Smith 提交于
When the driver was updated to be endian neutral (8e9c7716) 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: NRichard A. Smith <richard@laptop.org> Signed-off-by: NDaniel Drake <dsd@laptop.org> Cc: <stable@kernel.org> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 23 9月, 2010 1 次提交
-
-
由 Martin Schwidefsky 提交于
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: NMartin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 22 9月, 2010 1 次提交
-
-
由 Axel Lin 提交于
sysfs entries should be removed when unload the module. Signed-off-by: NAxel Lin <axel.lin@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 08 9月, 2010 1 次提交
-
-
由 Anton Vorontsov 提交于
The missing break statement causes wrong capacity calculation for batteries that report energy. Reported-by: Nd binderman <dcb314@hotmail.com> Cc: <stable@kernel.org> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-