aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-20 12:38:58 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-20 12:38:58 -0500
commit65f2e753f1eb09d3a7e2a0d16408a5433b4097b2 (patch)
tree100066fa2d26930a490ee10bb191957f3b3e2df3
parent216f63c41cac9f9f8f181fc19be399293c8c934e (diff)
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.
-rw-r--r--arch/arm/mach-sa1100/assabet.c1
-rw-r--r--arch/arm/mach-sa1100/cerf.c1
-rw-r--r--arch/arm/mach-sa1100/collie.c8
-rw-r--r--arch/arm/mach-sa1100/include/mach/mcp.h2
-rw-r--r--arch/arm/mach-sa1100/lart.c1
-rw-r--r--arch/arm/mach-sa1100/shannon.c1
-rw-r--r--arch/arm/mach-sa1100/simpad.c8
-rw-r--r--drivers/mfd/mcp-core.c44
-rw-r--r--drivers/mfd/mcp-sa11x0.c7
-rw-r--r--drivers/mfd/ucb1x00-core.c48
-rw-r--r--drivers/mfd/ucb1x00-ts.c2
-rw-r--r--include/linux/mfd/mcp.h7
-rw-r--r--include/linux/mfd/ucb1x00.h5
-rw-r--r--include/linux/mod_devicetable.h11
-rw-r--r--scripts/mod/file2alias.c10
15 files changed, 21 insertions, 135 deletions
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c
index d8aa1c28353..0c4b76ab4d8 100644
--- a/arch/arm/mach-sa1100/assabet.c
+++ b/arch/arm/mach-sa1100/assabet.c
@@ -202,7 +202,6 @@ static struct irda_platform_data assabet_irda_data = {
202static struct mcp_plat_data assabet_mcp_data = { 202static struct mcp_plat_data assabet_mcp_data = {
203 .mccr0 = MCCR0_ADM, 203 .mccr0 = MCCR0_ADM,
204 .sclk_rate = 11981000, 204 .sclk_rate = 11981000,
205 .codec = "ucb1x00",
206}; 205};
207 206
208static void __init assabet_init(void) 207static void __init assabet_init(void)
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c
index fcadc4cafe9..11bb6d0b9be 100644
--- a/arch/arm/mach-sa1100/cerf.c
+++ b/arch/arm/mach-sa1100/cerf.c
@@ -124,7 +124,6 @@ static void __init cerf_map_io(void)
124static struct mcp_plat_data cerf_mcp_data = { 124static struct mcp_plat_data cerf_mcp_data = {
125 .mccr0 = MCCR0_ADM, 125 .mccr0 = MCCR0_ADM,
126 .sclk_rate = 11981000, 126 .sclk_rate = 11981000,
127 .codec = "ucb1x00",
128}; 127};
129 128
130static void __init cerf_init(void) 129static void __init cerf_init(void)
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index 6b7c74b304c..b9060e236de 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -27,7 +27,6 @@
27#include <linux/timer.h> 27#include <linux/timer.h>
28#include <linux/gpio.h> 28#include <linux/gpio.h>
29#include <linux/pda_power.h> 29#include <linux/pda_power.h>
30#include <linux/mfd/ucb1x00.h>
31 30
32#include <mach/hardware.h> 31#include <mach/hardware.h>
33#include <asm/mach-types.h> 32#include <asm/mach-types.h>
@@ -86,15 +85,10 @@ static struct scoop_pcmcia_config collie_pcmcia_config = {
86 .num_devs = 1, 85 .num_devs = 1,
87}; 86};
88 87
89static struct ucb1x00_plat_data collie_ucb1x00_data = {
90 .gpio_base = COLLIE_TC35143_GPIO_BASE,
91};
92
93static struct mcp_plat_data collie_mcp_data = { 88static struct mcp_plat_data collie_mcp_data = {
94 .mccr0 = MCCR0_ADM | MCCR0_ExtClk, 89 .mccr0 = MCCR0_ADM | MCCR0_ExtClk,
95 .sclk_rate = 9216000, 90 .sclk_rate = 9216000,
96 .codec = "ucb1x00", 91 .gpio_base = COLLIE_TC35143_GPIO_BASE,
97 .codec_pdata = &collie_ucb1x00_data,
98}; 92};
99 93
100/* 94/*
diff --git a/arch/arm/mach-sa1100/include/mach/mcp.h b/arch/arm/mach-sa1100/include/mach/mcp.h
index 586cec898b3..ed1a331508a 100644
--- a/arch/arm/mach-sa1100/include/mach/mcp.h
+++ b/arch/arm/mach-sa1100/include/mach/mcp.h
@@ -17,8 +17,6 @@ struct mcp_plat_data {
17 u32 mccr1; 17 u32 mccr1;
18 unsigned int sclk_rate; 18 unsigned int sclk_rate;
19 int gpio_base; 19 int gpio_base;
20 const char *codec;
21 void *codec_pdata;
22}; 20};
23 21
24#endif 22#endif
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c
index 48a8f4ef0fc..af4e2761f3d 100644
--- a/arch/arm/mach-sa1100/lart.c
+++ b/arch/arm/mach-sa1100/lart.c
@@ -24,7 +24,6 @@
24static struct mcp_plat_data lart_mcp_data = { 24static struct mcp_plat_data lart_mcp_data = {
25 .mccr0 = MCCR0_ADM, 25 .mccr0 = MCCR0_ADM,
26 .sclk_rate = 11981000, 26 .sclk_rate = 11981000,
27 .codec = "ucb1x00",
28}; 27};
29 28
30static void __init lart_init(void) 29static void __init lart_init(void)
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c
index 3807c913527..318b2b766a0 100644
--- a/arch/arm/mach-sa1100/shannon.c
+++ b/arch/arm/mach-sa1100/shannon.c
@@ -55,7 +55,6 @@ static struct resource shannon_flash_resource = {
55static struct mcp_plat_data shannon_mcp_data = { 55static struct mcp_plat_data shannon_mcp_data = {
56 .mccr0 = MCCR0_ADM, 56 .mccr0 = MCCR0_ADM,
57 .sclk_rate = 11981000, 57 .sclk_rate = 11981000,
58 .codec = "ucb1x00",
59}; 58};
60 59
61static void __init shannon_init(void) 60static void __init shannon_init(void)
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
index d9b765c441f..e17c04d6e32 100644
--- a/arch/arm/mach-sa1100/simpad.c
+++ b/arch/arm/mach-sa1100/simpad.c
@@ -14,7 +14,6 @@
14#include <linux/mtd/partitions.h> 14#include <linux/mtd/partitions.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/gpio.h> 16#include <linux/gpio.h>
17#include <linux/mfd/ucb1x00.h>
18 17
19#include <asm/irq.h> 18#include <asm/irq.h>
20#include <mach/hardware.h> 19#include <mach/hardware.h>
@@ -188,15 +187,10 @@ static struct resource simpad_flash_resources [] = {
188 } 187 }
189}; 188};
190 189
191static struct ucb1x00_plat_data simpad_ucb1x00_data = {
192 .gpio_base = SIMPAD_UCB1X00_GPIO_BASE,
193};
194
195static struct mcp_plat_data simpad_mcp_data = { 190static struct mcp_plat_data simpad_mcp_data = {
196 .mccr0 = MCCR0_ADM, 191 .mccr0 = MCCR0_ADM,
197 .sclk_rate = 11981000, 192 .sclk_rate = 11981000,
198 .codec = "ucb1300", 193 .gpio_base = SIMPAD_UCB1X00_GPIO_BASE,
199 .codec_pdata = &simpad_ucb1x00_data,
200}; 194};
201 195
202 196
diff --git a/drivers/mfd/mcp-core.c b/drivers/mfd/mcp-core.c
index 63be60bc345..84815f9ef63 100644
--- a/drivers/mfd/mcp-core.c
+++ b/drivers/mfd/mcp-core.c
@@ -26,35 +26,9 @@
26#define to_mcp(d) container_of(d, struct mcp, attached_device) 26#define to_mcp(d) container_of(d, struct mcp, attached_device)
27#define to_mcp_driver(d) container_of(d, struct mcp_driver, drv) 27#define to_mcp_driver(d) container_of(d, struct mcp_driver, drv)
28 28
29static const struct mcp_device_id *mcp_match_id(const struct mcp_device_id *id,
30 const char *codec)
31{
32 while (id->name[0]) {
33 if (strcmp(codec, id->name) == 0)
34 return id;
35 id++;
36 }
37 return NULL;
38}
39
40const struct mcp_device_id *mcp_get_device_id(const struct mcp *mcp)
41{
42 const struct mcp_driver *driver =
43 to_mcp_driver(mcp->attached_device.driver);
44
45 return mcp_match_id(driver->id_table, mcp->codec);
46}
47EXPORT_SYMBOL(mcp_get_device_id);
48
49static int mcp_bus_match(struct device *dev, struct device_driver *drv) 29static int mcp_bus_match(struct device *dev, struct device_driver *drv)
50{ 30{
51 const struct mcp *mcp = to_mcp(dev); 31 return 1;
52 const struct mcp_driver *driver = to_mcp_driver(drv);
53
54 if (driver->id_table)
55 return !!mcp_match_id(driver->id_table, mcp->codec);
56
57 return 0;
58} 32}
59 33
60static int mcp_bus_probe(struct device *dev) 34static int mcp_bus_probe(struct device *dev)
@@ -100,18 +74,9 @@ static int mcp_bus_resume(struct device *dev)
100 return ret; 74 return ret;
101} 75}
102 76
103static int mcp_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
104{
105 struct mcp *mcp = to_mcp(dev);
106
107 add_uevent_var(env, "MODALIAS=%s%s", MCP_MODULE_PREFIX, mcp->codec);
108 return 0;
109}
110
111static struct bus_type mcp_bus_type = { 77static struct bus_type mcp_bus_type = {
112 .name = "mcp", 78 .name = "mcp",
113 .match = mcp_bus_match, 79 .match = mcp_bus_match,
114 .uevent = mcp_bus_uevent,
115 .probe = mcp_bus_probe, 80 .probe = mcp_bus_probe,
116 .remove = mcp_bus_remove, 81 .remove = mcp_bus_remove,
117 .suspend = mcp_bus_suspend, 82 .suspend = mcp_bus_suspend,
@@ -247,14 +212,9 @@ struct mcp *mcp_host_alloc(struct device *parent, size_t size)
247} 212}
248EXPORT_SYMBOL(mcp_host_alloc); 213EXPORT_SYMBOL(mcp_host_alloc);
249 214
250int mcp_host_register(struct mcp *mcp, void *pdata) 215int mcp_host_register(struct mcp *mcp)
251{ 216{
252 if (!mcp->codec)
253 return -EINVAL;
254
255 mcp->attached_device.platform_data = pdata;
256 dev_set_name(&mcp->attached_device, "mcp0"); 217 dev_set_name(&mcp->attached_device, "mcp0");
257 request_module("%s%s", MCP_MODULE_PREFIX, mcp->codec);
258 return device_register(&mcp->attached_device); 218 return device_register(&mcp->attached_device);
259} 219}
260EXPORT_SYMBOL(mcp_host_register); 220EXPORT_SYMBOL(mcp_host_register);
diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c
index da4e077a1be..02c53a0766c 100644
--- a/drivers/mfd/mcp-sa11x0.c
+++ b/drivers/mfd/mcp-sa11x0.c
@@ -146,9 +146,6 @@ static int mcp_sa11x0_probe(struct platform_device *pdev)
146 if (!data) 146 if (!data)
147 return -ENODEV; 147 return -ENODEV;
148 148
149 if (!data->codec)
150 return -ENODEV;
151
152 if (!request_mem_region(0x80060000, 0x60, "sa11x0-mcp")) 149 if (!request_mem_region(0x80060000, 0x60, "sa11x0-mcp"))
153 return -EBUSY; 150 return -EBUSY;
154 151
@@ -165,7 +162,7 @@ static int mcp_sa11x0_probe(struct platform_device *pdev)
165 mcp->dma_audio_wr = DMA_Ser4MCP0Wr; 162 mcp->dma_audio_wr = DMA_Ser4MCP0Wr;
166 mcp->dma_telco_rd = DMA_Ser4MCP1Rd; 163 mcp->dma_telco_rd = DMA_Ser4MCP1Rd;
167 mcp->dma_telco_wr = DMA_Ser4MCP1Wr; 164 mcp->dma_telco_wr = DMA_Ser4MCP1Wr;
168 mcp->codec = data->codec; 165 mcp->gpio_base = data->gpio_base;
169 166
170 platform_set_drvdata(pdev, mcp); 167 platform_set_drvdata(pdev, mcp);
171 168
@@ -198,7 +195,7 @@ static int mcp_sa11x0_probe(struct platform_device *pdev)
198 mcp->rw_timeout = (64 * 3 * 1000000 + mcp->sclk_rate - 1) / 195 mcp->rw_timeout = (64 * 3 * 1000000 + mcp->sclk_rate - 1) /
199 mcp->sclk_rate; 196 mcp->sclk_rate;
200 197
201 ret = mcp_host_register(mcp, data->codec_pdata); 198 ret = mcp_host_register(mcp);
202 if (ret == 0) 199 if (ret == 0)
203 goto out; 200 goto out;
204 201
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
index 91c4f25e0e5..b281217334e 100644
--- a/drivers/mfd/ucb1x00-core.c
+++ b/drivers/mfd/ucb1x00-core.c
@@ -36,15 +36,6 @@ static DEFINE_MUTEX(ucb1x00_mutex);
36static LIST_HEAD(ucb1x00_drivers); 36static LIST_HEAD(ucb1x00_drivers);
37static LIST_HEAD(ucb1x00_devices); 37static LIST_HEAD(ucb1x00_devices);
38 38
39static struct mcp_device_id ucb1x00_id[] = {
40 { "ucb1x00", 0 }, /* auto-detection */
41 { "ucb1200", UCB_ID_1200 },
42 { "ucb1300", UCB_ID_1300 },
43 { "tc35143", UCB_ID_TC35143 },
44 { }
45};
46MODULE_DEVICE_TABLE(mcp, ucb1x00_id);
47
48/** 39/**
49 * ucb1x00_io_set_dir - set IO direction 40 * ucb1x00_io_set_dir - set IO direction
50 * @ucb: UCB1x00 structure describing chip 41 * @ucb: UCB1x00 structure describing chip
@@ -536,33 +527,17 @@ static struct class ucb1x00_class = {
536 527
537static int ucb1x00_probe(struct mcp *mcp) 528static int ucb1x00_probe(struct mcp *mcp)
538{ 529{
539 const struct mcp_device_id *mid;
540 struct ucb1x00 *ucb; 530 struct ucb1x00 *ucb;
541 struct ucb1x00_driver *drv; 531 struct ucb1x00_driver *drv;
542 struct ucb1x00_plat_data *pdata;
543 unsigned int id; 532 unsigned int id;
544 int ret = -ENODEV; 533 int ret = -ENODEV;
545 int temp; 534 int temp;
546 535
547 mcp_enable(mcp); 536 mcp_enable(mcp);
548 id = mcp_reg_read(mcp, UCB_ID); 537 id = mcp_reg_read(mcp, UCB_ID);
549 mid = mcp_get_device_id(mcp);
550 538
551 if (mid && mid->driver_data) { 539 if (id != UCB_ID_1200 && id != UCB_ID_1300 && id != UCB_ID_TC35143) {
552 if (id != mid->driver_data) { 540 printk(KERN_WARNING "UCB1x00 ID not found: %04x\n", id);
553 printk(KERN_WARNING "%s wrong ID %04x found: %04x\n",
554 mid->name, (unsigned int) mid->driver_data, id);
555 goto err_disable;
556 }
557 } else {
558 mid = &ucb1x00_id[1];
559 while (mid->driver_data) {
560 if (id == mid->driver_data)
561 break;
562 mid++;
563 }
564 printk(KERN_WARNING "%s ID not found: %04x\n",
565 ucb1x00_id[0].name, id);
566 goto err_disable; 541 goto err_disable;
567 } 542 }
568 543
@@ -571,28 +546,28 @@ static int ucb1x00_probe(struct mcp *mcp)
571 if (!ucb) 546 if (!ucb)
572 goto err_disable; 547 goto err_disable;
573 548
574 pdata = mcp->attached_device.platform_data; 549
575 ucb->dev.class = &ucb1x00_class; 550 ucb->dev.class = &ucb1x00_class;
576 ucb->dev.parent = &mcp->attached_device; 551 ucb->dev.parent = &mcp->attached_device;
577 dev_set_name(&ucb->dev, mid->name); 552 dev_set_name(&ucb->dev, "ucb1x00");
578 553
579 spin_lock_init(&ucb->lock); 554 spin_lock_init(&ucb->lock);
580 spin_lock_init(&ucb->io_lock); 555 spin_lock_init(&ucb->io_lock);
581 sema_init(&ucb->adc_sem, 1); 556 sema_init(&ucb->adc_sem, 1);
582 557
583 ucb->id = mid; 558 ucb->id = id;
584 ucb->mcp = mcp; 559 ucb->mcp = mcp;
585 ucb->irq = ucb1x00_detect_irq(ucb); 560 ucb->irq = ucb1x00_detect_irq(ucb);
586 if (ucb->irq == NO_IRQ) { 561 if (ucb->irq == NO_IRQ) {
587 printk(KERN_ERR "%s: IRQ probe failed\n", mid->name); 562 printk(KERN_ERR "UCB1x00: IRQ probe failed\n");
588 ret = -ENODEV; 563 ret = -ENODEV;
589 goto err_free; 564 goto err_free;
590 } 565 }
591 566
592 ucb->gpio.base = -1; 567 ucb->gpio.base = -1;
593 if (pdata && (pdata->gpio_base >= 0)) { 568 if (mcp->gpio_base != 0) {
594 ucb->gpio.label = dev_name(&ucb->dev); 569 ucb->gpio.label = dev_name(&ucb->dev);
595 ucb->gpio.base = pdata->gpio_base; 570 ucb->gpio.base = mcp->gpio_base;
596 ucb->gpio.ngpio = 10; 571 ucb->gpio.ngpio = 10;
597 ucb->gpio.set = ucb1x00_gpio_set; 572 ucb->gpio.set = ucb1x00_gpio_set;
598 ucb->gpio.get = ucb1x00_gpio_get; 573 ucb->gpio.get = ucb1x00_gpio_get;
@@ -605,10 +580,10 @@ static int ucb1x00_probe(struct mcp *mcp)
605 dev_info(&ucb->dev, "gpio_base not set so no gpiolib support"); 580 dev_info(&ucb->dev, "gpio_base not set so no gpiolib support");
606 581
607 ret = request_irq(ucb->irq, ucb1x00_irq, IRQF_TRIGGER_RISING, 582 ret = request_irq(ucb->irq, ucb1x00_irq, IRQF_TRIGGER_RISING,
608 mid->name, ucb); 583 "UCB1x00", ucb);
609 if (ret) { 584 if (ret) {
610 printk(KERN_ERR "%s: unable to grab irq%d: %d\n", 585 printk(KERN_ERR "ucb1x00: unable to grab irq%d: %d\n",
611 mid->name, ucb->irq, ret); 586 ucb->irq, ret);
612 goto err_gpio; 587 goto err_gpio;
613 } 588 }
614 589
@@ -730,7 +705,6 @@ static struct mcp_driver ucb1x00_driver = {
730 .remove = ucb1x00_remove, 705 .remove = ucb1x00_remove,
731 .suspend = ucb1x00_suspend, 706 .suspend = ucb1x00_suspend,
732 .resume = ucb1x00_resume, 707 .resume = ucb1x00_resume,
733 .id_table = ucb1x00_id,
734}; 708};
735 709
736static int __init ucb1x00_init(void) 710static int __init ucb1x00_init(void)
diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c
index 40ec3c11886..38ffbd50a0d 100644
--- a/drivers/mfd/ucb1x00-ts.c
+++ b/drivers/mfd/ucb1x00-ts.c
@@ -382,7 +382,7 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev)
382 ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC; 382 ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC;
383 383
384 idev->name = "Touchscreen panel"; 384 idev->name = "Touchscreen panel";
385 idev->id.product = ts->ucb->id->driver_data; 385 idev->id.product = ts->ucb->id;
386 idev->open = ucb1x00_ts_open; 386 idev->open = ucb1x00_ts_open;
387 idev->close = ucb1x00_ts_close; 387 idev->close = ucb1x00_ts_close;
388 388
diff --git a/include/linux/mfd/mcp.h b/include/linux/mfd/mcp.h
index 1515e64e366..ee496708e38 100644
--- a/include/linux/mfd/mcp.h
+++ b/include/linux/mfd/mcp.h
@@ -10,7 +10,6 @@
10#ifndef MCP_H 10#ifndef MCP_H
11#define MCP_H 11#define MCP_H
12 12
13#include <linux/mod_devicetable.h>
14#include <mach/dma.h> 13#include <mach/dma.h>
15 14
16struct mcp_ops; 15struct mcp_ops;
@@ -27,7 +26,7 @@ struct mcp {
27 dma_device_t dma_telco_rd; 26 dma_device_t dma_telco_rd;
28 dma_device_t dma_telco_wr; 27 dma_device_t dma_telco_wr;
29 struct device attached_device; 28 struct device attached_device;
30 const char *codec; 29 int gpio_base;
31}; 30};
32 31
33struct mcp_ops { 32struct mcp_ops {
@@ -45,11 +44,10 @@ void mcp_reg_write(struct mcp *, unsigned int, unsigned int);
45unsigned int mcp_reg_read(struct mcp *, unsigned int); 44unsigned int mcp_reg_read(struct mcp *, unsigned int);
46void mcp_enable(struct mcp *); 45void mcp_enable(struct mcp *);
47void mcp_disable(struct mcp *); 46void mcp_disable(struct mcp *);
48const struct mcp_device_id *mcp_get_device_id(const struct mcp *mcp);
49#define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate) 47#define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate)
50 48
51struct mcp *mcp_host_alloc(struct device *, size_t); 49struct mcp *mcp_host_alloc(struct device *, size_t);
52int mcp_host_register(struct mcp *, void *); 50int mcp_host_register(struct mcp *);
53void mcp_host_unregister(struct mcp *); 51void mcp_host_unregister(struct mcp *);
54 52
55struct mcp_driver { 53struct mcp_driver {
@@ -58,7 +56,6 @@ struct mcp_driver {
58 void (*remove)(struct mcp *); 56 void (*remove)(struct mcp *);
59 int (*suspend)(struct mcp *, pm_message_t); 57 int (*suspend)(struct mcp *, pm_message_t);
60 int (*resume)(struct mcp *); 58 int (*resume)(struct mcp *);
61 const struct mcp_device_id *id_table;
62}; 59};
63 60
64int mcp_driver_register(struct mcp_driver *); 61int mcp_driver_register(struct mcp_driver *);
diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h
index bc19e5fb7ea..4321f044d1e 100644
--- a/include/linux/mfd/ucb1x00.h
+++ b/include/linux/mfd/ucb1x00.h
@@ -104,9 +104,6 @@
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};
110 107
111struct ucb1x00_irq { 108struct ucb1x00_irq {
112 void *devid; 109 void *devid;
@@ -119,7 +116,7 @@ struct ucb1x00 {
119 unsigned int irq; 116 unsigned int irq;
120 struct semaphore adc_sem; 117 struct semaphore adc_sem;
121 spinlock_t io_lock; 118 spinlock_t io_lock;
122 const struct mcp_device_id *id; 119 u16 id;
123 u16 io_dir; 120 u16 io_dir;
124 u16 io_out; 121 u16 io_out;
125 u16 adc_cr; 122 u16 adc_cr;
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index b29e7f6f8fa..83ac0713ed0 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -436,17 +436,6 @@ 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
450/* dmi */ 439/* dmi */
451enum dmi_field { 440enum dmi_field {
452 DMI_NONE, 441 DMI_NONE,
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index c0e14b3f230..e8c96957776 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -823,16 +823,6 @@ static int do_spi_entry(const char *filename, struct spi_device_id *id,
823} 823}
824ADD_TO_DEVTABLE("spi", struct spi_device_id, do_spi_entry); 824ADD_TO_DEVTABLE("spi", struct spi_device_id, do_spi_entry);
825 825
826/* Looks like: mcp:S */
827static int do_mcp_entry(const char *filename, struct mcp_device_id *id,
828 char *alias)
829{
830 sprintf(alias, MCP_MODULE_PREFIX "%s", id->name);
831
832 return 1;
833}
834ADD_TO_DEVTABLE("mcp", struct mcp_device_id, do_mcp_entry);
835
836static const struct dmifield { 826static const struct dmifield {
837 const char *prefix; 827 const char *prefix;
838 int field; 828 int field;