- 22 2月, 2011 8 次提交
-
-
由 Lars-Peter Clausen 提交于
This patch adds support for the bq27000 battery to the bq27x00 driver. The bq27000 is similar to the bq27200 except that it uses the HDQ bus instead of I2C to communicate with the host system. The driver is implemented as a platform driver. The driver expects to be provided with a read callback function through its platform data. The read function is assumed to do the lowlevel HDQ handling and read out the value of a certain register. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
-
由 Lars-Peter Clausen 提交于
This patch simplifies the drivers data structure and moves code to be shared by the bq27000 and bq27200/bq27500 init functions into a common function. This patch has no functional changes, it only moves code around. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-by: NRodolfo Giometti <giometti@linux.it> Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
-
由 Lars-Peter Clausen 提交于
This patch changes get_property callback of the bq27x00 battery to return -ENODEV for properties other then the PROP_PRESENT if the battery is not present. The power subsystem core expects a driver to behave that way. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-by: NRodolfo Giometti <giometti@linux.it> Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
-
由 Pali Rohár 提交于
According to the bq27000 datasheet the current should be calculated by the following formula: current = AI * 3570 / 20 This patch adjust the drivers code accordingly. Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-by: NRodolfo Giometti <giometti@linux.it> Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
-
由 Lars-Peter Clausen 提交于
This patch improves the precession of the temperature property of the bq27x00 driver. By dividing before multiplying the current code effectively cuts of the last decimal digit. This patch fixes it by multiplying before dividing. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-by: NRodolfo Giometti <giometti@linux.it> Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
-
由 Lars-Peter Clausen 提交于
This patch adds the type property to the bq27x00 battery driver. All bq27x00 are lithium ion batteries. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-by: NRodolfo Giometti <giometti@linux.it> Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
-
由 Lars-Peter Clausen 提交于
Calling device_add causes an inital uevent for that device to be generated. The power_supply uevent function calls the drivers get_property function, which might causes the driver to update its state, which again might causes the driver to call power_supply_changed(). Since the power_supplys changed_work has not been initialized at this point the behavior is undefined and can result in an OOPS. This patch fixes the issue by initializing the power_supplys changed_work prior to adding the power_supplys device to the device tree. Reported-by: NGrazvydas Ignotas <notasas@gmail.com> Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
-
由 Lars-Peter Clausen 提交于
Sometimes a driver can not report a meaningful value for a certain property and returns -ENODATA. Currently when generating a uevent and a property return -ENODATA it is treated as an error an no uevent is generated at all. This is not an desirable behavior. This patch adds a special case for -ENODATA and ignores properties which return this error code when generating the uevent. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
-
- 31 1月, 2011 2 次提交
-
-
由 Vasily Khoruzhick 提交于
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: NVasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 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>
-