aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJochen Friedrich <jochen@scram.de>2011-11-27 16:00:54 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-08 18:37:33 -0500
commit5dd7bf59e0e8563265b3e5b33276099ef628fcc7 (patch)
tree1372dd626865e4ed21cac103a706f06ef6ff700e /include/linux
parentc9531227b289947950cce29cfe881b768bf9d7d9 (diff)
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/mcp.h7
-rw-r--r--include/linux/mfd/ucb1x00.h5
-rw-r--r--include/linux/mod_devicetable.h11
3 files changed, 20 insertions, 3 deletions
diff --git a/include/linux/mfd/mcp.h b/include/linux/mfd/mcp.h
index ee496708e38b..1515e64e3663 100644
--- a/include/linux/mfd/mcp.h
+++ b/include/linux/mfd/mcp.h
@@ -10,6 +10,7 @@
10#ifndef MCP_H 10#ifndef MCP_H
11#define MCP_H 11#define MCP_H
12 12
13#include <linux/mod_devicetable.h>
13#include <mach/dma.h> 14#include <mach/dma.h>
14 15
15struct mcp_ops; 16struct mcp_ops;
@@ -26,7 +27,7 @@ struct mcp {
26 dma_device_t dma_telco_rd; 27 dma_device_t dma_telco_rd;
27 dma_device_t dma_telco_wr; 28 dma_device_t dma_telco_wr;
28 struct device attached_device; 29 struct device attached_device;
29 int gpio_base; 30 const char *codec;
30}; 31};
31 32
32struct mcp_ops { 33struct mcp_ops {
@@ -44,10 +45,11 @@ void mcp_reg_write(struct mcp *, unsigned int, unsigned int);
44unsigned int mcp_reg_read(struct mcp *, unsigned int); 45unsigned int mcp_reg_read(struct mcp *, unsigned int);
45void mcp_enable(struct mcp *); 46void mcp_enable(struct mcp *);
46void mcp_disable(struct mcp *); 47void mcp_disable(struct mcp *);
48const struct mcp_device_id *mcp_get_device_id(const struct mcp *mcp);
47#define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate) 49#define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate)
48 50
49struct mcp *mcp_host_alloc(struct device *, size_t); 51struct mcp *mcp_host_alloc(struct device *, size_t);
50int mcp_host_register(struct mcp *); 52int mcp_host_register(struct mcp *, void *);
51void mcp_host_unregister(struct mcp *); 53void mcp_host_unregister(struct mcp *);
52 54
53struct mcp_driver { 55struct mcp_driver {
@@ -56,6 +58,7 @@ struct mcp_driver {
56 void (*remove)(struct mcp *); 58 void (*remove)(struct mcp *);
57 int (*suspend)(struct mcp *, pm_message_t); 59 int (*suspend)(struct mcp *, pm_message_t);
58 int (*resume)(struct mcp *); 60 int (*resume)(struct mcp *);
61 const struct mcp_device_id *id_table;
59}; 62};
60 63
61int mcp_driver_register(struct mcp_driver *); 64int mcp_driver_register(struct mcp_driver *);
diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h
index 4321f044d1e4..bc19e5fb7ea8 100644
--- a/include/linux/mfd/ucb1x00.h
+++ b/include/linux/mfd/ucb1x00.h
@@ -104,6 +104,9 @@
104#define UCB_MODE_DYN_VFLAG_ENA (1 << 12) 104#define UCB_MODE_DYN_VFLAG_ENA (1 << 12)
105#define UCB_MODE_AUD_OFF_CAN (1 << 13) 105#define UCB_MODE_AUD_OFF_CAN (1 << 13)
106 106
107struct ucb1x00_plat_data {
108 int gpio_base;
109};
107 110
108struct ucb1x00_irq { 111struct ucb1x00_irq {
109 void *devid; 112 void *devid;
@@ -116,7 +119,7 @@ struct ucb1x00 {
116 unsigned int irq; 119 unsigned int irq;
117 struct semaphore adc_sem; 120 struct semaphore adc_sem;
118 spinlock_t io_lock; 121 spinlock_t io_lock;
119 u16 id; 122 const struct mcp_device_id *id;
120 u16 io_dir; 123 u16 io_dir;
121 u16 io_out; 124 u16 io_out;
122 u16 adc_cr; 125 u16 adc_cr;
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 468819cdde87..bc50d9a80d89 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -436,6 +436,17 @@ struct spi_device_id {
436 __attribute__((aligned(sizeof(kernel_ulong_t)))); 436 __attribute__((aligned(sizeof(kernel_ulong_t))));
437}; 437};
438 438
439/* mcp */
440
441#define MCP_NAME_SIZE 20
442#define MCP_MODULE_PREFIX "mcp:"
443
444struct mcp_device_id {
445 char name[MCP_NAME_SIZE];
446 kernel_ulong_t driver_data /* Data private to the driver */
447 __attribute__((aligned(sizeof(kernel_ulong_t))));
448};
449
439/* dmi */ 450/* dmi */
440enum dmi_field { 451enum dmi_field {
441 DMI_NONE, 452 DMI_NONE,