- 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>
-
- 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 14 次提交
-
-
由 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>
-
由 Lars-Peter Clausen 提交于
This patch adds support for polling the battery state and generating a power_supply_changed() event if it has changed. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
-
由 Lars-Peter Clausen 提交于
This patch adds a register cache to the bq27x00 battery driver. Usually multiple, if not all, power_supply properties are queried at once, for example when an uevent is generated. Since some registers are used by multiple properties caching the registers should reduce the number of reads. The cache is valid for 5 seconds this roughly matches the internal update interval of the current register for the bq27000/bq27200. Fast changing properties(*_NOW) which can be obtained by reading a single register are not cached. It will also be used in the follow up patch to check if the battery status has been changed since the last update to emit power_supply_changed events. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
-
由 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>
-
- 06 10月, 2010 1 次提交
-
-
由 Axel Lin 提交于
Signed-off-by: NAxel Lin <axel.lin@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 30 3月, 2010 1 次提交
-
-
由 Tejun Heo 提交于
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: NTejun Heo <tj@kernel.org> Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
-
- 27 2月, 2010 2 次提交
-
-
由 Grazvydas Ignotas 提交于
The chip returns voltage and current in mV and mA, but power supply class uses uV and uA, so add missing conversion. Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Grazvydas Ignotas 提交于
The BQ27x00 series of chips can report time-to-empty and time-to-full, so let's add corresponding properties. Also report charge status based on status flag register. Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 17 2月, 2010 4 次提交
-
-
由 Grazvydas Ignotas 提交于
BQ27500 is newer fuel gauge chip from TI with slightly changed register layout and some different register semantics. Add new i2c ID for it and handle differences where needed. Also rename bq27200 functions to bq27x00, as they are no longer bq27200 specific. Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Acked-by: NRodolfo Giometti <giometti@linux.it> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Grazvydas Ignotas 提交于
The power supply class requires tenths of degree Celsius. Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Acked-by: NRodolfo Giometti <giometti@linux.it> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Grazvydas Ignotas 提交于
These are probably leftover from old TI code. Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Acked-by: NRodolfo Giometti <giometti@linux.it> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Grazvydas Ignotas 提交于
The bq27x00 registers are little endian, so just read them as such and don't do double endian swap on LE machines. This also gets rid of strange looking shift that was done after reading 8bit register because endian swap in bq27x00_read() was messing it up. Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Acked-by: NRodolfo Giometti <giometti@linux.it> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 30 3月, 2009 1 次提交
-
-
由 Adam Buchbinder 提交于
A few comments say "Celcius"; this fixes them. No code changes. Signed-off-by: NAdam Buchbinder <adam.buchbinder@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 26 9月, 2008 1 次提交
-
-
由 Harvey Harrison 提交于
Remove hand-rolled get_unaligned_be16, this points to a possible bug as bq27x00_read does another endian byteswap which sparse notices: drivers/power/bq27x00_battery.c:81:14: warning: cast to restricted __be16 Which should probably be checked. Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com> Cc: Rodolfo Giometti <giometti@linux.it> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 01 9月, 2008 1 次提交
-
-
由 Rodolfo Giometti 提交于
These battery managers came in two different packages: one for I2C busses (BQ27200) and one for HDQ busses (BQ27000). This driver currently supports only the I2C chip version but the code is designed in order to easily allow the HDQ chip version integration. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: make things static, use kasprintf()] Signed-off-by: NRodolfo Giometti <giometti@linux.it> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-