History log of /drivers/mfd/ab8500-sysctrl.c
Revision Date Author Comments
5649d8f9e335f2b093751fcc2bdd5953f79f66ef 26-Apr-2013 Fabio Baltieri <fabio.baltieri@linaro.org> mfd: ab8500-sysctrl: Let sysctrl driver work without pdata

A check for a valid plat->sysctrl was introduced in:

2377e52 mfd: ab8500-sysctrl: Error check clean up

but the driver works just fine even without that initialization data,
and enforcing it breaks existing platforms for no reason.

This patch removes the check and let the driver go ahead with probe.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
0b8ebdb18888c55588b932f4f564b9c9529de627 09-May-2013 Fabio Baltieri <fabio.baltieri@linaro.org> mfd: ab8500-sysctrl: Always enable pm_power_off handler

AB8500 sysctrl driver implements a pm_power_off handler, but that is
currently not registered until a specific platform data field is
enabled.

This patch drops the platform data field and always registers
ab8500_power_off if no other pm_power_off handler was defined before,
and also introduces the necessary cleanup code in the driver's remove
function.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
9f7af61a93fc96ae7e55d6a292f5cc7decba5ad2 26-Apr-2013 Fabio Baltieri <fabio.baltieri@linaro.org> mfd: ab8500-sysctrl: Set sysctrl_dev during probe

The driver requires sysctrl_dev to be set at probe, as it's used by
other driver functions. This was dropped by mistake in:

2377e52 mfd: ab8500-sysctrl: Error check clean up

making all driver functions fail.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
3d2088a14d949651f8b799d425ecbd684e35348b 26-Apr-2013 Fabio Baltieri <fabio.baltieri@linaro.org> mfd: ab8500-sysctrl: Fix sparse warning

Fix sparse warning:

drivers/mfd/ab8500-sysctrl.c:26:6: warning: symbol 'ab8500_power_off' was not declared. Should it be static?

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
caa62d642634e25cf4316b286abac54a70fd5a6a 03-Apr-2013 Ulf Hansson <ulf.hansson@linaro.org> mfd: ab8500: sysctrl: Initialize driver at arch_initcall

The abx500-clk driver is initiated at arch_initcall level. Moreover it
is relying on the ab8500-sysctrl API to be available. Therefore move
ab8500-sysctrl to arch_initcall level as well. The device is already
added before the abx500 clk device, thus it will be probed before as
well, which is exactly what we want.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
c55355221e259bc4d6c1dc3ebe0852afce644a40 22-Aug-2012 Rabin Vincent <rabin.vincent@stericsson.com> mfd: ab8500-sysctrl: AB8505 doesn't have SYSCLKREQ5..8

So we're removing support for it.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Tested-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
75932094601b404fc9ef28f7b6c0aa83dd619af0 12-Feb-2013 Lee Jones <lee.jones@linaro.org> mfd: ab8500-sysctrl: Add new reset function

Add a new reset function which uses the AB WD with 0 timeout.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2377e52f7ca8ebe6ba9ad0e6173915538ee4808b 18-Jun-2012 Marcus Danielsson <marcus.danielsson@stericsson.com> mfd: ab8500-sysctrl: Error check clean up

Add error checks to see if sysctrl was probed as it should.
If the sysctrl_dev is not set the return value is -EINVAL.

Signed-off-by: Marcus Danielsson <marcus.danielsson@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Tested-by: Per FORLIN <per.forlin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
f04a9d8adf766c480353c0f2427e641251c9b059 30-May-2012 Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com> mfd: ab8500-sysctrl: Update correct turn on status

In L9540, turn_on_status register is not updated correctly if
the device is rebooted with AC/USB charger connected. Due to
this, the device boots android instead of entering into charge
only mode. Read the AC/USB status register to detect the charger
presence and update the turn on status manually.

Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com>
Signed-off-by: Per Forlin <per.forlin@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Rupesh KUMAR <rupesh.kumar@stericsson.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Tested-by: Rupesh KUMAR <rupesh.kumar@stericsson.com>
Tested-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
c73db9f7a20c3b6a7026cbb70df2603aa2ce2e5a 11-Nov-2011 Jonas Aaberg <jonas.aberg@stericsson.com> mfd: ab8500-sysctrl: export read/write symbols

Export ab8500_sysctrl_read() and ab8500_sysctrl_write() symobols.

They will be used by LTP test cases.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: Bengt JONSSON <bengt.g.jonsson@stericsson.com>
1abf063ffd18e6934bb81a776b3d71278eeff4ab 27-Sep-2011 Kennet Wallden <kennet.wallden@stericsson.com> mfd: ab8500-sysctrl: Provide configuration for SysClkReqRfClkBuf registers

Add the possibility to pass configuration settings for
SysCl1kReqRfClkBuf to SysClk8ReqRfClkBuf via platform data.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Kennet Wallden <kennet.wallden@stericsson.com>
Reviewed-by: Karl-Johan PERNTZ <karl-johan.perntz@stericsson.com>
Reviewed-by: Bengt JONSSON <bengt.g.jonsson@stericsson.com>
5a4bac6e6331feb0edd9522f3c7bbb9a01571566 18-Aug-2011 Jonas Aaberg <jonas.aberg@stericsson.com> mfd: ab8500-sysctrl.c: Provide charging as reset reason

It's possible to supply a string to provide a reason for
triggering a restart. In this case our reason is to enter
charging-only mode, as a charger was found to be present.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com>
0903940dcddcaa3f567a1a2308b0c55e2ce0643b 17-Aug-2011 Jonas Aaberg <jonas.aberg@stericsson.com> mfd: ab8500-sysctrl: Only reboot into charging mode if battery type is known

When a charger is connected, we usually want AB8500 based systems to
reboot into charging-only mode. However, if the battery type cannot
be identified this would be futile, so we'll just shut the system
down instead.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com>
7c34d7c2b54818078678a6507ce9a79c3d479243 17-Aug-2011 Jonas Aaberg <jonas.aberg@stericsson.com> mfd: ab8500-sysctrl: If a charger is present, reboot instead

If a charger is attached on power off, reboot the system
into charging mode instead of powering it off.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com>
379749c46320c82df95c7909ec888da8ed1fb22c 14-Jan-2013 Lee Jones <lee.jones@linaro.org> mfd: ab8500-sysctrl: Provide a platform specific pm_power_off() call-back

The kernel allows us to specify a function call-back which will be
invoked when a system power-off request has been received. Here we
provide one which is to be used when shutting down AB8500 based
platforms.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
4740f73fe5388ab5d22d552d2a0dacc62418a70c 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> mfd: 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: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
f791be492f76dea7b0641ed227a60eeb2fa7e255 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> mfd: 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: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
84449216b01f9c2b4c9b1882f9d6abba07b7b7ca 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> mfd: 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: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
bad76991d7847b7877ae797cc79745d82ffd9120 02-Jul-2012 Lee Jones <lee.jones@linaro.org> mfd: Register ab8500 devices using the newly DT:ed MFD API

Now the MFD API is Device Tree aware we can use it for platform
registration again, even when booting with DT enabled. To aid in
Device Node pointer allocation we provide each cell with the
associative compatible string.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
01247ef7ecbf36515a1cc3c2b34e4738aab1bd40 18-May-2012 Lee Jones <lee.jones@linaro.org> mfd: Enable Device Tree support in the ab8500-sysctrl driver

This patch ensures probing of the ab8500-sysctrl driver during a DT
enabled boot, so long as the associated nodes are present in the
Device Tree binary.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
ee66e653ca7425bc8ffca4e00f19a8057cd14e4d 02-Dec-2011 Linus Walleij <linus.walleij@linaro.org> mfd: Unify abx500 headers in mfd/abx500

This moves all the header files related to the abx500 family into
a common include directory below mfd. From now on we place any
subchip header in that directory. Headers previously in e.g.
<linux/mfd/ab8500/gpio.h> get prefixed and are now e.g.
<linux/mfd/abx500/ab8500-gpio.h>. The top-level abstract interface
remains in <linux/mfd/abx500.h>.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
4e36dd331423fce1f996d93b991453a1a702ca5c 03-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com> mfd: Add module.h to the implicit drivers/mfd users

With the pending module.h cleanup, these files will fail to compile,
unless they explicitly call out the include of this file.

[omap-usb-host addition courtesy of Anand Gadiyar <gadiyar@ti.com>]

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
90550d1903da8dac851d220b794e44c90a11c6ce 14-Feb-2011 Mattias Nilsson <mattias.i.nilsson@stericsson.com> mfd: AB8500 system control driver

This adds a pretty straight-forward system control driver for the
AB8500. This driver will be used from the core platform, e.g the
clock tree implementation in the machine code, and is by nature
singleton.

There are a few simple functions to read, write, set and clear
registers so that the machine code can control its own foundation.

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