History log of /linux-master/include/linux/mfd/abx500.h
Revision Date Author Comments
# ee0975c3 12-Mar-2021 Linus Walleij <linus.walleij@linaro.org>

mfd/power: ab8500: Push data to power supply code

There is a slew of defines, structs and enums and even a
function call only relevant for the charging code that
still lives in <linux/mfd/abx500.h>. Push it down to the
"ab8500-bm.h" header in the power supply subsystem where
it is actually used.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# af873fce 28-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194

Based on 1 normalized pattern(s):

license terms gnu general public license gpl version 2

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 161 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Steve Winslow <swinslow@gmail.com>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190528170027.447718015@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 4c4268dc 22-Mar-2018 Linus Walleij <linus.walleij@linaro.org>

power: supply: ab8500: Drop AB8540/9540 support

The AB8540 was an evolved version of the AB8500, but it was never
mass produced or put into products, only reference designs exist.
The upstream support was never completed and it is unlikely that
this will happen so drop the support for now to simplify
maintenance of the AB8500.

Cc: Loic Pallardy <loic.pallardy@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>


# a042a7a4 28-Dec-2016 Colin Ian King <colin.king@canonical.com>

mfd: abx500: Fix spelling mistake: "Celcius" -> "Celsius"

Trivial fix to spelling mistake in MFD headers.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# a22c514c 22-May-2014 Lee Jones <lee.jones@linaro.org>

mfd: abx500-core: Remove unused function abx500_dump_all_banks()

abx500_dump_all_banks() has no callers in the kernel, so it's probably
safe to remove it.

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 7abafa0a 21-May-2014 Jay Aurabind <mail@aurabindo.in>

mfd: abx500-core: Fix compiler warning larger stack frame

On systems with CONFIG_FRAME_WARN=1024, compiler warns the allocation of
an object of struct device on stack. Make the allocation dynamically to
fix the warning. Also change the caller's return type to int so as to
account for error handling.

drivers/mfd/abx500-core.c: In function ‘abx500_dump_all_banks’:
drivers/mfd/abx500-core.c:167:1: warning: the frame size of 1032 bytes
is larger than 1024 bytes [-Wframe-larger-than=]

Signed-off-by: Aurabindo J <mail@aurabindo.in>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 2c899407 03-Apr-2013 Hongbo Zhang <hongbo.zhang@linaro.org>

ab8500_{bmdata,fg}: Add const attributes to some data arrays

This patch adds const attributes to AB8500 power and temperature related
read-only data arrays.

Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>


# 861a30da 29-Aug-2012 Lee Jones <lee.jones@linaro.org>

ab8500-bm: Add support for the new ab8540 platform

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 <lee.jones@linaro.org>


# db43e6c4 13-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>


# 93ff722e 31-May-2012 Lee Jones <lee.jones@linaro.org>

ab8500-fg: Add power cut feature for ab8505 and ab8540

Add support for a power cut feature which allows user to
configure when ab8505 and ab8540 based platforms should shut
down system due to low battery.

Signed-off-by: Lee Jones <lee.jones@linaro.org>


# e0f4fec0 27-Jan-2012 Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>

mfd: abx500-core: Provide an API to dump all ABx500 registers

Some drivers can detect subsystem failures e.g. shared memory driver
can detect modem sub system failures. It would be helpful in analyzing
these failures if AB register dump is available at that point. This
patch adds the API for the drivers to dump AB registers in the kernel
log.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>


# 97034a1e 17-Jan-2013 Lee Jones <lee.jones@linaro.org>

ab8500-bm: Remove individual [charger|btemp|fg|chargalg] pdata structures

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 <lee.jones@linaro.org>


# 00441b5e 09-Jan-2013 Lee Jones <lee.jones@linaro.org>

mfd: Fix compile errors and warnings when !CONFIG_AB8500_BM

drivers/mfd/ab8500-core.c:1015:21: error: ‘ab8500_bm_data’ undeclared here

include/linux/mfd/abx500/ab8500-bm.h:445:13: warning: ‘ab8500_fg_reinit’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:448:13: warning: ‘ab8500_charger_usb_state_changed’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:451:29: warning: ‘ab8500_btemp_get’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:455:12: warning: ‘ab8500_btemp_get_batctrl_temp’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:463:12: warning: ‘ab8500_fg_inst_curr_blocking’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:442:12: warning: ‘ab8500_fg_inst_curr_done’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:447:26: warning: ‘ab8500_fg_get’ defined but not used

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# ea402401 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>


# 23a04f9f 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>


# b0284de0 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>


# a12810ab 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>


# e0f1abeb 18-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>


# 0fd0013c 10-Aug-2012 Marcus Cooper <marcus.xm.cooper@stericsson.com>

mfd: ab3100: Split ab3100 headers out of abx500.h

The U8500 has its own set of separate header, so the abx500
becomes completely abstract. Do the same split for the AB3100
legacy ASIC.

Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 72fb9220 13-Apr-2012 Linus Walleij <linus.walleij@linaro.org>

mfd/ab5500: delete AB5500 support

This platform has been obsoleted and was only available inside of
ST-Ericsson, no users of this code are left in the world. This
deletes the core U5500 support entirely in the same manner as the
obsoleted U8500 silicon was previously deleted.

Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Rabin Vincent <rabin.vincent@stericsson.com>
Cc: Jonas Aberg <jonas.aberg@stericsson.com>
Cc: Per Forlin <per.forlin@stericsson.com>
Cc: Ulf Hansson <ulf.hansson@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>


# 1668f8115 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>


# 313162d0 30-Jan-2012 Paul Gortmaker <paul.gortmaker@windriver.com>

device.h: audit and cleanup users in main include dir

The <linux/device.h> header includes a lot of stuff, and
it in turn gets a lot of use just for the basic "struct device"
which appears so often.

Clean up the users as follows:

1) For those headers only needing "struct device" as a pointer
in fcn args, replace the include with exactly that.

2) For headers not really using anything from device.h, simply
delete the include altogether.

3) For headers relying on getting device.h implicitly before
being included themselves, now explicitly include device.h

4) For files in which doing #1 or #2 uncovers an implicit
dependency on some other header, fix by explicitly adding
the required header(s).

Any C files that were implicitly relying on device.h to be
present have already been dealt with in advance.

Total removals from #1 and #2: 51. Total additions coming
from #3: 9. Total other implicit dependencies from #4: 7.

As of 3.3-rc1, there were 110, so a net removal of 42 gives
about a 38% reduction in device.h presence in include/*

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>


# 0f620837 20-Feb-2012 Linus Walleij <linus.walleij@linaro.org>

mfd: Add ab8500 version detection and enforcing

There are currently four different versions of the AB8500
around: AB8500, AB8505, AB9540 and AB8540. Unfortunately:

- Some of the chips (AB8500, AB8505, AB9540) cannot read
the AB8500_REV_REG register but return errors

- Some of them have the same ID value in the hardware
register AB8500_REV_REV, for example the first versions
of AB8505 and AB9540 have 0xFF in this register -
just like the AB8500.

So we need to be able to enforce a certain version from
the platform. We do this by using the id of the platform
device that provides the read/write functions.

Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@stericsson.com>
Signed-off-by: Alex Macro <alex.macro@stericsson.com>
Signed-off-by: Michel Jaouen <michel.jaouen@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# b958f7a7 30-Oct-2011 Linus Walleij <linus.walleij@stericsson.com>

mfd: Fix missing abx500 header file updates

I missed to include a patch adding the new silicon revision define
CUT3P3 and remove the retired CUT0 versions of AB8500. Also delete
the reference to the retired AB3550 from the header.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 8959e743 26-Sep-2011 Linus Walleij <linus.walleij@linaro.org>

mfd: Delete ab3550 driver

The AB3550 never passed the prototype stage. Instead it was used
as a precursor to AB5500 for testing basic building blocks used
in that chip, since they had large similarities. Since AB3550 will
not see the light of day in product form and since the prototypes
are no longer used, let's delete the driver and any references to
it.

Cc: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 3d5e2cab 22-Sep-2011 Mattias Wallin <mattias.wallin@stericsson.com>

mfd: ab5500 chip register access

The analog baseband chip ab5500 is a multi functional chip
containing regulators, charging, gpio, USB and accessory detect.
It also contain various multimedia functionalities like digital
encoder and audio codec.
The core driver added with this patch provides register access via
i2c via PRCMU. Event handling implemented as irq_chip will come in
future patches since it depends on PRCMU functionality not yet
implemented.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 863dde5b 07-May-2011 Linus Walleij <linus.walleij@linaro.org>

mfd: Provide ab8500-core enumerators for chip cuts

Since functionality in MFD cells may need to be adjusted according to
chip revision, let's enumerate them and keep track of them.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 1f235a37 05-Apr-2011 Samuel Ortiz <sameo@linux.intel.com>

mfd: Use mfd cell platform_data for ab3550 cells platform bits

With the addition of a platform device mfd_cell pointer, MFD drivers
can go back to passing platform data back to their sub drivers.
This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers
MFD agnostic. This is mostly needed for non MFD aware sub drivers.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 0ce5fabe 17-Feb-2011 Andres Salomon <dilinger@queued.net>

mfd: mfd_cell is now implicitly available to ab3550 driver

No clients (in mainline kernel, I'm told that drivers exist in external
trees that are planned for mainline inclusion) make use of this, nor
do they make use of platform_data, so nothing really had to change here.

The .data_size field is unused, so its usage gets removed.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# c6252e9c 22-Sep-2010 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: Declare abx500_remove_ops()

Otherwise sparse warns about a public symbol with no declaration and
the compiler can't spot if the callers and users have different signatures
for the function.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 47c16975 10-Sep-2010 Mattias Wallin <mattias.wallin@stericsson.com>

mfd: Align ab8500 with the abx500 interface

This patch makes the ab8500 mixed signal chip expose the same
interface for register access as the ab3100, ab3550 and ab5500 chip.
The ab8500_read() and ab8500_write() is removed and replaced with
abx500_get_register_interruptible() and
abx500_set_register_interruptible().

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# fa661258 01-May-2010 Mattias Wallin <mattias.wallin@stericsson.com>

mfd: AB3100 register access change to abx500 API

The interface for the AB3100 is changed to make way for the
ABX500 family of chips: AB3550, AB5500 and future ST-Ericsson
Analog Baseband chips. The register access functions are moved
out to a separate struct abx500_ops. In this way the interface
is moved from the implementation and the sub functionality drivers
can keep their interface intact when chip infrastructure and
communication mechanisms changes. We also define the AB3550
device IDs and the AB3550 platform data struct and convert
the catenated 32bit event to an array of 3 x 8bits.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 812f9e9d 01-May-2010 Linus Walleij <linus.walleij@stericsson.com>

mfd: Renamed ab3100.h to abx500.h

The goal here is to make way for a more general interface for the
analog baseband chips ab3100 ab3550 ab550 and future chips.

This patch have been divided into two parts since both changing name
and content of a file is not recommended in git.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>