diff options
author | Jochen Friedrich <jochen@scram.de> | 2011-11-27 16:00:54 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-01-08 18:37:33 -0500 |
commit | 5dd7bf59e0e8563265b3e5b33276099ef628fcc7 (patch) | |
tree | 1372dd626865e4ed21cac103a706f06ef6ff700e /include/linux | |
parent | c9531227b289947950cce29cfe881b768bf9d7d9 (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.h | 7 | ||||
-rw-r--r-- | include/linux/mfd/ucb1x00.h | 5 | ||||
-rw-r--r-- | include/linux/mod_devicetable.h | 11 |
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 | ||
15 | struct mcp_ops; | 16 | struct 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 | ||
32 | struct mcp_ops { | 33 | struct mcp_ops { |
@@ -44,10 +45,11 @@ void mcp_reg_write(struct mcp *, unsigned int, unsigned int); | |||
44 | unsigned int mcp_reg_read(struct mcp *, unsigned int); | 45 | unsigned int mcp_reg_read(struct mcp *, unsigned int); |
45 | void mcp_enable(struct mcp *); | 46 | void mcp_enable(struct mcp *); |
46 | void mcp_disable(struct mcp *); | 47 | void mcp_disable(struct mcp *); |
48 | const 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 | ||
49 | struct mcp *mcp_host_alloc(struct device *, size_t); | 51 | struct mcp *mcp_host_alloc(struct device *, size_t); |
50 | int mcp_host_register(struct mcp *); | 52 | int mcp_host_register(struct mcp *, void *); |
51 | void mcp_host_unregister(struct mcp *); | 53 | void mcp_host_unregister(struct mcp *); |
52 | 54 | ||
53 | struct mcp_driver { | 55 | struct 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 | ||
61 | int mcp_driver_register(struct mcp_driver *); | 64 | int 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 | ||
107 | struct ucb1x00_plat_data { | ||
108 | int gpio_base; | ||
109 | }; | ||
107 | 110 | ||
108 | struct ucb1x00_irq { | 111 | struct 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 | |||
444 | struct 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 */ |
440 | enum dmi_field { | 451 | enum dmi_field { |
441 | DMI_NONE, | 452 | DMI_NONE, |