summaryrefslogtreecommitdiff
path: root/drivers/power
AgeCommit message (Collapse)Author
2013-01-23pm2301: Update watchdog for pm2xxx supportLoic Pallardy
AB and PMxxx doesn't have same watchdog refresh period. Add watchdog to refresh period parameters in x500 charger structure, this should kick watchdog every 30sec. The AC charging should also kick both pm2xxx and the AB charger watchdog. Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com> Signed-off-by: Loic Pallardy <loic.pallardy@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Michel JAOUEN <michel.jaouen@stericsson.com> Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Tested-by: Michel JAOUEN <michel.jaouen@stericsson.com> Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
2013-01-23ab8500-chargalg: Only root should have write permission on sysfs fileLee Jones
Only root should have write permission on sysfs file ab8500_chargalg/chargalg. Cc: stable@vger.kernel.org Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-01-23pm2301: Remove volt_now & curr_now propertiesLoic Pallardy
There is no support to measure the main charger voltage and current using AB9540 gpadc. Therefore this has been removed from the driver. Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Michel JAOUEN <michel.jaouen@stericsson.com> Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com> Tested-by: Michel JAOUEN <michel.jaouen@stericsson.com>
2013-01-23pm2301: Clean-up PM2301 interrupt managementOlivier Clergeaud
Fix the way interrupts are handled within the PM2301 charging driver. Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Olivier CLERGEAUD <olivier.clergeaud@stericsson.com> Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com> Reviewed-by: Michel JAOUEN <michel.jaouen@stericsson.com> Tested-by: Michel JAOUEN <michel.jaouen@stericsson.com>
2013-01-23pm2301: Move all configuration and emum structs out to a header fileLee Jones
Also shift the file description to a more suitable location. Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-01-23ab8500-chargalg: Update battery health on safety timer expLee Jones
When the charging safety timer elapses, the battery health is shown as "Good". This is misleading and also makes it difficult to distinguish issues relating to discharging despite the fact that the charger is still connected. When in actual fact a safety timer elapse is an indication of a fault in the battery. Here we make this clearer by reporting POWER_SUPPLY_HEALTH_UNSPEC_FAILURE instead. Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-01-23ab8500-charger: Kick watchdogLee Jones
Kicks the watchdog so charging will not stop. Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-01-23ab8500-btemp: Adaptation to AB8505 and AB9540 platformsMichel JAOUEN
Add AB9540 and AB8505 support to ABx500 BTEMP driver. Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Michel JAOUEN <michel.jaouen@stericsson.com> Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Tested-by: Michel JAOUEN <michel.jaouen@stericsson.com> Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
2013-01-23ab8500-fg: Adjust for RF bursts voltage dropsHakan Berg
Changed conditions for restarting low battery measurements counter and adjusted the interval between measurements to avoid RF burst induced voltage drops, and to shorten time to decide to shut down. Signed-off-by: Hakan Berg <hakan.berg@stericsson.com> Signed-off-by: Martin Bergstrom <martin.bergstrom@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
2013-01-23ab8500-charger: AB workaround for invalid chargerHenrik Sölver
AB8500 refuses to start charging when some types of non standard chargers are connected. This change force the AB to start charging. Signed-off-by: Henrik Sölver <henrik.solver@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Yvan FILLION <yvan.fillion@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Tested-by: Yvan FILLION <yvan.fillion@stericsson.com>
2013-01-23pm2301: Provide u9540 support for the pm2301 chargerMichel JAOUEN
AC charger driver for the DB9540 based platforms. Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com> Signed-off-by: Loic Pallardy <loic.pallardy@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Michel JAOUEN <michel.jaouen@stericsson.com> Tested-by: Michel JAOUEN <michel.jaouen@stericsson.com>
2013-01-20qnap-poweroff: Fix license stringAndrew Lunn
GPLv2+ is not a valid license string. Replace it with one that is. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_fg: Remove pointless round_jiffies() callLee Jones
As HZ is a full-second, there is little point in rounding it. Let's save a few cycles by using HZ directly. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_fg: Overflow in current calculationPaer-Olof Haakansson
When calculating the average current the nominator will overflow when the charging current is high. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Henrik Sölver <henrik.solver@stericsson.com> Reviewed-by: Par-Olof HAKANSSON <par-olof.hakansson@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Tested-by: Par-Olof HAKANSSON <par-olof.hakansson@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_charger: Adds support for legacy USB chargersMarcus Cooper
A Legacy USB charger should be handled directly by the charger driver. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com> Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_charger: Remove unused definesMarcus Cooper
Cleanup of the ab8500_charger driver. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com> Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_fg: Added support for BATT_OVVHakan Berg
Add support for the battery over-voltage situation Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Hakan Berg <hakan.berg@stericsson.com> Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_btemp: Remove superfluous BTEMP thermal compHakan Berg
BTEMP thermal compensation factor times 10 is applied in two places, probe and get_property. Removed from probe. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Hakan Berg <hakan.berg@stericsson.com> Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_fg: Round capacity outputpender01
Round the capacity values for better enduser experience. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: pender01 <peter.enderborg@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Tested-by: Marcus COOPER <marcus.xm.cooper@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_bm: Adds support for Car/Travel AdaptersHakan Berg
The Travel and Carkit adapter should be handled directly by the charger driver. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_btemp: Ignore false btemp low interruptHakan Berg
Ignore the low btemp interrupts for ab8500 3.0 and 3.3 Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Hakan Berg <hakan.berg@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Tested-by: Marcus COOPER <marcus.xm.cooper@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_btemp: Allign battery temperature resolution with the frameworkLee Jones
The Linux Power Supply framework expects battery temperatures to have a resolution of 0.1 degree Celsius; however, the AB8500 btemp driver supplies a battery temperature resolution of 1 degree Celsius. We therefore have to use a factor 10 on the measured values. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_fg: Balance IRQ enableRickard Andersson
In case of time out error IRQ needs to be disabled otherwise we will get unbalanced enable/disable pairs. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Rickard Andersson <rickard.andersson@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_bm: Recharge condition not optimal for batteryMarcus Cooper
Today the battery recharge is determined with a voltage threshold. This voltage threshold is only valid when the battery is relaxed. In charging algorithm the voltage read is the loaded battery voltage and no compensation is done to get the relaxed voltage. When maintenance charging is not selected, this makes the recharging condition to almost immediately activate when there is a discharge present on the battery. Depending on which vendor the battery comes from this behavior can wear out the battery much faster than normal. The fuelgauge driver is responsible to monitor the actual battery capacity and is able to estimate the remaining capacity. It is better to use the remaining capacity as a limit to determine when battery should be recharged. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com> Reviewed-by: Hakan BERG <hakan.berg@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_charger: Handle gpadc errorsJonas Aaberg
Gracefully handle gpadc conversion errors. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Reviewed-by: Johan BJORNSTEDT <johan.bjornstedt@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_fg: Replace msleep() with usleep_range() for greater accuracyJonas Aaberg
Doing so provides a greater degree of accuracy when dealing with time-frames between 1us and 20ms. msleep() is only accurate for wake-ups greater than 20ms. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jonas ABERG <jonas.aberg@stericsson.com> Reviewed-by: Johan BJORNSTEDT <johan.bjornstedt@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_charger: Detect charger removalLee Jones
Add two new work queues to provide USB and AC charger disconnect detection. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_bm: Skip first CCEOC irq for instant currentJohan Bjornstedt
When enabling the CCEOC irq we might get false interrupt from ab8500-driver due to the latched value will be saved and interpreted as an IRQ when enabled Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Johan Bjornstedt <johan.bjornstedt@stericsson.com> Signed-off-by: Henrik Solver <henrik.solver@stericsson.com> Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-16ab8500_charger: Rename the power_loss functionPaer-Olof Haakansson
Rename the ab8500_power_loss_handling function to a more descriptive name ab8500_enable_disable_sw_fallback Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Robert Marklund <robert.marklund@stericsson.com> Reviewed-by: Par-Olof HAKANSSON <par-olof.hakansson@stericsson.com> Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com> Tested-by: Par-Olof HAKANSSON <par-olof.hakansson@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-06da9052-battery: Avoid out-of-range array accessNickolai Zeldovich
Avoid accessing vc_tbl_ref[3], which is one past the end of that array, in da9052_determine_vc_tbl_index(), by adjusting the loop bound. (Hint: there is 'i + 1' inside the loop.) Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-06max17040_battery: Use devm_kzallocDevendra Naga
use devm_kzalloc and no need of error path and unload frees. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-06lp8788-charger: Fix a parent device in kernel messagesKim, Milo
Use 'platform_device' in kernel messages rather than i2c client device node. lp8788_update_charger_params() needs additional argument, 'pdev'. Then, remove unnecessary lp8788 private data in lp8788_irq_register(). Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-06lp8788-charger: Fix a parent device in _probe()Kim, Milo
The lp8788-charger is a platform driver of lp8788-mfd. The platform device is allocated when mfd_add_devices() is called in lp8788-mfd. On the other hand, 'lp->dev' is the i2c client device. Therefore, this 'platform_device' is a proper parent device in case of resource managed mem alloc and device kernel message. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-06power/reset: Add a new driver implementing 'power off by restarting'Andrew Lunn
Some devices, Buffalo Linkstation LS-XHL and LS-CHLv2 for example, power-off by restarting to letting u-boot hold the SoC until the user presses a key. Add a generic driver to implement this. It binds a function to pm_power_off, which calls arm_pm_restart. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Michael Walle <michael@walle.cc> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-06power/reset: Add a new driver to turn QNAP board power offAndrew Lunn
The QNAP NAS boxes have a microcontroller attached to the SoCs second serial port. By sending it a simple command, it will turn the power for the board off. This driver registers a function for pm_power_off to send such a command. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-0688pm860x_battery: Eliminate possible references to released resourcesJulia Lawall
devm_kzalloc should not be followed by kfree, as this results in a double free. The problem was found using the following semantic match (http://coccinelle.lip6.fr/): // <smpl> @@ expression x,e; @@ x = devm_kzalloc(...) ... when != x = e ?-kfree(x,...); // </smpl> Furthermore, in the remove function, the calls to free_irq are moved up to prevent a possible reference in the interrupt handler to resources freed by power_supply_unregister. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-06ab8500_charger: Use devm_regulator_get APISachin Kamat
devm_regulator_get() is device managed and makes error handling and code cleanup simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Arun Murthy <arun.murthy@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-06bq27x00_battery: Fix bugs introduced with BQ27425 supportNeilBrown
commit a66f59ba2e994bf70274ef0513e24e0e7ae20c63 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: NeilBrown <neilb@suse.de> Cc: Saranya Gopal <saranya.gopal@intel.com> Cc: stable@vger.kernel.org Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-06power_supply: Add watchdog and safety timer expiries under PROP_HEALTH_*Ramakrishna Pallala
As most of the charger chips come with two kinds of safety features related to timing: 1. Watchdog Timer (interms of seconds/mins) 2. Safety Timer (interms of hours) This patch adds these to fault causes in POWER_SUPPLY_PROP_HEALTH_* enums so that whenever there is either watchdog timeout or safety timer timeout driver could notify the user space accurately about the fault and will also be helpful for debug. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-06bq2415x_charger: Use devm_kzalloc()Sachin Kamat
devm_kzalloc is device managed and makes error handling and code cleanup a bit simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-06bq2415x_charger: Use module_i2c_driverSachin Kamat
module_i2c_driver() makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-06bq2415x_charger: Remove unneeded version.h inclusionSachin Kamat
<linux/version.h> is not required here. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-06Merge branch 'for-anton' of git://git.linaro.org/people/ljones/linux-3.0-ux500Anton Vorontsov
2013-01-05charger_manager: Don't use [delayed_]work_pending()Tejun Heo
There's no need to test whether a (delayed) work item in pending before queueing, flushing or cancelling it. Most uses are unnecessary and quite a few of them are buggy. Remove unnecessary pending tests and rewrite _setup_polling() so that it uses mod_delayed_work() if the next polling interval is sooner than currently scheduled. queue_delayed_work() is used otherwise. Only compile tested. I noticed that two work items - setup_polling and cm_monitor_work - schedule each other. It's a very unusual construct and I'm fairly sure it's racy. You can't break such circular dependency by calling cancel on each. I strongly recommend revising the mechanism. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Anton Vorontsov <cbou@mail.ru> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Donggeun Kim <dg77.kim@samsung.com> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2013-01-05charger-manager: Split _probe funtion to make the code more cleanChanwoo Choi
This patch split _probe function for readability because _probe function is longer than 400 line. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-12-30Merge tag 'omap-late-cleanups' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull late ARM cleanups for omap from Olof Johansson: "From Tony Lindgren: Here are few more patches to finish the omap changes for multiplatform conversion that are not strictly fixes, but were too complex to do with the dependencies during the merge window. Those are to move of serial-omap.h to platform_data, and the removal of remaining cpu_is_omap macro usage outside mach-omap2. Then there are several trivial fixes for typos and few minimal omap2plus_defconfig updates." * tag 'omap-late-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arch/arm/mach-omap2/dpll3xxx.c: drop if around WARN_ON OMAP2: Fix a typo - replace regist with register. ARM/omap: use module_platform_driver macro ARM: OMAP2+: PMU: Remove unused header ARM: OMAP4: remove duplicated include from omap_hwmod_44xx_data.c ARM: OMAP2+: omap2plus_defconfig: enable twl4030 SoC audio ARM: OMAP2+: omap2plus_defconfig: Add tps65217 support ARM: OMAP2+: enable devtmpfs and devtmpfs automount ARM: OMAP2+: omap_twl: Change TWL4030_MODULE_PM_RECEIVER to TWL_MODULE_PM_RECEIVER ARM: OMAP2+: Drop plat/cpu.h for omap2plus ARM: OMAP: Split fb.c to remove last remaining cpu_is_omap usage MAINTAINERS: Add an entry for omap related .dts files
2012-12-19Merge tag 'for-v3.8-part2' of git://git.infradead.org/battery-2.6Linus Torvalds
Pull battery update, part 2, from Anton Vorontsov: "These are left overs that I didn't have time to review/apply before the merge window opened. I didn't want to "spoil" the first pull request with these late patches, so they were not included: - A small patch for the RX51 OMAP board (Nokia N900 phone), the patch creates a battery monitor device instance, so that it can be probed. It was acked by the OMAP maintainer; - A couple of late bug fixes for the charger-manager: corrects corner cases for the battery full handling." * tag 'for-v3.8-part2' of git://git.infradead.org/battery-2.6: charger-manager: Fix bug when check dropped voltage after fullbatt event charger-manager: Fix bug related to checking fully charged state of battery ARM: OMAP: rx51: Register platform device for rx51_battery
2012-12-17ARM: OMAP2+: Drop plat/cpu.h for omap2plusTony Lindgren
The cpu_is_omap macros are now local to arch/arm/mach-omap2 in soc.h and plat/cpu.h can finally be dropped for omap2+. Thanks everybody for help with fixing the drivers. Note that we can now also remove the unused plat/cpu.h from smartreflex.c and isp.c as they will cause compile errors with ARCH_MULTIPLATFORM enabled. Cc: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Jean Pihet <jean.pihet@newoldbits.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-12-17charger-manager: Fix bug when check dropped voltage after fullbatt eventChanwoo Choi
This patch check difference value between current voltage of battery and desc->fullbatt_uV whether positve or negative number. If difference value is negative number when current voltage of battery is larger than desc->fullbatt_uV, charger-manager return immediately because battery is fully charged. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-12-17charger-manager: Fix bug related to checking fully charged state of batteryChanwoo Choi
This patch fix bug related to checking fully charged state of battery when charger-manager call is_full_charged() function. After reading property of charger/fuel-gauge through power_supply API, val.intval is more than 1. So, is_full_charged() function always return true. If true, battery means fully charged state. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>