Fixes this compilation error:
linux/include/linux/mfd/mcp.h:22:16: error: field 'attached_device' has incomplete type
linux/include/linux/mfd/mcp.h:48:23: error: field 'drv' has incomplete type
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
The legacy driver suspend/resume methods are no longer used, so get rid
of them.
Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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>
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>
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>
mcp_priv() does unexpected things when passed a void pointer. Make it
a typed inline function, which ensures that it works correctly in
these cases.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This reverts commit 5dd7bf59e0.
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.