ddeeb8f973bbe3bebac78e78c234ff18bfb00bf0 |
|
06-May-2013 |
Jingoo Han <jg1.han@samsung.com> |
ab8500_bm: Remove unnecessary platform_set_drvdata() The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (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: Jingoo Han <jg1.han@samsung.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
|
4d3b4aa58ac9e18029c4d0259630414cffd3ba76 |
|
15-Feb-2013 |
Lee Jones <lee.jones@linaro.org> |
abx500-chargalg: Add charging current step interface To prevent overheating, provide differnt steps of charging current interface to allow thermal mitigation. This will provide possibility to reduce gradually the charging current. Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
1ee26af028a46cf911f844c062b3c810bac34366 |
|
11-Oct-2012 |
srinidhi kasagar <srinidhi.kasagar@stericsson.com> |
abx500-chargalg: Use module_platform_driver() rather deprecate some boilerplate code by using module_platform_driver helper macro. No functional changes. Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
257107ae6b9ba1f3822a8b079acef57a752dcc4c |
|
13-Feb-2013 |
Lee Jones <lee.jones@linaro.org> |
ab8500-chargalg: Use hrtimer Timers used for charging safety and maintenance must work even when CPU power has collapsed. By using hrtimers with the realtime clock the system is able to trigger an alarm that wakes-up the CPU and makes it possible to handle events. Allow a little slack time of 5 minutes for the hrtimers to allow CPU to be woken-up in a more optimal power saving way. A 5 minute delay to time-out timers relative to hours does not impact on safety. Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
eaded808c9f9f36d95b5b7fe195ab1839e9e486c |
|
13-Feb-2013 |
Lee Jones <lee.jones@linaro.org> |
abx500-chargalg: Prevent the watchdog from being kicked twice Charging watchdog kicker work-thread gets started twice causing 'failed to kick watchdog' message after removing charger and when re-inserting charger. This patch removes the superfluous start of watchdog kicker-thread. Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
db43e6c473b57d4e7a55c4bd6edef71f40f13eae |
|
14-Feb-2013 |
Lee Jones <lee.jones@linaro.org> |
ab8500-bm: Add usb power path support AB8540 supports power path function in USB charging mode for fast power up with dead and weak battery, and it could extend the battery age. When USB charging starts, if the Vbattrue is below than SW cut off voltage, power path and pre-charge should be enabled. If Vbattrue is higher than SW cut off voltage, power path and pre-charge should be disabled. This is to make sure full current to battery charge. At the end of charge, power path should be enable again to reduce charging the battery again. Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
8891716e24d7b0f4b1c3b4fdff641bcb1fb282c4 |
|
13-Feb-2013 |
Lee Jones <lee.jones@linaro.org> |
ab8500-bm: Charge only mode fixes for the ab9540 Fix for charging not getting enabled in charge only mode by external charger. Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
4dcdf57773fd45b483fc7613b9e51b89a57d655c |
|
14-Feb-2013 |
Lee Jones <lee.jones@linaro.org> |
ab8500-bm: Quick re-attach charging behaviour Due to a bug in some AB8500 ASICs charger removal cannot always be detected if the removal and reinsertion is done to close in time. This patch detects above described case and handles the situation so that charging will be kept turned on. Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
330b7ebfa59d70ea5b814a04a28b8c7d8e462a81 |
|
15-Feb-2013 |
Lee Jones <lee.jones@linaro.org> |
abx500-chargalg: Store the AB8500 MFD parent device for platform differentiation Any platform can be dynamically probed for model and version number provided the AB8500 MFD parent device pointer is available. This patch obtains that pointer and stores it in a locally controlled struct for later use. Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
c9ade0fca3f7939194677353097b16c9795df46b |
|
21-Jan-2013 |
Lee Jones <lee.jones@linaro.org> |
abx500-chargalg: Add new sysfs interface to get current charge status Allow a user to check on AB8500 charging status from debugfs. Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
e07a56453b14b929cf01bf032cc3e3220094609c |
|
10-May-2012 |
Loic Pallardy <loic.pallardy@stericsson.com> |
pm2301: Update watchdog for pm2xxx support 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>
|
e3455002d04276c256a531f7175dce0f7d1cb78a |
|
17-Jan-2013 |
Lee Jones <lee.jones@linaro.org> |
ab8500-chargalg: Only root should have write permission on sysfs file 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>
|
d80108fc69484c20c3b85d7cdc948e191e843fa4 |
|
17-Jan-2013 |
Lee Jones <lee.jones@linaro.org> |
ab8500-chargalg: Update battery health on safety timer exp 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>
|
3edebfcdb31e6203abe0994c1e785833d928e8b4 |
|
17-Jan-2013 |
Lee Jones <lee.jones@linaro.org> |
ab8500-charger: Kick watchdog Kicks the watchdog so charging will not stop. Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
ea4024017831d61874351defe8f8c58ae73f8009 |
|
11-Jan-2013 |
Marcus Cooper <marcus.xm.cooper@stericsson.com> |
ab8500_bm: Recharge condition not optimal for battery 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>
|
bdc56b44038e1472d24c9195337226b8d6f2961e |
|
30-Nov-2012 |
Lee Jones <lee.jones@linaro.org> |
abx500_chargalg: Reorder obtainment of platform specific battery management data Now that we always pass platform specific battery management data through platform_data instead of obtaining it via different means depending the way be boot the system (DT or ATAGs); we need to re-jiggle the way we acquire it in the driver start-up functions. Now it is wrong for it to be missing, but we still allow Device Tree code to fiddle with it once we've confirmed it's there. Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
23a04f9f40f2b32ee593b768483105b1c776814d |
|
29-Nov-2012 |
Lee Jones <lee.jones@linaro.org> |
ab8500_bm: Always send platform specific battery information via pdata Currently the AB8500 battery management subsystem receives platform specific information via two different means depending on how the platform is booted. If DT is not enabled, a reference to a *_bm_data data structure containing each platform specific attribute is passed though platform_data. However, if DT is enabled, then platform_data is empty and the reference is gained though a DT specific probe function. There are two issues here 1) the same reference is being collected each time and 2) the DT way doesn't allow any provisions to select different platform specific attributes, which kind of defeats the object. Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
b0284de05e07d56ff7de154d0c9263788755f5eb |
|
30-Nov-2012 |
Lee Jones <lee.jones@linaro.org> |
ab8500_bm: Rename battery management platform data to something more logical The platform specific battery management configuration data structure is currently called 'bat' short for 'battery'; however, it contains information for all components of the battery management group, rather than information pertaining to the battery itself - there are other structures for that. So, in keeping with its structure namesake 'abx500_bm_data', we rename it to 'bm' here. Using similar logic, we're also renaming 'bmdevs_of_probe' to the more device specific 'ab8500_bm_of_probe'. Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
415ec69fb1861fc377c65cb30ddc76999891b8e1 |
|
19-Nov-2012 |
Bill Pemberton <wfp5p@virginia.edu> |
power: remove use of __devexit CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Anton Vorontsov <cbou@mail.ru> Cc: David Woodhouse <dwmw2@infradead.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
c8afa6406e60aec6ff90033e5ffe41a206609296 |
|
19-Nov-2012 |
Bill Pemberton <wfp5p@virginia.edu> |
power: remove use of __devinit CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Anton Vorontsov <cbou@mail.ru> Cc: David Woodhouse <dwmw2@infradead.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
28ea73f4c67cb3dd8c972b21d9fdf84ea78d6daa |
|
19-Nov-2012 |
Bill Pemberton <wfp5p@virginia.edu> |
power: remove use of __devexit_p CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Anton Vorontsov <cbou@mail.ru> Cc: David Woodhouse <dwmw2@infradead.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
a12810ab9fcf0c9fd5e50b5e350a3ffbeaa571be |
|
31-Oct-2012 |
Rajanikanth H.V <rajanikanth.hv@stericsson.com> |
ab8500: Add devicetree support for chargalg This patch adds device tree support for charging algorithm driver Signed-off-by: Rajanikanth H.V <rajanikanth.hv@stericsson.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
|
e0f1abeba5c2d8a2183566717d99294fd1a29c2e |
|
19-Nov-2012 |
Rajanikanth H.V <rajanikanth.hv@stericsson.com> |
ab8500: Add devicetree support for fuelgauge - This patch adds device tree support for fuelgauge driver - optimize bm devices platform_data usage and of_probe(...) Note: of_probe() routine for battery managed devices is made common across all bm drivers. - test status: - interrupt numbers assigned differs between legacy and FDT mode. Signed-off-by: Rajanikanth H.V <rajanikanth.hv@stericsson.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
|
203b42f7317494ae5e5efc7be6fb7f29c927f102 |
|
21-Aug-2012 |
Tejun Heo <tj@kernel.org> |
workqueue: make deferrable delayed_work initializer names consistent Initalizers for deferrable delayed_work are confused. * __DEFERRED_WORK_INITIALIZER() * DECLARE_DEFERRED_WORK() * INIT_DELAYED_WORK_DEFERRABLE() Rename them to * __DEFERRABLE_WORK_INITIALIZER() * DECLARE_DEFERRABLE_WORK() * INIT_DEFERRABLE_WORK() This patch doesn't cause any functional changes. Signed-off-by: Tejun Heo <tj@kernel.org>
|
64eb9b02bfbbc2a53b6092cc12c1f42cc3261dbc |
|
14-Mar-2012 |
Anton Vorontsov <anton.vorontsov@linaro.org> |
ab8500: Turn unneeded global symbols into local ones The patch fixes the following sparse warning: drivers/power/ab8500_charger.c:1619:6: warning: symbol 'ab8500_charger_detect_usb_type_work' was not declared. Should it be static? drivers/power/abx500_chargalg.c:1709:24: warning: symbol 'abx500_chargalg_sysfs_ops' was not declared. Should it be static? drivers/power/ab8500_fg.c:2328:24: warning: symbol 'ab8500_fg_sysfs_ops' was not declared. Should it be static? Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
|
1668f81159fb72eda2114a9c73a64ffee045cb01 |
|
29-Feb-2012 |
Arun Murthy <arun.murthy@stericsson.com> |
abx500-chargalg: Add abx500 charging algorithm This is a charging algorithm driver for abx500 variants. It is the central entity for battery driver and is responsible for charging and monitoring the battery driver. It is a hardware independant driver and also monitors other abx500 power supply devices. Signed-off-by: Arun Murthy <arun.murthy@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
|