28 Aug, 2013
1 commit
-
There is a missing break statement here, so we print an error message that
the USB type is invalid. The original code still works fine though except
for the error message.Signed-off-by: Dan Carpenter
Signed-off-by: Anton Vorontsov
07 Jun, 2013
1 commit
-
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
Acked-by: Lee Jones
Signed-off-by: Anton Vorontsov
07 Mar, 2013
14 commits
-
There's no need to test whether a (delayed) work item is pending
before queueing, flushing or cancelling it. Most uses are unnecessary
and quite a few of them are buggy.Signed-off-by: Lee Jones
-
Signed-off-by: Lee Jones
-
Only AB8500 has this hardware bug, so these works only need to be run
there.Signed-off-by: Rabin Vincent
Signed-off-by: Lee Jones
Reviewed-by: Marcus COOPER
Reviewed-by: Martin SJOBLOM
Reviewed-by: Jonas ABERG -
When the state of USB Charge detection is changed then the calls
use a define for another register in other bank. This change
creates a new define for the correct register and removes the
magic numbers that are present.Signed-off-by: Marcus Cooper
Signed-off-by: Lee Jones
Reviewed-by: Hakan BERG
Reviewed-by: Jonas ABERG -
The newer AB's such as the AB8505, AB9540 etc include a
USBLink1 Status register which detects a larger range of
external devices. This should be used instead of the
USBLine Status register.Signed-off-by: Marcus Cooper
Signed-off-by: Lee Jones
Reviewed-by: Hakan BERG
Reviewed-by: Jonas ABERG
Tested-by: Yang QU -
Provide AB8540 platform specific information required to run the
Battery Management subsystem on AB8540 based devices. For this to
happen we see the introduction of separate platform specific data
structures and a means in which to process them.Signed-off-by: Lee Jones
-
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
-
The PM2301 Charger should always be available when using the AB8500
Battery Management system, we're ensuring this will be the case.Signed-off-by: Marcus Cooper
Signed-off-by: Lee Jones
Reviewed-by: Hakan BERG
Reviewed-by: Mian Yousaf KAUKAB -
The AB8505 does not have the same address for USB link-status
as has ab8500. Add AB8505_USB_LINK_STATUS and code to switch
to correct constant.Signed-off-by: Hakan Berg
Signed-off-by: Lee Jones
Reviewed-by: Mian Yousaf KAUKAB
Reviewed-by: Marcus COOPER
Reviewed-by: Rabin VINCENT -
Do not set higher current in stepping functionality if VBUS is dropping.
After VBUS has dropped try to set current once again. If dropping again
then we have found the maximum capability of the charger.Signed-off-by: Lee Jones
-
Fix for charging not getting enabled in charge only mode by
external charger.Signed-off-by: Lee Jones
-
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
-
Enforce the white space character after 'if'.
Signed-off-by: Lee Jones
-
Add 2.7v, 2.9v, 3.0v, 3.2v and 3.3v charging voltages for backup
battery. Before that only 2.5v, 2.6v, 2.8v, 3.1v were available.Signed-off-by: Yang QU
Signed-off-by: Lee Jones
Reviewed-by: Maxime COQUELIN
Reviewed-by: Marcus COOPER
Tested-by: Xiao Mei ZHANG
23 Jan, 2013
9 commits
-
If charging is started before USB enumeration of an Accessory
Charger Adapter has finished, the AB8500 will generate a
VBUS_ERROR. This in turn results in timeouts and delays the
enumeration with around 15 seconds. This patch delays the
charging and then ramps currents slowly to avoid VBUS errors.
The delay allows the enumeration to have finished before
charging is turned on.Signed-off-by: Martin Sjoblom
Signed-off-by: Lee Jones
Reviewed-by: Jonas ABERG
Tested-by: Jonas ABERG -
None of the aforementioned components have their own dedicated
platform data structures anymore. Instead they have all been
merged into one big Battery Management container. Let's remove
them and place all the nice newly added attributes into the core
container.Signed-off-by: Lee Jones
-
Do not touch the VBUSOVV in USBCHTRL2 when running on AB8505.
Signed-off-by: Jonas Aaberg
Signed-off-by: Lee Jones
Reviewed-by: Marcus COOPER
Tested-by: Mian Yousaf KAUKAB -
Flush all workqueues at suspend time to avoid suspending during work.
Signed-off-by: Jonas Aaberg
Signed-off-by: Lee Jones
Reviewed-by: Marcus COOPER -
Accessing autopower register fails on the AB8505 and ab9540 as
the fallback software control register has moved.Signed-off-by: Marcus Cooper
Signed-off-by: Lee Jones
Reviewed-by: Mattias WALLIN
Reviewed-by: Nicolas GUION
Reviewed-by: Jonas ABERG
Tested-by: Jonas ABERG -
Allow a user to check on AB8500 charging status from debugfs.
Signed-off-by: Lee Jones
-
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
Signed-off-by: Loic Pallardy
Signed-off-by: Lee Jones
Reviewed-by: Michel JAOUEN
Reviewed-by: Marcus COOPER
Reviewed-by: Jonas ABERG
Tested-by: Michel JAOUEN
Tested-by: Jonas ABERG -
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
Signed-off-by: Lee Jones
Reviewed-by: Yvan FILLION
Reviewed-by: Jonas ABERG
Tested-by: Yvan FILLION -
AC charger driver for the DB9540 based platforms.
Signed-off-by: Rajkumar Kasirajan
Signed-off-by: Loic Pallardy
Signed-off-by: Lee Jones
Reviewed-by: Michel JAOUEN
Tested-by: Michel JAOUEN
16 Jan, 2013
6 commits
-
A Legacy USB charger should be handled directly by the charger
driver.Signed-off-by: Lee Jones
Signed-off-by: Marcus Cooper
Reviewed-by: Karl KOMIEROWSKI
Reviewed-by: Jonas ABERG
Signed-off-by: Anton Vorontsov -
Cleanup of the ab8500_charger driver.
Signed-off-by: Lee Jones
Signed-off-by: Marcus Cooper
Reviewed-by: Karl KOMIEROWSKI
Signed-off-by: Anton Vorontsov -
The Travel and Carkit adapter should be handled directly by
the charger driver.Signed-off-by: Lee Jones
Signed-off-by: Marcus Cooper
Reviewed-by: Jonas ABERG
Signed-off-by: Anton Vorontsov -
Gracefully handle gpadc conversion errors.
Signed-off-by: Lee Jones
Signed-off-by: Jonas Aaberg
Reviewed-by: Johan BJORNSTEDT
Signed-off-by: Anton Vorontsov -
Add two new work queues to provide USB and AC charger disconnect
detection.Signed-off-by: Lee Jones
Signed-off-by: Anton Vorontsov -
Rename the ab8500_power_loss_handling function to a more
descriptive name ab8500_enable_disable_sw_fallbackSigned-off-by: Lee Jones
Signed-off-by: Robert Marklund
Reviewed-by: Par-Olof HAKANSSON
Reviewed-by: Karl KOMIEROWSKI
Tested-by: Par-Olof HAKANSSON
Signed-off-by: Anton Vorontsov
06 Jan, 2013
2 commits
-
devm_regulator_get() is device managed and makes error handling and code
cleanup simpler.Signed-off-by: Sachin Kamat
Acked-by: Arun Murthy
Acked-by: Linus Walleij
Signed-off-by: Anton Vorontsov
12 Dec, 2012
1 commit
-
The merge is merely to fix conflicts before sending a pull request.
Conflicts:
drivers/power/ab8500_btemp.c
drivers/power/ab8500_charger.c
drivers/power/ab8500_fg.c
drivers/power/abx500_chargalg.c
drivers/power/max8925_power.cSigned-off-by: Anton Vorontsov
11 Dec, 2012
4 commits
-
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
-
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
Signed-off-by: Lee Jones -
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
-
There is no state machine in the AB to step up/down the charger
current to avoid dips and spikes on VBUS and VBAT when charging
is started. Instead this is implemented in SW.Signed-off-by: Johan Bjornstedt
Signed-off-by: Mattias Wallin
Signed-off-by: Lee Jones
Reviewed-by: Karl KOMIEROWSKI
29 Nov, 2012
2 commits
-
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.Signed-off-by: Bill Pemberton
Cc: Anton Vorontsov
Cc: David Woodhouse
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Anton Vorontsov
Cc: David Woodhouse
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman