- 01 3月, 2015 1 次提交
-
-
由 Alexandre Belloni 提交于
Add support for bq27510 to the bq27x00 driver. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 26 2月, 2015 2 次提交
-
-
由 Pavel Machek 提交于
Cleanup comments for bq2415x_charger, bq27x00_battery.c. Signed-off-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 NeilBrown 提交于
power_supply status changes for the bq27x00 are only noticed via polling, not via interrupts. So they are never the source of events which should reliably wake the system from suspend. So it is appropriate to register as a no_ws power source, just like the ACPI battery. This removes some debugging messages which occasionally confusingly identify bq27x00 as a wakeup source. Signed-off-by: NNeilBrown <neilb@suse.de> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 22 1月, 2015 2 次提交
-
-
由 Puthikorn Voravootivat 提交于
In current driver, power_supply_changed() is called whenever any of the battery attribute changed. This causes kernel to increases the '/sys/power/wakeup_count' and make suspend not working correctly. This patch change this behavior to call power_supply_changed() only when the battery capacity changed. Signed-off-by: NPuthikorn Voravootivat <puthik@chromium.org> Reviewed-by: NDavid Riley <davidriley@chromium.org> Reviewed-by: NBenson Leung <bleung@chromium.org> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Eric Bénard 提交于
- SOC is at 0x1C so we must add 0x4 as stated in the comment to read the right value. - DCAP is at 0x3c so we also must use a value with the right offset to get the correct design capacity. Actually testing on a bq27410 which has the same register map as bq27425 (but adds new registers). Signed-off-by: NEric Bénard <eric@eukrea.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 20 10月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 01 10月, 2014 1 次提交
-
-
由 Puthikorn Voravootivat 提交于
This patch fix the following issues. - Flag for bq27742 is 2 bytes contracy to 1 byte for older hardware - Don't read FLAG_CI as bq27742 does not have it - Use Battery full capacity register as last measure discharge Signed-off-by: NPuthikorn Voravootivat <puthik@chromium.org> Reviewed-by: NBenson Leung <bleung@chromium.org> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 25 9月, 2014 1 次提交
-
-
由 Puthikorn Voravootivat 提交于
Add support to bq27742 in bq27x00 driver. bq27742 register addresses are mostly mostly the same as bq27500 addresses with minor differences. Signed-off-by: NPuthikorn Voravootivat <puthik@chromium.org> Reviewed-by: NGwendal Grignou <gwendal@chromium.org> Reviewed-by: NRhyland Klein <rklein@nvidia.com> Reviewed-by: NBenson Leung <bleung@chromium.org> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 19 7月, 2014 2 次提交
-
-
由 Marek Belisko 提交于
One an hdq buss, a missing device reads as 0xff, not -1. So do a translation to allow detecting of a missing bus. Signed-off-by: NNeilBrown <neilb@suse.de> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Himangi Saraogi 提交于
This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions for both platform and i2c drivers. Also, the unecessary variable ret and labels batt_failed3, err_free were removed. The following Coccinele script was used for making the change: @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e, e1, e2; @@ probefn(struct platform_device *pdev, ...) { <+... - e = kzalloc(e1, e2) + e = devm_kzalloc(&pdev->dev, e1, e2) ... ?-kfree(e); ...+> } @rem depends on prb@ identifier platform.removefn; expression e; @@ removefn(...) { <... - kfree(e); ...> } Signed-off-by: NHimangi Saraogi <himangi774@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 07 6月, 2013 1 次提交
-
-
由 Jingoo Han 提交于
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d063 (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NAnton Vorontsov <anton@enomsg.org>
-
- 28 2月, 2013 1 次提交
-
-
由 Tejun Heo 提交于
Convert to the much saner new idr interface. Signed-off-by: NTejun Heo <tj@kernel.org> Acked-by: NAnton Vorontsov <cbou@mail.ru> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 03 2月, 2013 1 次提交
-
-
由 Pali Rohár 提交于
Reported temperature can be also negative, so cache value in non negative Kelvin degree. Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NAnton Vorontsov <anton@enomsg.org>
-
- 06 1月, 2013 1 次提交
-
-
由 NeilBrown 提交于
commit a66f59ba bq27x00_battery: Add support for BQ27425 chip introduced 2 bugs. 1/ 'chip' was set to BQ27425 unconditionally - breaking support for other devices; 2/ BQ27425 does not support cycle count, how the code still tries to get the cycle count for BQ27425, and now does it twice for other chips. Signed-off-by: NNeilBrown <neilb@suse.de> Cc: Saranya Gopal <saranya.gopal@intel.com> Cc: stable@vger.kernel.org Signed-off-by: NAnton Vorontsov <anton@enomsg.org>
-
- 29 11月, 2012 3 次提交
-
-
由 Bill Pemberton 提交于
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: NBill Pemberton <wfp5p@virginia.edu> Cc: Anton Vorontsov <cbou@mail.ru> Cc: David Woodhouse <dwmw2@infradead.org> Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bill Pemberton 提交于
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: NBill Pemberton <wfp5p@virginia.edu> Cc: Anton Vorontsov <cbou@mail.ru> Cc: David Woodhouse <dwmw2@infradead.org> Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bill Pemberton 提交于
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: NBill Pemberton <wfp5p@virginia.edu> Cc: Anton Vorontsov <cbou@mail.ru> Cc: David Woodhouse <dwmw2@infradead.org> Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 19 11月, 2012 1 次提交
-
-
由 Pali Rohár 提交于
We should not not report nominal available capacity if battery is not calibrated, as we don't want to represent bogus values in the sysfs and confuse userland. Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
-
- 23 8月, 2012 1 次提交
-
-
由 Julia Lawall 提交于
Initialize return variable before exiting on an error path. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
-
- 14 7月, 2012 1 次提交
-
-
由 Saranya Gopal 提交于
This patch adds support for BQ27425 (TI) chip. This chip is same as BQ27500 with few registers removed and register address map changed. The data sheet for this chip is publicly available at http://www.ti.com/product/bq27425-g1Signed-off-by: NSaranya Gopal <saranya.gopal@intel.com> Reviewed-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
-
- 20 6月, 2012 1 次提交
-
-
由 Syed Rafiuddin 提交于
Addition of power average and health properties. Signed-off-by: NSyed Rafiuddin <srafiuddin@nvidia.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 06 4月, 2012 1 次提交
-
-
由 Thomas Weber 提交于
Signed-off-by: NThomas Weber <thomas@tweber.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 21 2月, 2012 1 次提交
-
-
由 Thomas Weber 提交于
Fix two typos in comments. Signed-off-by: NThomas Weber <weber@corscience.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 02 2月, 2012 2 次提交
-
-
由 Grazvydas Ignotas 提交于
When reading flags, bq27x00_read() argument is inverted and causes reads 2 of bytes for bq27200 and 1 byte for bq27500, while their register sizes are 1 and 2 bytes respectively. This causes bq27500 upper flag bits always to be returned as 0, causing full charge state to never be reported correctly, so fix it. Cc: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Acked-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Anton Vorontsov 提交于
This reverts commit 270968c0. Grazvydas Ignotas wrote: After 270968c0 "bq27x00_battery: Fix reporting status value for bq27500 battery" status doesn't seem to be reported correctly when the battery is close to fully charged state. It reports "Not charging" while in fact there is >130mA current flowing to the battery according to current_now. This status report seems to be based on CHG bit in status register, but looking at the datasheet the description says "(Fast) charging allowed", which I guess means that the chip recommends charging and not that charging is actually going on? If you check the bit while battery is discharging and it's not full, the bit is also set. Suggested-by: NGrazvydas Ignotas <notasas@gmail.com> Acked-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 26 11月, 2011 8 次提交
-
-
由 Pali Rohár 提交于
* power_supply_unregister call bq27x00_battery_get_property which call bq27x00_battery_poll * make sure that bq27x00_battery_poll will not call schedule_delayed_work again after unregister (which cause OOPS) Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Pali Rohár 提交于
* Do not be noise if battery is not calibrated (use dev_dbg) Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Pali Rohár 提交于
Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Pali Rohár 提交于
Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Pali Rohár 提交于
Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Pali Rohár 提交于
* CI (Capacity Inaccurate) flag is set after full reset on bq27000 battery * when is set, all capacity properties should be reported incorrectly, because there was no learning cycle and battery was not calibrated * instead reporting incorrect values, report -ENODATA Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Pali Rohár 提交于
Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Pali Rohár 提交于
* This prevent reporting old current_now value for bq27000 * Also ask for current flags, to make sure that current_now will be reported with correct signature Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 20 5月, 2011 1 次提交
-
-
由 Pali Rohár 提交于
This patch fix using correct property POWER_SUPPLY_PROP_CYCLE_COUNT for cycle count instead POWER_SUPPLY_PROP_CHARGE_COUNTER Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Tested-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 22 2月, 2011 6 次提交
-
-
由 Grazvydas Ignotas 提交于
Doing this by using 2 calls sometimes results in unexpected values being returned on OMAP3 i2c controller. Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
-
由 Lars-Peter Clausen 提交于
Some minor stylistic cleanups. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
-
由 Pali Rohár 提交于
* Consistently use uppercase for hexadecimal values. * Clarify/fix the unit of functions return value in its comment. Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
-
由 Lars-Peter Clausen 提交于
The current code only reports whether the battery is charging or discharging. But the battery also reports whether it is fully charged, furthermore by look at if the battery is supplied we can tell whether it is discharging or not charging. 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 提交于
This patch adds MODULE_DEVICE_TABLE for module bq27x00_battery. Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Tested-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>
-
由 Pali Rohár 提交于
This patch add support for reporting properties POWER_SUPPLY_PROP_CHARGE_NOW, POWER_SUPPLY_PROP_CHARGE_FULL, POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, POWER_SUPPLY_PROP_CHARGE_COUNTER, POWER_SUPPLY_PROP_ENERGY_NOW in module bq27x00_battery. Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
-