2 * BRIEF MODULE DESCRIPTION
4 * Infra-red driver for the OMAP1610-H2 and OMAP1710-H3 Platforms
6 * (based on omap-sir.c)
8 * Copyright 2003 MontaVista Software Inc.
9 * Author: MontaVista Software, Inc.
12 * Copyright 2004 Texas Instruments.
14 * This program is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License as published by the
16 * Free Software Foundation; either version 2 of the License, or (at your
17 * option) any later version.
19 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
20 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
22 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
25 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 * You should have received a copy of the GNU General Public License along
31 * with this program; if not, write to the Free Software Foundation, Inc.,
32 * 675 Mass Ave, Cambridge, MA 02139, USA.
35 Feb 2004, Texas Instruments
36 - Ported to 2.6 kernel (Feb 2004).
38 Apr 2004, Texas Instruments
39 - Added support for H3 (Apr 2004).
40 Nov 2004, Texas Instruments
41 - Added support for Power Management.
45 #include <linux/config.h>
46 #include <linux/module.h>
47 #include <linux/types.h>
48 #include <linux/init.h>
49 #include <linux/errno.h>
50 #include <linux/netdevice.h>
51 #include <linux/slab.h>
52 #include <linux/rtnetlink.h>
53 #include <linux/interrupt.h>
54 #include <linux/delay.h>
55 #include <linux/ioport.h>
56 #include <linux/dma-mapping.h>
57 #include <linux/platform_device.h>
59 #include <net/irda/irda.h>
60 #include <net/irda/irmod.h>
61 #include <net/irda/wrapper.h>
62 #include <net/irda/irda_device.h>
66 #include <asm/hardware.h>
67 #include <asm/serial.h>
68 #include <asm/mach-types.h>
70 #include <asm/arch/mux.h>
71 #include <asm/arch/gpio.h>
72 #include <linux/i2c.h>
74 #ifdef CONFIG_MACH_OMAP_H3
75 #include <asm/arch/gpioexpander.h>
82 #define OMAP1610_H2_FIRSEL_GPIO 17
84 static int rx_state = 0; /* RX state for IOCTL */
86 struct omap1610_irda {
88 int speed; /* Current IrDA speed */
91 struct net_device_stats stats;
92 struct irlap_cb *irlap;
98 dma_addr_t rx_buf_dma_phys; /* Physical adress of RX DMA buffer */
99 dma_addr_t tx_buf_dma_phys; /* Physical adress of TX DMA buffer */
101 void *rx_buf_dma_virt; /* Virtual adress of RX DMA buffer */
102 void *tx_buf_dma_virt; /* Virtual adress of TX DMA buffer */
107 #define OMAP_IRDA_DEBUG 0
109 #if (OMAP_IRDA_DEBUG > 0)
110 #define DBG(format, args...) printk(KERN_ERR "%s(): " format, __FUNCTION__, ## args);
111 #define DBG_IRQ(format, args...) printk(KERN_ERR "%s(): " format, __FUNCTION__, ## args);
113 #define DBG(format, args...)
114 #define DBG_IRQ(format, args...)
117 #if (OMAP_IRDA_DEBUG > 1)
118 #define __ECHO_IN printk(KERN_ERR "%s: enter\n",__FUNCTION__);
119 #define __ECHO_OUT printk(KERN_ERR "%s: exit\n",__FUNCTION__);
125 #ifdef OMAP1610_IR_HARDWARE_DEBUG_ENABLE
126 #define HDBG_DELAY 200
128 void hard_debug1(u16 i)
132 OMAP1610_GPIO1_BASE + OMAP1610_GPIO_CLEAR_DATAOUT);
136 OMAP1610_GPIO1_BASE + OMAP1610_GPIO_SET_DATAOUT);
141 void hard_debug2(u16 i)
145 OMAP1610_GPIO1_BASE + OMAP1610_GPIO_CLEAR_DATAOUT);
149 OMAP1610_GPIO1_BASE + OMAP1610_GPIO_SET_DATAOUT);
154 #define HDBG1(i) hard_debug1(i)
155 #define HDBG2(i) hard_debug2(i)
161 /* forward declarations */
163 extern void irda_device_setup(struct net_device *dev);
164 extern void omap_stop_dma(int lch);
165 static int omap1610_irda_set_speed(struct net_device *dev, int speed);
167 static void omap1610_irda_start_rx_dma(struct omap1610_irda *si)
170 omap_set_dma_src_params(si->rx_dma_channel, 0x3, 0x0, (unsigned long)UART3_RHR,
173 omap_enable_dma_irq(si->rx_dma_channel, 0x01);
175 omap_set_dma_dest_params(si->rx_dma_channel, 0x0, 0x1,
179 omap_set_dma_transfer_params(si->rx_dma_channel, 0x0, 4096, 0x1, 0x0, 0, 0);
181 omap_start_dma(si->rx_dma_channel);
184 static void omap1610_start_tx_dma(struct omap1610_irda *si, int size)
189 omap_set_dma_dest_params(si->tx_dma_channel, 0x03, 0x0, (unsigned long)UART3_THR,
191 omap_enable_dma_irq(si->tx_dma_channel, 0x01);
193 omap_set_dma_src_params(si->tx_dma_channel, 0x0, 0x1,
197 omap_set_dma_transfer_params(si->tx_dma_channel, 0x0, size, 0x1, 0x0, 0, 0);
202 omap_start_dma(si->tx_dma_channel);
209 /* DMA RX callback - normally, we should not go here,
210 it calls only if something is going wrong
213 static void omap1610_irda_rx_dma_callback(int lch, u16 ch_status, void *data)
215 struct net_device *dev = data;
216 struct omap1610_irda *si = dev->priv;
218 printk(KERN_ERR "RX Transfer error or very big frame \n");
220 /* Clear interrupts */
221 omap_readb(UART3_IIR);
223 si->stats.rx_frame_errors++;
225 omap_readb(UART3_RESUME);
228 omap1610_irda_start_rx_dma(si);
232 /* DMA TX callback - calling when frame transfer has been finished */
234 static void omap1610_irda_tx_dma_callback(int lch, u16 ch_status, void *data)
236 struct net_device *dev = data;
237 struct omap1610_irda *si = dev->priv;
241 /*Stop DMA controller */
242 omap_stop_dma(si->tx_dma_channel);
249 * Set the IrDA communications speed.
250 * Interrupt have to be disabled here.
253 static int omap1610_irda_startup(struct net_device *dev)
257 /* Enable UART3 clock and set UART3 to IrDA mode */
258 omap_writel(omap_readl(MOD_CONF_CTRL_0) | (1 << 31) | (1 << 15),
261 if (machine_is_omap_h2()) {
262 // omap_cfg_reg(Y15_1610_GPIO17);
263 omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A);
265 omap_set_gpio_direction(OMAP1610_H2_FIRSEL_GPIO, 0);
266 omap_set_gpio_dataout(OMAP1610_H2_FIRSEL_GPIO, 0);
269 omap_writeb(0x07, UART3_MDR1); /* Put UART3 in reset mode */
271 /* Clear DLH and DLL */
272 omap_writeb(1 << 7, UART3_LCR);
274 omap_writeb(0, UART3_DLL);
275 omap_writeb(0, UART3_DLH);
277 omap_writeb(0xbf, UART3_LCR);
279 omap_writeb(1 << 4, UART3_EFR);
281 omap_writeb(1 << 7, UART3_LCR);
283 /* Enable access to UART3_TLR and UART3_TCR registers */
284 omap_writeb(1 << 6, UART3_MCR);
286 omap_writeb(0, UART3_SCR);
288 /* Set Rx trigger to 1 and Tx trigger to 1 */
289 omap_writeb(0, UART3_TLR);
291 /* Set LCR to 8 bits and 1 stop bit */
292 omap_writeb(0x03, UART3_LCR);
294 /* Clear RX and TX FIFO and enable FIFO */
295 /* Use DMA Req for transfers */
297 omap_writeb((1 << 2) | (1 << 1) | (1 << 3) | (1 << 4) | (1 << 6) | 1,
300 omap_writeb(0, UART3_MCR);
302 omap_writeb((1 << 7) | (1 << 6), UART3_SCR);
304 /* Enable UART3 SIR Mode,(Frame-length method to end frames) */
305 omap_writeb(1, UART3_MDR1);
307 /* Set Status FIFO trig to 1 */
308 omap_writeb(0, UART3_MDR2);
310 /* Enables RXIR input */
311 /* and disable TX underrun */
314 // omap_writeb((1 << 7) | (1 << 6) | (1 << 4), UART3_ACREG);
315 omap_writeb((1 << 6) | (1 << 4), UART3_ACREG);
317 /* Enable EOF Interrupt only */
318 omap_writeb((1 << 7) | (1 << 5), UART3_IER);
320 /* Set Maximum Received Frame size to 2048 bytes */
321 omap_writeb(0x00, UART3_RXFLL);
322 omap_writeb(0x08, UART3_RXFLH);
324 omap_readb(UART3_RESUME);
332 static int omap1610_irda_shutdown(struct omap1610_irda *si)
334 /* Disable all UART3 Interrupts */
335 omap_writeb(0, UART3_IER);
337 /* Disable UART3 and disable baud rate generator */
338 omap_writeb(0x07, UART3_MDR1); /* Put UART3 in reset mode */
340 omap_writeb((1 << 5), UART3_ACREG); /* set SD_MODE pin to high and Disable RX IR */
342 /* Clear DLH and DLL */
343 omap_writeb(1 << 7, UART3_LCR);
344 omap_writeb(0, UART3_DLL);
345 omap_writeb(0, UART3_DLH);
351 omap1610_irda_irq(int irq, void *dev_id, struct pt_regs *hw_regs)
353 struct net_device *dev = dev_id;
354 struct omap1610_irda *si = dev->priv;
362 /* Clear EOF interrupt */
363 status = omap_readb(UART3_IIR);
365 if (status & (1 << 5)) {
366 u8 mdr2 = omap_readb(UART3_MDR2);
369 printk(KERN_ERR "IRDA Buffer underrun error");
371 si->stats.tx_packets++;
374 omap1610_irda_set_speed(dev, si->newspeed);
378 netif_wake_queue(dev);
380 if (!(status & 0x80))
384 /* Stop DMA and if there are no errors, send frame to upper layer */
386 omap_stop_dma(si->rx_dma_channel);
388 status = omap_readb(UART3_SFLSR); /* Take a frame status */
390 if (status != 0) { /* Bad frame? */
391 si->stats.rx_frame_errors++;
392 omap_readb(UART3_RESUME);
394 /* We got a frame! */
395 skb = alloc_skb(4096, GFP_ATOMIC);
398 printk(KERN_ERR "omap_sir: out of memory for RX SKB\n");
402 * Align any IP headers that may be contained
408 w = OMAP_DMA_CDAC_REG(si->rx_dma_channel);
409 w -= OMAP1_DMA_CDSA_L_REG(si->rx_dma_channel);
411 if (si->speed != 4000000) {
412 memcpy(skb_put(skb, w - 2), si->rx_buf_dma_virt, w - 2); /* Copy DMA buffer to skb */
414 memcpy(skb_put(skb, w - 4), si->rx_buf_dma_virt, w - 4); /* Copy DMA buffer to skb */
418 skb->mac.raw = skb->data;
419 skb->protocol = htons(ETH_P_IRDA);
420 si->stats.rx_packets++;
421 si->stats.rx_bytes += skb->len;
422 netif_receive_skb(skb); /* Send data to upper level */
426 omap1610_irda_start_rx_dma(si);
428 dev->last_rx = jiffies;
435 static int omap1610_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev)
437 struct omap1610_irda *si = dev->priv;
438 int speed = irda_get_next_speed(skb);
439 int mtt = irda_get_mtt(skb);
440 int xbofs = irda_get_next_xbofs(skb);
445 * Does this packet contain a request to change the interface
446 * speed? If so, remember it until we complete the transmission
449 if (speed != si->speed && speed != -1)
450 si->newspeed = speed;
453 /* Set number of addtional BOFS */
454 omap_writeb(xbofs + 1, UART3_EBLR);
458 * If this is an empty frame, we can bypass a lot.
463 omap1610_irda_set_speed(dev, speed);
469 netif_stop_queue(dev);
471 /* Copy skb data to DMA buffer */
473 memcpy(si->tx_buf_dma_virt, skb->data, skb->len);
475 si->stats.tx_bytes += skb->len;
477 /* Set frame length */
479 omap_writeb((skb->len & 0xff), UART3_TXFLL);
480 omap_writeb((skb->len >> 8), UART3_TXFLH);
487 /* Start TX DMA transfer */
489 omap1610_start_tx_dma(si, skb->len);
491 /* We can free skb now because it's already in DMA buffer */
495 dev->trans_start = jiffies;
503 omap1610_irda_ioctl(struct net_device *dev, struct ifreq *ifreq, int cmd)
505 struct if_irda_req *rq = (struct if_irda_req *)ifreq;
506 struct omap1610_irda *si = dev->priv;
507 int ret = -EOPNOTSUPP;
513 if (capable(CAP_NET_ADMIN)) {
515 * We are unable to set the speed if the
516 * device is not running.
520 omap1610_irda_set_speed(dev,
525 "omap_irda_ioctl: SIOCSBANDWIDTH: !netif_running\n");
533 if (capable(CAP_NET_ADMIN)) {
534 irda_device_set_media_busy(dev, TRUE);
540 rq->ifr_receiving = rx_state;
552 static struct net_device_stats *omap1610_irda_stats(struct net_device *dev)
554 struct omap1610_irda *si = dev->priv;
558 static int omap1610_irda_start(struct net_device *dev)
560 struct omap1610_irda *si = dev->priv;
562 unsigned long flags = 0;
564 #ifdef CONFIG_MACH_OMAP_H3
565 u8 ioExpanderVal = 0;
571 err = request_irq(dev->irq, omap1610_irda_irq, 0, dev->name, dev);
576 * The interrupt must remain disabled for now.
579 disable_irq(dev->irq);
581 /* Request DMA channels for IrDA hardware */
583 if (omap_request_dma(OMAP_DMA_UART3_RX, "IrDA Rx DMA",
584 (void *)omap1610_irda_rx_dma_callback,
585 dev, &(si->rx_dma_channel))) {
586 printk(KERN_ERR "Failed to request IrDA Rx DMA \n");
590 if (omap_request_dma(OMAP_DMA_UART3_TX, "IrDA Tx DMA",
591 (void *)omap1610_irda_tx_dma_callback,
592 dev, &(si->tx_dma_channel))) {
593 printk(KERN_ERR "Failed to request IrDA Tx DMA \n");
597 /* Allocate TX and RX buffers for DMA channels */
599 si->rx_buf_dma_virt =
600 dma_alloc_coherent(NULL, 4096, &(si->rx_buf_dma_phys), flags);
602 si->tx_buf_dma_virt =
603 dma_alloc_coherent(NULL, 4096, &(si->tx_buf_dma_phys), flags);
606 * Setup the serial port for the specified config.
609 #ifdef CONFIG_MACH_OMAP_H3
611 if ((err = read_gpio_expa(&ioExpanderVal, 0x26))) {
612 printk(KERN_ERR "Error reading from I/O EXPANDER \n");
616 ioExpanderVal |= 0x40; /* 'P6' Enable IRDA_TX and IRDA_RX */
618 if ((err = write_gpio_expa(ioExpanderVal, 0x26))) {
619 printk(KERN_ERR "Error writing to I/O EXPANDER \n");
623 err = omap1610_irda_startup(dev);
628 omap1610_irda_set_speed(dev, si->speed = 9600);
631 * Open a new IrLAP layer instance.
634 si->irlap = irlap_open(dev, &si->qos, "omap_sir");
640 /* Now enable the interrupt and start the queue */
645 omap1610_irda_start_rx_dma(si);
647 enable_irq(dev->irq);
648 netif_start_queue(dev);
656 omap1610_irda_shutdown(si);
659 free_irq(dev->irq, dev);
663 static int omap1610_irda_stop(struct net_device *dev)
665 struct omap1610_irda *si = dev->priv;
669 disable_irq(dev->irq);
671 netif_stop_queue(dev);
673 omap_free_dma(si->rx_dma_channel);
674 omap_free_dma(si->tx_dma_channel);
676 dma_free_coherent(NULL, 4096, si->rx_buf_dma_virt, si->rx_buf_dma_phys);
677 dma_free_coherent(NULL, 4096, si->tx_buf_dma_virt, si->tx_buf_dma_phys);
679 omap1610_irda_shutdown(si);
683 irlap_close(si->irlap);
693 free_irq(dev->irq, dev);
700 #ifdef CONFIG_MACH_OMAP_H3
702 static void set_h3_gpio_expa(u8 FIR_SEL, u8 IrDA_INVSEL)
704 u8 ioExpanderVal = 0;
706 if (read_gpio_expa(&ioExpanderVal, 0x27) != 0) {
707 printk(KERN_ERR "Error reading from I/O EXPANDER \n");
711 ioExpanderVal &= ~0x03;
712 ioExpanderVal |= FIR_SEL << 1;
713 ioExpanderVal |= IrDA_INVSEL << 0;
715 if (write_gpio_expa(ioExpanderVal, 0x27) != 0) {
716 printk(KERN_ERR "Error writing to I/O EXPANDER \n");
719 if (read_gpio_expa(&ioExpanderVal, 0x27) != 0) {
720 printk(KERN_ERR "Error reading from I/O EXPANDER \n");
727 static void set_h3_gpio_expa_handler(void *data)
731 if (*mode == SIR_MODE)
732 set_h3_gpio_expa(0, 1);
733 else if (*mode == MIR_MODE)
734 set_h3_gpio_expa(1, 1);
735 else if (*mode == FIR_MODE)
736 set_h3_gpio_expa(1, 1);
739 DECLARE_WORK(set_h3_gpio_expa_work, &set_h3_gpio_expa_handler, &which_speed);
741 static inline void set_h3_irda_mode(int mode)
743 cancel_delayed_work(&set_h3_gpio_expa_work);
745 schedule_work(&set_h3_gpio_expa_work);
748 #define set_h3_irda_mode(x)
751 static int omap1610_irda_set_speed(struct net_device *dev, int speed)
753 struct omap1610_irda *si = dev->priv;
759 if (speed <= 115200) {
761 if (machine_is_omap_h2()) {
762 omap_set_gpio_dataout(OMAP1610_H2_FIRSEL_GPIO, 0);
765 if (machine_is_omap_h3())
766 set_h3_irda_mode(SIR_MODE);
768 printk("Set SIR Mode! Speed: %d\n", speed);
770 omap_writeb(1, UART3_MDR1); /* Set SIR mode */
772 omap_writeb(1, UART3_EBLR);
774 divisor = 48000000 / (16 * speed); /* Base clock 48 MHz */
777 omap_writeb(1 << 7, UART3_LCR);
779 omap_writeb((divisor & 0xFF), UART3_DLL);
781 omap_writeb((divisor >> 8), UART3_DLH);
783 omap_writeb(0x03, UART3_LCR);
785 omap_writeb(0, UART3_MCR);
789 } else if (speed <= 1152000) {
791 printk("Set MIR Mode! Speed: %d\n", speed);
793 omap_writeb((1 << 2) | (1 << 6), UART3_MDR1); /* Set MIR mode with
794 SIP after each frame */
796 omap_writeb(2, UART3_EBLR);
798 divisor = 48000000 / (41 * speed); /* Base clock 48 MHz */
800 omap_writeb(1 << 7, UART3_LCR);
802 omap_writeb((divisor & 0xFF), UART3_DLL);
804 omap_writeb((divisor >> 8), UART3_DLH);
806 omap_writeb(0x03, UART3_LCR);
808 if (machine_is_omap_h2())
809 omap_set_gpio_dataout(OMAP1610_H2_FIRSEL_GPIO, 1);
811 if (machine_is_omap_h3())
812 set_h3_irda_mode(MIR_MODE);
817 printk("Set FIR Mode! Speed: %d\n", speed);
819 omap_writeb((1 << 2) | (1 << 6) | 1, UART3_MDR1); /* Set FIR mode
820 with SIP after each frame */
821 if (machine_is_omap_h2())
822 omap_set_gpio_dataout(OMAP1610_H2_FIRSEL_GPIO, 1);
824 if (machine_is_omap_h3())
825 set_h3_irda_mode(FIR_MODE);
838 * Suspend the IrDA interface.
840 static int omap1610_irda_suspend(struct device *_dev, u32 state, u32 level)
842 struct net_device *dev = dev_get_drvdata(_dev);
843 struct omap1610_irda *si = dev->priv;
845 if (!dev || level != SUSPEND_DISABLE)
850 * Stop the transmit queue
852 netif_device_detach(dev);
853 disable_irq(dev->irq);
854 omap1610_irda_shutdown(si);
860 * Resume the IrDA interface.
862 static int omap1610_irda_resume(struct device *_dev, u32 level)
864 struct net_device *dev = dev_get_drvdata(_dev);
865 struct omap1610_irda *si= dev->priv;
867 if (!dev || level != RESUME_ENABLE)
872 * If we missed a speed change, initialise at the new speed
873 * directly. It is debatable whether this is actually
874 * required, but in the interests of continuing from where
875 * we left off it is desireable. The converse argument is
876 * that we should re-negotiate at 9600 baud again.
879 si->speed = si->newspeed;
883 omap1610_irda_startup(dev);
884 omap1610_irda_set_speed(dev, si->speed);
885 enable_irq(dev->irq);
888 * This automatically wakes up the queue
890 netif_device_attach(dev);
896 #define omap1610_irda_suspend NULL
897 #define omap1610_irda_resume NULL
900 static int omap1610_irda_probe(struct device *_dev)
902 struct platform_device *pdev = to_platform_device(_dev);
903 struct net_device *dev;
904 struct omap1610_irda *si;
905 unsigned int baudrate_mask;
908 dev = alloc_irdadev(sizeof(struct omap1610_irda));
913 si->dev = &pdev->dev;
914 dev->hard_start_xmit = omap1610_irda_hard_xmit;
915 dev->open = omap1610_irda_start;
916 dev->stop = omap1610_irda_stop;
917 dev->do_ioctl = omap1610_irda_ioctl;
918 dev->get_stats = omap1610_irda_stats;
919 dev->irq = INT_UART3;
921 irda_init_max_qos_capabilies(&si->qos);
924 * OMAP1610 supports SIR, MIR, FIR modes,
925 * but actualy supported modes depend on hardware implementation.
926 * OMAP1610 Innovator supports only SIR and
927 * OMAP1610 H2 supports both SIR and FIR
931 IR_9600 | IR_19200 | IR_38400 | IR_57600 | IR_115200 | IR_576000 |
934 if (machine_is_omap_h2() || machine_is_omap_h3()) {
936 baudrate_mask |= (IR_4000000 << 8);
939 si->qos.baud_rate.bits &= baudrate_mask;
940 si->qos.min_turn_time.bits = 7;
942 irda_qos_bits_to_value(&si->qos);
944 err = register_netdev(dev);
946 dev_set_drvdata(&pdev->dev, dev);
954 static int omap1610_irda_remove(struct device *_dev)
956 struct net_device *dev = dev_get_drvdata(_dev);
958 #ifdef CONFIG_MACH_OMAP_H3
959 if (machine_is_omap_h3())
960 cancel_delayed_work(&set_h3_gpio_expa_work);
963 unregister_netdev(dev);
969 static struct device_driver omap1610ir_driver = {
970 .name = "omap1610-ir",
971 .bus = &platform_bus_type,
972 .probe = omap1610_irda_probe,
973 .remove = omap1610_irda_remove,
974 .suspend = omap1610_irda_suspend,
975 .resume = omap1610_irda_resume,
978 static int __init omap1610_irda_init(void)
980 return driver_register(&omap1610ir_driver);
984 static void __exit omap1610_irda_exit(void)
986 driver_unregister(&omap1610ir_driver);
989 module_init(omap1610_irda_init);
990 module_exit(omap1610_irda_exit);
992 MODULE_AUTHOR("MontaVista");
993 MODULE_DESCRIPTION("OMAP IrDA Driver");
994 MODULE_LICENSE("GPL");