4 * I2C adapter for the PXA I2C bus access.
6 * Copyright (C) 2002 Intrinsyc Software Inc.
7 * Copyright (C) 2004-2005 Deep Blue Solutions Ltd.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
14 * Apr 2002: Initial version [CS]
15 * Jun 2002: Properly seperated algo/adap [FB]
16 * Jan 2003: Fixed several bugs concerning interrupt handling [Kai-Uwe Bloem]
17 * Jan 2003: added limited signal handling [Kai-Uwe Bloem]
18 * Sep 2004: Major rework to ensure efficient bus handling [RMK]
19 * Dec 2004: Added support for PXA27x and slave device probing [Liam Girdwood]
20 * Feb 2005: Rework slave mode handling [RMK]
22 #include <linux/kernel.h>
23 #include <linux/module.h>
24 #include <linux/i2c.h>
25 #include <linux/i2c-id.h>
26 #include <linux/init.h>
27 #include <linux/time.h>
28 #include <linux/sched.h>
29 #include <linux/delay.h>
30 #include <linux/errno.h>
31 #include <linux/interrupt.h>
32 #include <linux/i2c-pxa.h>
34 #include <asm/hardware.h>
36 #include <asm/arch/i2c.h>
37 #include <asm/arch/pxa-regs.h>
41 wait_queue_head_t wait;
46 unsigned int slave_addr;
48 struct i2c_adapter adap;
49 #ifdef CONFIG_I2C_PXA_SLAVE
50 struct i2c_slave_client *slave;
53 unsigned int irqlogidx;
59 * I2C Slave mode address
61 #define I2C_PXA_SLAVE_ADDR 0x1
64 * Set this to zero to remove all debug statements via dead code elimination.
69 #define DBGLVL KERN_INFO
71 #define DBGLVL KERN_DEBUG
81 #define BIT(m, s, u) { .mask = m, .set = s, .unset = u }
84 decode_bits(const char *prefix, const struct bits *bits, int num, u32 val)
86 printk("%s %08x: ", prefix, val);
88 const char *str = val & bits->mask ? bits->set : bits->unset;
95 static const struct bits isr_bits[] = {
96 BIT(ISR_RWM, "RX", "TX"),
97 BIT(ISR_ACKNAK, "NAK", "ACK"),
98 BIT(ISR_UB, "Bsy", "Rdy"),
99 BIT(ISR_IBB, "BusBsy", "BusRdy"),
100 BIT(ISR_SSD, "SlaveStop", NULL),
101 BIT(ISR_ALD, "ALD", NULL),
102 BIT(ISR_ITE, "TxEmpty", NULL),
103 BIT(ISR_IRF, "RxFull", NULL),
104 BIT(ISR_GCAD, "GenCall", NULL),
105 BIT(ISR_SAD, "SlaveAddr", NULL),
106 BIT(ISR_BED, "BusErr", NULL),
109 static void decode_ISR(unsigned int val)
111 decode_bits(DBGLVL "ISR", isr_bits, ARRAY_SIZE(isr_bits), val);
115 static const struct bits icr_bits[] = {
116 BIT(ICR_START, "START", NULL),
117 BIT(ICR_STOP, "STOP", NULL),
118 BIT(ICR_ACKNAK, "ACKNAK", NULL),
119 BIT(ICR_TB, "TB", NULL),
120 BIT(ICR_MA, "MA", NULL),
121 BIT(ICR_SCLE, "SCLE", "scle"),
122 BIT(ICR_IUE, "IUE", "iue"),
123 BIT(ICR_GCD, "GCD", NULL),
124 BIT(ICR_ITEIE, "ITEIE", NULL),
125 BIT(ICR_IRFIE, "IRFIE", NULL),
126 BIT(ICR_BEIE, "BEIE", NULL),
127 BIT(ICR_SSDIE, "SSDIE", NULL),
128 BIT(ICR_ALDIE, "ALDIE", NULL),
129 BIT(ICR_SADIE, "SADIE", NULL),
130 BIT(ICR_UR, "UR", "ur"),
133 static void decode_ICR(unsigned int val)
135 decode_bits(DBGLVL "ICR", icr_bits, ARRAY_SIZE(icr_bits), val);
139 static unsigned int i2c_debug = DEBUG;
141 static void i2c_pxa_show_state(struct pxa_i2c *i2c, int lno, const char *fname)
143 printk(DBGLVL "state:%s:%d: ISR=%08x, ICR=%08x, IBMR=%02x\n", fname, lno, ISR, ICR, IBMR);
146 #define show_state(i2c) i2c_pxa_show_state(i2c, __LINE__, __FUNCTION__)
150 #define show_state(i2c) do { } while (0)
151 #define decode_ISR(val) do { } while (0)
152 #define decode_ICR(val) do { } while (0)
155 #define eedbg(lvl, x...) do { if ((lvl) < 1) { printk(DBGLVL "" x); } } while(0)
157 static void i2c_pxa_master_complete(struct pxa_i2c *i2c, int ret);
159 static void i2c_pxa_scream_blue_murder(struct pxa_i2c *i2c, const char *why)
162 printk("i2c: error: %s\n", why);
163 printk("i2c: msg_num: %d msg_idx: %d msg_ptr: %d\n",
164 i2c->msg_num, i2c->msg_idx, i2c->msg_ptr);
165 printk("i2c: ICR: %08x ISR: %08x\ni2c: log: ", ICR, ISR);
166 for (i = 0; i < i2c->irqlogidx; i++)
167 printk("[%08x:%08x] ", i2c->isrlog[i], i2c->icrlog[i]);
171 static inline int i2c_pxa_is_slavemode(struct pxa_i2c *i2c)
173 return !(ICR & ICR_SCLE);
176 static void i2c_pxa_abort(struct pxa_i2c *i2c)
178 unsigned long timeout = jiffies + HZ/4;
180 if (i2c_pxa_is_slavemode(i2c)) {
181 printk(DBGLVL "i2c_pxa_transfer: called in slave mode\n");
185 while (time_before(jiffies, timeout) && (IBMR & 0x1) == 0) {
186 unsigned long icr = ICR;
189 icr |= ICR_ACKNAK | ICR_STOP | ICR_TB;
198 ICR &= ~(ICR_MA | ICR_START | ICR_STOP);
201 static int i2c_pxa_wait_bus_not_busy(struct pxa_i2c *i2c)
203 int timeout = DEF_TIMEOUT;
205 while (timeout-- && ISR & (ISR_IBB | ISR_UB)) {
206 if ((ISR & ISR_SAD) != 0)
216 return timeout <= 0 ? I2C_RETRY : 0;
219 static int i2c_pxa_wait_master(struct pxa_i2c *i2c)
221 unsigned long timeout = jiffies + HZ*4;
223 while (time_before(jiffies, timeout)) {
225 printk(DBGLVL "i2c_pxa_wait_master: %ld: ISR=%08x, ICR=%08x, IBMR=%02x\n",
226 (long)jiffies, ISR, ICR, IBMR);
230 printk(DBGLVL "i2c_pxa_wait_master: Slave detected\n");
234 /* wait for unit and bus being not busy, and we also do a
235 * quick check of the i2c lines themselves to ensure they've
238 if ((ISR & (ISR_UB | ISR_IBB)) == 0 && IBMR == 3) {
240 printk(DBGLVL "i2c_pxa_wait_master: done\n");
248 printk(DBGLVL "i2c_pxa_wait_master: did not free\n");
253 static int i2c_pxa_set_master(struct pxa_i2c *i2c)
256 printk(DBGLVL "I2C: setting to bus master\n");
258 if ((ISR & (ISR_UB | ISR_IBB)) != 0) {
259 printk(DBGLVL "set_master: unit is busy\n");
260 if (!i2c_pxa_wait_master(i2c)) {
261 printk(DBGLVL "set_master: error: unit busy\n");
270 #ifdef CONFIG_I2C_PXA_SLAVE
271 static int i2c_pxa_wait_slave(struct pxa_i2c *i2c)
273 unsigned long timeout = jiffies + HZ*1;
279 while (time_before(jiffies, timeout)) {
281 printk(DBGLVL "i2c_pxa_wait_slave: %ld: ISR=%08x, ICR=%08x, IBMR=%02x\n",
282 (long)jiffies, ISR, ICR, IBMR);
284 if ((ISR & (ISR_UB|ISR_IBB|ISR_SAD)) == ISR_SAD ||
285 (ICR & ICR_SCLE) == 0) {
287 printk(DBGLVL "i2c_pxa_wait_slave: done\n");
295 printk(DBGLVL "i2c_pxa_wait_slave: did not free\n");
300 * clear the hold on the bus, and take of anything else
301 * that has been configured
303 static void i2c_pxa_set_slave(struct pxa_i2c *i2c, int errcode)
308 udelay(100); /* simple delay */
310 /* we need to wait for the stop condition to end */
312 /* if we where in stop, then clear... */
313 if (ICR & ICR_STOP) {
318 if (!i2c_pxa_wait_slave(i2c)) {
319 printk(KERN_ERR "i2c_pxa_set_slave: wait timedout\n");
324 ICR &= ~(ICR_STOP|ICR_ACKNAK|ICR_MA);
328 printk(DBGLVL "ICR now %08x, ISR %08x\n", ICR, ISR);
333 #define i2c_pxa_set_slave(i2c, err) do { } while (0)
336 static void i2c_pxa_reset(struct pxa_i2c *i2c)
338 pr_debug("Resetting I2C Controller Unit\n");
340 /* abort any transfer currently under way */
343 /* reset according to 9.8 */
348 ISAR = i2c->slave_addr;
350 /* set control register values */
353 #ifdef CONFIG_I2C_PXA_SLAVE
354 printk(KERN_INFO "I2C: Enabling slave mode\n");
355 ICR |= ICR_SADIE | ICR_ALDIE | ICR_SSDIE;
358 i2c_pxa_set_slave(i2c, 0);
366 #ifdef CONFIG_I2C_PXA_SLAVE
368 * I2C EEPROM emulation.
370 static struct i2c_eeprom_emu eeprom = {
371 .size = I2C_EEPROM_EMU_SIZE,
372 .watch = LIST_HEAD_INIT(eeprom.watch),
375 struct i2c_eeprom_emu *i2c_pxa_get_eeprom(void)
380 int i2c_eeprom_emu_addwatcher(struct i2c_eeprom_emu *emu, void *data,
381 unsigned int addr, unsigned int size,
382 struct i2c_eeprom_emu_watcher *watcher)
384 struct i2c_eeprom_emu_watch *watch;
387 if (addr + size > emu->size)
390 watch = kmalloc(sizeof(struct i2c_eeprom_emu_watch), GFP_KERNEL);
393 watch->end = addr + size - 1;
394 watch->ops = watcher;
397 local_irq_save(flags);
398 list_add(&watch->node, &emu->watch);
399 local_irq_restore(flags);
402 return watch ? 0 : -ENOMEM;
405 void i2c_eeprom_emu_delwatcher(struct i2c_eeprom_emu *emu, void *data,
406 struct i2c_eeprom_emu_watcher *watcher)
408 struct i2c_eeprom_emu_watch *watch, *n;
411 list_for_each_entry_safe(watch, n, &emu->watch, node) {
412 if (watch->ops == watcher && watch->data == data) {
413 local_irq_save(flags);
414 list_del(&watch->node);
415 local_irq_restore(flags);
421 static void i2c_eeprom_emu_event(void *ptr, i2c_slave_event_t event)
423 struct i2c_eeprom_emu *emu = ptr;
425 eedbg(3, "i2c_eeprom_emu_event: %d\n", event);
428 case I2C_SLAVE_EVENT_START_WRITE:
430 eedbg(2, "i2c_eeprom: write initiated\n");
433 case I2C_SLAVE_EVENT_START_READ:
435 eedbg(2, "i2c_eeprom: read initiated\n");
438 case I2C_SLAVE_EVENT_STOP:
440 eedbg(2, "i2c_eeprom: received stop\n");
444 eedbg(0, "i2c_eeprom: unhandled event\n");
449 static int i2c_eeprom_emu_read(void *ptr)
451 struct i2c_eeprom_emu *emu = ptr;
454 ret = emu->bytes[emu->ptr];
455 emu->ptr = (emu->ptr + 1) % emu->size;
460 static void i2c_eeprom_emu_write(void *ptr, unsigned int val)
462 struct i2c_eeprom_emu *emu = ptr;
463 struct i2c_eeprom_emu_watch *watch;
465 if (emu->seen_start != 0) {
466 eedbg(2, "i2c_eeprom_emu_write: setting ptr %02x\n", val);
472 emu->bytes[emu->ptr] = val;
474 eedbg(1, "i2c_eeprom_emu_write: ptr=0x%02x, val=0x%02x\n",
477 list_for_each_entry(watch, &emu->watch, node) {
478 if (!watch->ops || !watch->ops->write)
480 if (watch->start <= emu->ptr && watch->end >= emu->ptr)
481 watch->ops->write(watch->data, emu->ptr, val);
484 emu->ptr = (emu->ptr + 1) % emu->size;
487 struct i2c_slave_client eeprom_client = {
489 .event = i2c_eeprom_emu_event,
490 .read = i2c_eeprom_emu_read,
491 .write = i2c_eeprom_emu_write
498 static void i2c_pxa_slave_txempty(struct pxa_i2c *i2c, u32 isr)
501 /* what should we do here? */
503 int ret = i2c->slave->read(i2c->slave->data);
506 ICR |= ICR_TB; /* allow next byte */
510 static void i2c_pxa_slave_rxfull(struct pxa_i2c *i2c, u32 isr)
512 unsigned int byte = IDBR;
514 if (i2c->slave != NULL)
515 i2c->slave->write(i2c->slave->data, byte);
520 static void i2c_pxa_slave_start(struct pxa_i2c *i2c, u32 isr)
525 printk(DBGLVL "I2C: SAD, mode is slave-%cx\n",
526 (isr & ISR_RWM) ? 'r' : 't');
528 if (i2c->slave != NULL)
529 i2c->slave->event(i2c->slave->data,
530 (isr & ISR_RWM) ? I2C_SLAVE_EVENT_START_READ : I2C_SLAVE_EVENT_START_WRITE);
533 * slave could interrupt in the middle of us generating a
534 * start condition... if this happens, we'd better back off
535 * and stop holding the poor thing up
537 ICR &= ~(ICR_START|ICR_STOP);
549 printk(KERN_ERR "timeout waiting for SCL high\n");
557 static void i2c_pxa_slave_stop(struct pxa_i2c *i2c)
560 printk(DBGLVL "ISR: SSD (Slave Stop)\n");
562 if (i2c->slave != NULL)
563 i2c->slave->event(i2c->slave->data, I2C_SLAVE_EVENT_STOP);
566 printk(DBGLVL "ISR: SSD (Slave Stop) acked\n");
569 * If we have a master-mode message waiting,
570 * kick it off now that the slave has completed.
573 i2c_pxa_master_complete(i2c, I2C_RETRY);
576 static void i2c_pxa_slave_txempty(struct pxa_i2c *i2c, u32 isr)
579 /* what should we do here? */
586 static void i2c_pxa_slave_rxfull(struct pxa_i2c *i2c, u32 isr)
588 ICR |= ICR_TB | ICR_ACKNAK;
591 static void i2c_pxa_slave_start(struct pxa_i2c *i2c, u32 isr)
596 * slave could interrupt in the middle of us generating a
597 * start condition... if this happens, we'd better back off
598 * and stop holding the poor thing up
600 ICR &= ~(ICR_START|ICR_STOP);
601 ICR |= ICR_TB | ICR_ACKNAK;
612 printk(KERN_ERR "timeout waiting for SCL high\n");
620 static void i2c_pxa_slave_stop(struct pxa_i2c *i2c)
623 i2c_pxa_master_complete(i2c, I2C_RETRY);
628 * PXA I2C Master mode
631 static inline unsigned int i2c_pxa_addr_byte(struct i2c_msg *msg)
633 unsigned int addr = (msg->addr & 0x7f) << 1;
635 if (msg->flags & I2C_M_RD)
641 static inline void i2c_pxa_start_message(struct pxa_i2c *i2c)
646 * Step 1: target slave address into IDBR
648 IDBR = i2c_pxa_addr_byte(i2c->msg);
651 * Step 2: initiate the write.
653 icr = ICR & ~(ICR_STOP | ICR_ALDIE);
654 ICR = icr | ICR_START | ICR_TB;
658 * We are protected by the adapter bus semaphore.
660 static int i2c_pxa_do_xfer(struct pxa_i2c *i2c, struct i2c_msg *msg, int num)
666 * Wait for the bus to become free.
668 ret = i2c_pxa_wait_bus_not_busy(i2c);
670 printk(KERN_INFO "i2c_pxa: timeout waiting for bus free\n");
677 ret = i2c_pxa_set_master(i2c);
679 printk(KERN_INFO "i2c_pxa_set_master: error %d\n", ret);
683 spin_lock_irq(&i2c->lock);
691 i2c_pxa_start_message(i2c);
693 spin_unlock_irq(&i2c->lock);
696 * The rest of the processing occurs in the interrupt handler.
698 timeout = wait_event_timeout(i2c->wait, i2c->msg_num == 0, HZ * 5);
701 * We place the return code in i2c->msg_idx.
706 i2c_pxa_scream_blue_murder(i2c, "timeout");
713 * i2c_pxa_master_complete - complete the message and wake up.
715 static void i2c_pxa_master_complete(struct pxa_i2c *i2c, int ret)
726 static void i2c_pxa_irq_txempty(struct pxa_i2c *i2c, u32 isr)
728 u32 icr = ICR & ~(ICR_START|ICR_STOP|ICR_ACKNAK|ICR_TB);
732 * If ISR_ALD is set, we lost arbitration.
736 * Do we need to do anything here? The PXA docs
737 * are vague about what happens.
739 i2c_pxa_scream_blue_murder(i2c, "ALD set");
742 * We ignore this error. We seem to see spurious ALDs
743 * for seemingly no reason. If we handle them as I think
744 * they should, we end up causing an I2C error, which
745 * is painful for some systems.
754 * I2C bus error - either the device NAK'd us, or
755 * something more serious happened. If we were NAK'd
756 * on the initial address phase, we can retry.
758 if (isr & ISR_ACKNAK) {
759 if (i2c->msg_ptr == 0 && i2c->msg_idx == 0)
764 i2c_pxa_master_complete(i2c, ret);
765 } else if (isr & ISR_RWM) {
767 * Read mode. We have just sent the address byte, and
768 * now we must initiate the transfer.
770 if (i2c->msg_ptr == i2c->msg->len - 1 &&
771 i2c->msg_idx == i2c->msg_num - 1)
772 icr |= ICR_STOP | ICR_ACKNAK;
774 icr |= ICR_ALDIE | ICR_TB;
775 } else if (i2c->msg_ptr < i2c->msg->len) {
777 * Write mode. Write the next data byte.
779 IDBR = i2c->msg->buf[i2c->msg_ptr++];
781 icr |= ICR_ALDIE | ICR_TB;
784 * If this is the last byte of the last message, send
787 if (i2c->msg_ptr == i2c->msg->len &&
788 i2c->msg_idx == i2c->msg_num - 1)
790 } else if (i2c->msg_idx < i2c->msg_num - 1) {
792 * Next segment of the message.
799 * If we aren't doing a repeated start and address,
800 * go back and try to send the next byte. Note that
801 * we do not support switching the R/W direction here.
803 if (i2c->msg->flags & I2C_M_NOSTART)
807 * Write the next address.
809 IDBR = i2c_pxa_addr_byte(i2c->msg);
812 * And trigger a repeated start, and send the byte.
815 icr |= ICR_START | ICR_TB;
817 if (i2c->msg->len == 0) {
819 * Device probes have a message length of zero
820 * and need the bus to be reset before it can
825 i2c_pxa_master_complete(i2c, 0);
828 i2c->icrlog[i2c->irqlogidx-1] = icr;
834 static void i2c_pxa_irq_rxfull(struct pxa_i2c *i2c, u32 isr)
836 u32 icr = ICR & ~(ICR_START|ICR_STOP|ICR_ACKNAK|ICR_TB);
841 i2c->msg->buf[i2c->msg_ptr++] = IDBR;
843 if (i2c->msg_ptr < i2c->msg->len) {
845 * If this is the last byte of the last
846 * message, send a STOP.
848 if (i2c->msg_ptr == i2c->msg->len - 1)
849 icr |= ICR_STOP | ICR_ACKNAK;
851 icr |= ICR_ALDIE | ICR_TB;
853 i2c_pxa_master_complete(i2c, 0);
856 i2c->icrlog[i2c->irqlogidx-1] = icr;
861 static irqreturn_t i2c_pxa_handler(int this_irq, void *dev_id, struct pt_regs *regs)
863 struct pxa_i2c *i2c = dev_id;
866 if (i2c_debug > 2 && 0) {
867 printk(DBGLVL "i2c_pxa_handler: ISR=%08x, ICR=%08x, IBMR=%02x\n",
872 if (i2c->irqlogidx < sizeof(i2c->isrlog)/sizeof(u32))
873 i2c->isrlog[i2c->irqlogidx++] = isr;
878 * Always clear all pending IRQs.
880 ISR = isr & (ISR_SSD|ISR_ALD|ISR_ITE|ISR_IRF|ISR_SAD|ISR_BED);
883 i2c_pxa_slave_start(i2c, isr);
885 i2c_pxa_slave_stop(i2c);
887 if (i2c_pxa_is_slavemode(i2c)) {
889 i2c_pxa_slave_txempty(i2c, isr);
891 i2c_pxa_slave_rxfull(i2c, isr);
892 } else if (i2c->msg) {
894 i2c_pxa_irq_txempty(i2c, isr);
896 i2c_pxa_irq_rxfull(i2c, isr);
898 i2c_pxa_scream_blue_murder(i2c, "spurious irq");
905 static int i2c_pxa_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
907 struct pxa_i2c *i2c = adap->algo_data;
910 for (i = adap->retries; i >= 0; i--) {
911 ret = i2c_pxa_do_xfer(i2c, msgs, num);
912 if (ret != I2C_RETRY)
916 printk(KERN_INFO "Retrying transmission\n");
919 i2c_pxa_scream_blue_murder(i2c, "exhausted retries");
922 i2c_pxa_set_slave(i2c, ret);
926 static struct i2c_algorithm i2c_pxa_algorithm = {
927 .name = "PXA-I2C-Algorithm",
929 .master_xfer = i2c_pxa_xfer,
932 static struct pxa_i2c i2c_pxa = {
933 .lock = SPIN_LOCK_UNLOCKED,
934 .wait = __WAIT_QUEUE_HEAD_INITIALIZER(i2c_pxa.wait),
936 .name = "pxa2xx-i2c",
938 .algo = &i2c_pxa_algorithm,
943 static int i2c_pxa_probe(struct device *dev)
945 struct pxa_i2c *i2c = &i2c_pxa;
946 struct i2c_pxa_platform_data *plat = dev->platform_data;
950 pxa_gpio_mode(GPIO117_I2CSCL_MD);
951 pxa_gpio_mode(GPIO118_I2CSDA_MD);
955 i2c->slave_addr = I2C_PXA_SLAVE_ADDR;
957 #ifdef CONFIG_I2C_PXA_SLAVE
958 i2c->slave = &eeprom_client;
960 i2c->slave_addr = plat->slave_addr;
962 i2c->slave = plat->slave;
966 pxa_set_cken(CKEN14_I2C, 1);
967 ret = request_irq(IRQ_I2C, i2c_pxa_handler, SA_INTERRUPT,
974 i2c->adap.algo_data = i2c;
975 i2c->adap.dev.parent = dev;
977 ret = i2c_add_adapter(&i2c->adap);
979 printk(KERN_INFO "I2C: Failed to add bus\n");
983 dev_set_drvdata(dev, i2c);
985 #ifdef CONFIG_I2C_PXA_SLAVE
986 printk(KERN_INFO "I2C: %s: PXA I2C adapter, slave address %d\n",
987 i2c->adap.dev.bus_id, i2c->slave_addr);
989 printk(KERN_INFO "I2C: %s: PXA I2C adapter\n",
990 i2c->adap.dev.bus_id);
995 free_irq(IRQ_I2C, i2c);
1000 static int i2c_pxa_remove(struct device *dev)
1002 struct pxa_i2c *i2c = dev_get_drvdata(dev);
1004 dev_set_drvdata(dev, NULL);
1006 i2c_del_adapter(&i2c->adap);
1007 free_irq(IRQ_I2C, i2c);
1008 pxa_set_cken(CKEN14_I2C, 0);
1013 static struct device_driver i2c_pxa_driver = {
1014 .name = "pxa2xx-i2c",
1015 .bus = &platform_bus_type,
1016 .probe = i2c_pxa_probe,
1017 .remove = i2c_pxa_remove,
1020 static int __init i2c_adap_pxa_init(void)
1022 return driver_register(&i2c_pxa_driver);
1025 static void i2c_adap_pxa_exit(void)
1027 return driver_unregister(&i2c_pxa_driver);
1030 module_init(i2c_adap_pxa_init);
1031 module_exit(i2c_adap_pxa_exit);