History log of /drivers/mfd/mcp-sa11x0.c
Revision Date Author Comments
9ffc93f203c18a70623f21950f1dd473c9ec48cd 28-Mar-2012 David Howells <dhowells@redhat.com> Remove all #inclusions of asm/system.h

Remove all #inclusions of asm/system.h preparatory to splitting and killing
it. Performed with the following command:

perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *`

Signed-off-by: David Howells <dhowells@redhat.com>
6ed3e2acc7995625625592abe8cd3383c34a471b 22-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk> MFD: mcp-sa11x0/assabet: move assabet reset handling out of mcp-sa11x0.c

Move the assabet specific reset handling out of mcp-sa11x0.c, into its
board file. This leaves the mcp code free from all board specific
details.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
a4b54acf9e691a3051950444d33980741e7d63a8 21-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk> MFD: mcp-sa11x0: complain if mcp clock is left enabled

Issue a warning if the mcp clock was left enabled by some driver when
we're suspending or tearing down the core driver for the device. This
is an aid for debugging missing disable calls.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
abe06082d07fcb0673cb93338c1d6f037fdc375b 20-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk> MFD: mcp/ucb1x00: separate ucb1x00 driver data from the MCP data

Patch taken from 5dd7bf59e0 (ARM: sa11x0: Implement autoloading of codec
and codec pdata for mcp bus.) by Jochen Friedrich <jochen@scram.de>.

This adds just the codec data part of the patch.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
a6aecae29affdd1a84198afe45ef9e13ecbf9826 21-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk> MFD: mcp-sa11x0: use _noirq resume methods

The genirq code requires early access to interrupt controllers. In
order to allow this, we need to resume the MCP via the _noirq methods
instead of the standard methods.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2796e397373a15ece69267ed1bbb9f61435a3ac7 21-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk> MFD: mcp-sa11x0: convert to use dev_pm_ops

Convert the sa11x0 MCP driver to use dev_pm_ops rather than the legacy
members in the platform driver.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
45c7f75fd4b57035cd35954986a2faefb07dac9d 21-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk> MFD: mcp-sa11x0: convert mcp-sa11x0 to use platform resources

Patch taken from af9081ae64 (ARM: sa1100: Refactor mcp-sa11x0 to use
platform resources.) by Jochen Friedrich <jochen@scram.de>, and fixes
applied.

We can safely do this now that we have sanitized host removal; the
original patch had use-after-free bugs in the removal code. Not only
that, but there was no checking of the ioremap() return.

The final change over Jochen's patch is that we wrap the base pointer
selection inside the various register indexes, which reduces the
possibility of the wrong register index being used.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
c4592ce4e8f69d78711d53f0a42ec1b4dbf00cde 20-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk> MFD: mcp-sa11x0: add .owner initializer

Patch partly taken from af9081ae64 (ARM: sa1100: Refactor mcp-sa11x0 to
use platform resources.) by Jochen Friedrich <jochen@scram.de>

Move the MODULE_ALIAS() alongside the other MODULE_* definitions, and
use DRIVER_NAME to ensure that the driver is consistently named.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
e36e26a8b761d1a601e284e2b5d8aff84de3b756 20-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk> MFD: mcp-sa11x0: move setup of PPC unit out of mcp-sa11x0.c

Patch taken from af9081ae64 (ARM: sa1100: Refactor mcp-sa11x0 to use
platform resources.) by Jochen Friedrich <jochen@scram.de>, and
consolidated to use a common function.

Move the setup of the PPC unit out of mcp-sa11x0 into the core SA11x0
code, and call it from each platforms initialization file. This
centralizes the setup of the PPC unit while not polluting the mcp-sa11x0
driver with these details.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
7658e7f9a8122b0678e4b4280308560aa5444bd5 12-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk> MFD: mcp-sa11x0: remove DMA initializers and variables

The dma_device_t variables are only ever written to by mcp-sa11x0 and
never read. As the old SA11x0 DMA support will be removed, remove
these so that it no longer depends on the old SA11x0 DMA definitions.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
30816ac0495cb4f33fc8d748f64ac3cc880cb3c1 20-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk> MFD: mcp-core: sanitize host creation/removal

host_unregister() gives us no chance between removing the device
and the mcp data structure being freed to access the data inbetween,
which drivers may need to do if they need to iounmap() pointers in
their private data structures.

Therefore, re-jig the interfaces, which are now, on creation:

mcp = mcp_host_alloc()
if (mcp) {
ret = mcp_host_add(mcp, data);

if (!ret)
mcp_host_free(mcp);
}

and on removal:

mcp_host_del(mcp);
... access mcp ...
mcp_host_free(mcp);

The free does the final put_device() on the struct device as one would
expect.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
65f2e753f1eb09d3a7e2a0d16408a5433b4097b2 20-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk> Revert "ARM: sa11x0: Implement autoloading of codec and codec pdata for mcp bus."

This reverts commit 5dd7bf59e0e8563265b3e5b33276099ef628fcc7.

Conflicts:

scripts/mod/file2alias.c

This change is wrong on many levels. First and foremost, it causes a
regression. On boot on Assabet, which this patch gives a codec id of
'ucb1x00', it gives:

ucb1x00 ID not found: 1005

0x1005 is a valid ID for the UCB1300 device.

Secondly, this patch is way over the top in terms of complexity. The
only device which has been seen to be connected with this MCP code is
the UCB1x00 (UCB1200, UCB1300 etc) devices, and they all use the same
driver. Adding a match table, requiring the codec string to match the
hardware ID read out of the ID register, etc is completely over the top
when we can just read the hardware ID register.
216f63c41cac9f9f8f181fc19be399293c8c934e 20-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk> Revert "ARM: sa1100: Refactor mcp-sa11x0 to use platform resources."

This reverts commit af9081ae64b941d32239b947882cd59ba855c5db.

This revert is necessary to revert 5dd7bf59e0e8563265b3e5b33276099ef628fcc7.
af9081ae64b941d32239b947882cd59ba855c5db 27-Nov-2011 Jochen Friedrich <jochen@scram.de> ARM: sa1100: Refactor mcp-sa11x0 to use platform resources.

Make use of memory resources rather than hardcoded IO adresses.
This is a first step towards DT support.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
5dd7bf59e0e8563265b3e5b33276099ef628fcc7 27-Nov-2011 Jochen Friedrich <jochen@scram.de> ARM: sa11x0: Implement autoloading of codec and codec pdata for mcp bus.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
65349d60d27e850c94544567c91ab1be3e4c0777 23-Nov-2011 Mark Brown <broonie@opensource.wolfsonmicro.com> mfd: Convert MFD drivers to use module_platform_driver

Factors out some boilerplate code for drivers doing the default thing
for platform driver registration. Drivers using platform_driver_probe
or an initcall other than module_init can't be converted.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
9ca3dc805cd0d89c44f88b9a399061946781323a 10-Feb-2009 Thomas Kunze <thommycheck@gmx.de> add gpiolib support to ucb1x00

The old access methods to the gpios will be removed when
all users has been converted. (mainly ucb1x00-ts)
c8602edf3f9471466755329b78d309f2a01dd449 10-Feb-2009 Thomas Kunze <thommycheck@gmx.de> move drivers/mfd/*.h to include/linux/mfd

So drivers like collie_battery driver can use
those files easier.
dcea83adc666061864b82c96e059dffe7268b512 29-Nov-2008 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Hide ISA DMA API when ISA_DMA_API is unset

When ISA_DMA_API is unset, we're not implementing the ISA DMA API,
so there's no point in publishing the prototypes via asm/dma.h, nor
including the machine dependent parts of that API.

This allows us to remove a lot of mach/dma.h files which don't contain
any useful code. Unfortunately though, some platforms put their own
private non-ISA definitions into mach/dma.h, so we leave these behind
and fix the appropriate #include statments.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
a09e64fbc0094e3073dbb09c3b4bfe4ab669244b 05-Aug-2008 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach

This just leaves include/asm-arm/plat-* to deal with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
be509729356b7433f73df2b9a966674a437fbbc1 04-Aug-2008 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Remove asm/hardware.h, use asm/arch/hardware.h instead

Remove includes of asm/hardware.h in addition to asm/arch/hardware.h.
Then, since asm/hardware.h only exists to include asm/arch/hardware.h,
update everything to directly include asm/arch/hardware.h and remove
asm/hardware.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
4f46d6e7e5ffbce0ee1d1a80767fdf45e56cc863 25-Jul-2008 Kay Sievers <kay.sievers@vrfy.org> mfd: fix platform driver hotplug/coldplug

Since 43cc71eed1250755986da4c0f9898f9a635cb3bf (platform: prefix MODALIAS
with "platform:"), the platform modalias is prefixed with "platform:".
Add MODULE_ALIAS() to the MFD platform drivers, to re-enable auto loading.

[dbrownell@users.sourceforge.net: one was missing]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg KH <greg@kroah.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 09-Nov-2005 Russell King <rmk@dyn-67.arm.linux.org.uk> [DRIVER MODEL] Convert platform drivers to use struct platform_driver

This allows us to eliminate the casts in the drivers, and eventually
remove the use of the device_driver function pointer methods for
platform device drivers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
d052d1beff706920e82c5d55006b08e256b5df09 29-Oct-2005 Russell King <rmk@dyn-67.arm.linux.org.uk> Create platform_device.h to contain all the platform device details.
Convert everyone who uses platform_bus_type to include
linux/platform_device.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
9480e307cd88ef09ec9294c7d97ebec18e6d2221 28-Oct-2005 Russell King <rmk@arm.linux.org.uk> [PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks

In PM v1, all devices were called at SUSPEND_DISABLE level. Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level. However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.

Since this is obsolete infrastructure which is no longer necessary,
we can remove it. Here's an (untested) patch to do exactly that.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
323cdfc191b7c1597dc748175062c368568d6af4 18-Aug-2005 Russell King <rmk@dyn-67.arm.linux.org.uk> [MFD] Add SA11x0 MCP platform device support

Add platform device data for the SA11x0 MCP device. This allows
platforms to customise the configuration of the SA11x0 MCP device
according to their needs.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
5e742ad66b4a8ba6f9d729660f822676d9e405d4 18-Aug-2005 Russell King <rmk@dyn-67.arm.linux.org.uk> [MFD] Add SA11x0 MCP support

This adds support for the MCP interface found on SA11x0 devices.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>