2 * linux/drivers/net/irda/sa1100_ir.c
4 * Copyright (C) 2000-2001 Russell King
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * Infra-red driver for the StrongARM SA1100 embedded microprocessor
12 * Note that we don't have to worry about the SA1111's DMA bugs in here,
13 * so we use the straight forward dma_map_* functions with a null pointer.
15 * This driver takes one kernel command line parameter, sa1100ir=, with
16 * the following options:
17 * max_rate:baudrate - set the maximum baud rate
18 * power_level:level - set the transmitter power level
19 * tx_lpm:0|1 - set transmit low power mode
21 #include <linux/module.h>
22 #include <linux/moduleparam.h>
23 #include <linux/types.h>
24 #include <linux/init.h>
25 #include <linux/errno.h>
26 #include <linux/netdevice.h>
27 #include <linux/slab.h>
28 #include <linux/rtnetlink.h>
29 #include <linux/interrupt.h>
30 #include <linux/delay.h>
31 #include <linux/platform_device.h>
32 #include <linux/dma-mapping.h>
34 #include <net/irda/irda.h>
35 #include <net/irda/wrapper.h>
36 #include <net/irda/irda_device.h>
39 #include <mach/hardware.h>
40 #include <asm/mach/irda.h>
42 static int power_level = 3;
44 static int max_rate = 4000000;
61 struct sa1100_buf dma_rx;
62 struct sa1100_buf dma_tx;
65 struct irda_platform_data *pdata;
66 struct irlap_cb *irlap;
72 int (*tx_start)(struct sk_buff *, struct net_device *, struct sa1100_irda *);
73 irqreturn_t (*irq)(struct net_device *, struct sa1100_irda *);
76 static int sa1100_irda_set_speed(struct sa1100_irda *, int);
78 #define IS_FIR(si) ((si)->speed >= 4000000)
80 #define HPSIR_MAX_RXLEN 2047
83 * Allocate and map the receive buffer, unless it is already allocated.
85 static int sa1100_irda_rx_alloc(struct sa1100_irda *si)
90 si->dma_rx.skb = alloc_skb(HPSIR_MAX_RXLEN + 1, GFP_ATOMIC);
91 if (!si->dma_rx.skb) {
92 printk(KERN_ERR "sa1100_ir: out of memory for RX SKB\n");
97 * Align any IP headers that may be contained
100 skb_reserve(si->dma_rx.skb, 1);
102 si->dma_rx.dma = dma_map_single(si->dev, si->dma_rx.skb->data,
105 if (dma_mapping_error(si->dev, si->dma_rx.dma)) {
106 dev_kfree_skb_any(si->dma_rx.skb);
114 * We want to get here as soon as possible, and get the receiver setup.
115 * We use the existing buffer.
117 static void sa1100_irda_rx_dma_start(struct sa1100_irda *si)
119 if (!si->dma_rx.skb) {
120 printk(KERN_ERR "sa1100_ir: rx buffer went missing\n");
125 * First empty receive FIFO
127 Ser2HSCR0 = si->hscr0 | HSCR0_HSSP;
130 * Enable the DMA, receiver and receive interrupt.
132 sa1100_clear_dma(si->dma_rx.regs);
133 sa1100_start_dma(si->dma_rx.regs, si->dma_rx.dma, HPSIR_MAX_RXLEN);
134 Ser2HSCR0 = si->hscr0 | HSCR0_HSSP | HSCR0_RXE;
137 static void sa1100_irda_check_speed(struct sa1100_irda *si)
140 sa1100_irda_set_speed(si, si->newspeed);
146 * HP-SIR format support.
148 static int sa1100_irda_sir_tx_start(struct sk_buff *skb, struct net_device *dev,
149 struct sa1100_irda *si)
151 si->tx_buff.data = si->tx_buff.head;
152 si->tx_buff.len = async_wrap_skb(skb, si->tx_buff.data,
153 si->tx_buff.truesize);
156 * Set the transmit interrupt enable. This will fire off an
157 * interrupt immediately. Note that we disable the receiver
158 * so we won't get spurious characters received.
160 Ser2UTCR3 = UTCR3_TIE | UTCR3_TXE;
167 static irqreturn_t sa1100_irda_sir_irq(struct net_device *dev, struct sa1100_irda *si)
174 * Deal with any receive errors first. The bytes in error may be
175 * the only bytes in the receive FIFO, so we do this first.
177 while (status & UTSR0_EIF) {
183 if (stat & (UTSR1_FRE | UTSR1_ROR)) {
184 dev->stats.rx_errors++;
185 if (stat & UTSR1_FRE)
186 dev->stats.rx_frame_errors++;
187 if (stat & UTSR1_ROR)
188 dev->stats.rx_fifo_errors++;
190 async_unwrap_char(dev, &dev->stats, &si->rx_buff, data);
196 * We must clear certain bits.
198 Ser2UTSR0 = status & (UTSR0_RID | UTSR0_RBB | UTSR0_REB);
200 if (status & UTSR0_RFS) {
202 * There are at least 4 bytes in the FIFO. Read 3 bytes
203 * and leave the rest to the block below.
205 async_unwrap_char(dev, &dev->stats, &si->rx_buff, Ser2UTDR);
206 async_unwrap_char(dev, &dev->stats, &si->rx_buff, Ser2UTDR);
207 async_unwrap_char(dev, &dev->stats, &si->rx_buff, Ser2UTDR);
210 if (status & (UTSR0_RFS | UTSR0_RID)) {
212 * Fifo contains more than 1 character.
215 async_unwrap_char(dev, &dev->stats, &si->rx_buff,
217 } while (Ser2UTSR1 & UTSR1_RNE);
221 if (status & UTSR0_TFS && si->tx_buff.len) {
223 * Transmitter FIFO is not full
226 Ser2UTDR = *si->tx_buff.data++;
227 si->tx_buff.len -= 1;
228 } while (Ser2UTSR1 & UTSR1_TNF && si->tx_buff.len);
230 if (si->tx_buff.len == 0) {
231 dev->stats.tx_packets++;
232 dev->stats.tx_bytes += si->tx_buff.data -
236 * We need to ensure that the transmitter has
241 while (Ser2UTSR1 & UTSR1_TBY);
244 * Ok, we've finished transmitting. Now enable
245 * the receiver. Sometimes we get a receive IRQ
246 * immediately after a transmit...
248 Ser2UTSR0 = UTSR0_REB | UTSR0_RBB | UTSR0_RID;
249 Ser2UTCR3 = UTCR3_RIE | UTCR3_RXE | UTCR3_TXE;
251 sa1100_irda_check_speed(si);
254 netif_wake_queue(dev);
262 * FIR format support.
264 static void sa1100_irda_firtxdma_irq(void *id)
266 struct net_device *dev = id;
267 struct sa1100_irda *si = netdev_priv(dev);
271 * Wait for the transmission to complete. Unfortunately,
272 * the hardware doesn't give us an interrupt to indicate
277 while (!(Ser2HSSR0 & HSSR0_TUR) || Ser2HSSR1 & HSSR1_TBY);
280 * Clear the transmit underrun bit.
282 Ser2HSSR0 = HSSR0_TUR;
285 * Do we need to change speed? Note that we're lazy
286 * here - we don't free the old dma_rx.skb. We don't need
287 * to allocate a buffer either.
289 sa1100_irda_check_speed(si);
292 * Start reception. This disables the transmitter for
293 * us. This will be using the existing RX buffer.
295 sa1100_irda_rx_dma_start(si);
297 /* Account and free the packet. */
298 skb = si->dma_tx.skb;
300 dma_unmap_single(si->dev, si->dma_tx.dma, skb->len,
302 dev->stats.tx_packets ++;
303 dev->stats.tx_bytes += skb->len;
304 dev_kfree_skb_irq(skb);
305 si->dma_tx.skb = NULL;
309 * Make sure that the TX queue is available for sending
310 * (for retries). TX has priority over RX at all times.
312 netif_wake_queue(dev);
315 static int sa1100_irda_fir_tx_start(struct sk_buff *skb, struct net_device *dev,
316 struct sa1100_irda *si)
318 int mtt = irda_get_mtt(skb);
320 si->dma_tx.skb = skb;
321 si->dma_tx.dma = dma_map_single(si->dev, skb->data, skb->len,
323 if (dma_mapping_error(si->dev, si->dma_tx.dma)) {
324 si->dma_tx.skb = NULL;
325 netif_wake_queue(dev);
326 dev->stats.tx_dropped++;
331 sa1100_start_dma(si->dma_tx.regs, si->dma_tx.dma, skb->len);
334 * If we have a mean turn-around time, impose the specified
335 * specified delay. We could shorten this by timing from
336 * the point we received the packet.
341 Ser2HSCR0 = si->hscr0 | HSCR0_HSSP | HSCR0_TXE;
346 static void sa1100_irda_fir_error(struct sa1100_irda *si, struct net_device *dev)
348 struct sk_buff *skb = si->dma_rx.skb;
350 unsigned int len, stat, data;
353 printk(KERN_ERR "sa1100_ir: SKB is NULL!\n");
358 * Get the current data position.
360 dma_addr = sa1100_get_dma_pos(si->dma_rx.regs);
361 len = dma_addr - si->dma_rx.dma;
362 if (len > HPSIR_MAX_RXLEN)
363 len = HPSIR_MAX_RXLEN;
364 dma_unmap_single(si->dev, si->dma_rx.dma, len, DMA_FROM_DEVICE);
368 * Read Status, and then Data.
374 if (stat & (HSSR1_CRE | HSSR1_ROR)) {
375 dev->stats.rx_errors++;
376 if (stat & HSSR1_CRE)
377 dev->stats.rx_crc_errors++;
378 if (stat & HSSR1_ROR)
379 dev->stats.rx_frame_errors++;
381 skb->data[len++] = data;
384 * If we hit the end of frame, there's
385 * no point in continuing.
387 if (stat & HSSR1_EOF)
389 } while (Ser2HSSR0 & HSSR0_EIF);
391 if (stat & HSSR1_EOF) {
392 si->dma_rx.skb = NULL;
396 skb_reset_mac_header(skb);
397 skb->protocol = htons(ETH_P_IRDA);
398 dev->stats.rx_packets++;
399 dev->stats.rx_bytes += len;
402 * Before we pass the buffer up, allocate a new one.
404 sa1100_irda_rx_alloc(si);
409 * Remap the buffer - it was previously mapped, and we
410 * hope that this succeeds.
412 si->dma_rx.dma = dma_map_single(si->dev, si->dma_rx.skb->data,
419 * We only have to handle RX events here; transmit events go via the TX
420 * DMA handler. We disable RX, process, and the restart RX.
422 static irqreturn_t sa1100_irda_fir_irq(struct net_device *dev, struct sa1100_irda *si)
427 sa1100_stop_dma(si->dma_rx.regs);
430 * Framing error - we throw away the packet completely.
431 * Clearing RXE flushes the error conditions and data
434 if (Ser2HSSR0 & (HSSR0_FRE | HSSR0_RAB)) {
435 dev->stats.rx_errors++;
437 if (Ser2HSSR0 & HSSR0_FRE)
438 dev->stats.rx_frame_errors++;
441 * Clear out the DMA...
443 Ser2HSCR0 = si->hscr0 | HSCR0_HSSP;
446 * Clear selected status bits now, so we
447 * don't miss them next time around.
449 Ser2HSSR0 = HSSR0_FRE | HSSR0_RAB;
453 * Deal with any receive errors. The any of the lowest
454 * 8 bytes in the FIFO may contain an error. We must read
455 * them one by one. The "error" could even be the end of
458 if (Ser2HSSR0 & HSSR0_EIF)
459 sa1100_irda_fir_error(si, dev);
462 * No matter what happens, we must restart reception.
464 sa1100_irda_rx_dma_start(si);
470 * Set the IrDA communications speed.
472 static int sa1100_irda_set_speed(struct sa1100_irda *si, int speed)
475 int brd, ret = -EINVAL;
478 case 9600: case 19200: case 38400:
479 case 57600: case 115200:
480 brd = 3686400 / (16 * speed) - 1;
483 * Stop the receive DMA.
486 sa1100_stop_dma(si->dma_rx.regs);
488 local_irq_save(flags);
491 Ser2HSCR0 = HSCR0_UART;
493 Ser2UTCR1 = brd >> 8;
497 * Clear status register
499 Ser2UTSR0 = UTSR0_REB | UTSR0_RBB | UTSR0_RID;
500 Ser2UTCR3 = UTCR3_RIE | UTCR3_RXE | UTCR3_TXE;
502 if (si->pdata->set_speed)
503 si->pdata->set_speed(si->dev, speed);
506 si->tx_start = sa1100_irda_sir_tx_start;
507 si->irq = sa1100_irda_sir_irq;
509 local_irq_restore(flags);
514 local_irq_save(flags);
519 Ser2HSCR0 = si->hscr0 | HSCR0_HSSP;
523 si->tx_start = sa1100_irda_fir_tx_start;
524 si->irq = sa1100_irda_fir_irq;
526 if (si->pdata->set_speed)
527 si->pdata->set_speed(si->dev, speed);
529 sa1100_irda_rx_alloc(si);
530 sa1100_irda_rx_dma_start(si);
532 local_irq_restore(flags);
544 * Control the power state of the IrDA transmitter.
547 * 1 - short range, lowest power
548 * 2 - medium range, medium power
549 * 3 - maximum range, high power
551 * Currently, only assabet is known to support this.
554 __sa1100_irda_set_power(struct sa1100_irda *si, unsigned int state)
557 if (si->pdata->set_power)
558 ret = si->pdata->set_power(si->dev, state);
563 sa1100_set_power(struct sa1100_irda *si, unsigned int state)
567 ret = __sa1100_irda_set_power(si, state);
574 static irqreturn_t sa1100_irda_irq(int irq, void *dev_id)
576 struct net_device *dev = dev_id;
577 struct sa1100_irda *si = netdev_priv(dev);
579 return si->irq(dev, si);
582 static int sa1100_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev)
584 struct sa1100_irda *si = netdev_priv(dev);
585 int speed = irda_get_next_speed(skb);
588 * Does this packet contain a request to change the interface
589 * speed? If so, remember it until we complete the transmission
592 if (speed != si->speed && speed != -1)
593 si->newspeed = speed;
595 /* If this is an empty frame, we can bypass a lot. */
597 sa1100_irda_check_speed(si);
602 netif_stop_queue(dev);
604 /* We must not already have a skb to transmit... */
605 BUG_ON(si->dma_tx.skb);
607 return si->tx_start(skb, dev, si);
611 sa1100_irda_ioctl(struct net_device *dev, struct ifreq *ifreq, int cmd)
613 struct if_irda_req *rq = (struct if_irda_req *)ifreq;
614 struct sa1100_irda *si = netdev_priv(dev);
615 int ret = -EOPNOTSUPP;
619 if (capable(CAP_NET_ADMIN)) {
621 * We are unable to set the speed if the
622 * device is not running.
625 ret = sa1100_irda_set_speed(si,
628 printk("sa1100_irda_ioctl: SIOCSBANDWIDTH: !netif_running\n");
636 if (capable(CAP_NET_ADMIN)) {
637 irda_device_set_media_busy(dev, TRUE);
643 rq->ifr_receiving = IS_FIR(si) ? 0
644 : si->rx_buff.state != OUTSIDE_FRAME;
654 static int sa1100_irda_startup(struct sa1100_irda *si)
659 * Ensure that the ports for this device are setup correctly.
661 if (si->pdata->startup) {
662 ret = si->pdata->startup(si->dev);
668 * Configure PPC for IRDA - we want to drive TXD2 low.
669 * We also want to drive this pin low during sleep.
676 * Enable HP-SIR modulation, and ensure that the port is disabled.
679 Ser2HSCR0 = HSCR0_UART;
680 Ser2UTCR4 = si->utcr4;
681 Ser2UTCR0 = UTCR0_8BitData;
682 Ser2HSCR2 = HSCR2_TrDataH | HSCR2_RcDataL;
685 * Clear status register
687 Ser2UTSR0 = UTSR0_REB | UTSR0_RBB | UTSR0_RID;
689 ret = sa1100_irda_set_speed(si, si->speed = 9600);
694 if (si->pdata->shutdown)
695 si->pdata->shutdown(si->dev);
701 static void sa1100_irda_shutdown(struct sa1100_irda *si)
704 * Stop all DMA activity.
706 sa1100_stop_dma(si->dma_rx.regs);
707 sa1100_stop_dma(si->dma_tx.regs);
709 /* Disable the port. */
713 if (si->pdata->shutdown)
714 si->pdata->shutdown(si->dev);
717 static int sa1100_irda_start(struct net_device *dev)
719 struct sa1100_irda *si = netdev_priv(dev);
724 err = sa1100_request_dma(DMA_Ser2HSSPRd, "IrDA receive",
725 NULL, NULL, &si->dma_rx.regs);
729 err = sa1100_request_dma(DMA_Ser2HSSPWr, "IrDA transmit",
730 sa1100_irda_firtxdma_irq, dev,
736 * Setup the serial port for the specified speed.
738 err = sa1100_irda_startup(si);
743 * Open a new IrLAP layer instance.
745 si->irlap = irlap_open(dev, &si->qos, "sa1100");
750 err = request_irq(dev->irq, sa1100_irda_irq, 0, dev->name, dev);
755 * Now enable the interrupt and start the queue
758 sa1100_set_power(si, power_level); /* low power mode */
760 netif_start_queue(dev);
764 irlap_close(si->irlap);
767 sa1100_irda_shutdown(si);
769 sa1100_free_dma(si->dma_tx.regs);
771 sa1100_free_dma(si->dma_rx.regs);
776 static int sa1100_irda_stop(struct net_device *dev)
778 struct sa1100_irda *si = netdev_priv(dev);
781 netif_stop_queue(dev);
784 sa1100_irda_shutdown(si);
787 * If we have been doing any DMA activity, make sure we
788 * tidy that up cleanly.
790 skb = si->dma_rx.skb;
792 dma_unmap_single(si->dev, si->dma_rx.dma, HPSIR_MAX_RXLEN,
795 si->dma_rx.skb = NULL;
798 skb = si->dma_tx.skb;
800 dma_unmap_single(si->dev, si->dma_tx.dma, skb->len,
803 si->dma_tx.skb = NULL;
808 irlap_close(si->irlap);
815 sa1100_free_dma(si->dma_tx.regs);
816 sa1100_free_dma(si->dma_rx.regs);
817 free_irq(dev->irq, dev);
819 sa1100_set_power(si, 0);
824 static int sa1100_irda_init_iobuf(iobuff_t *io, int size)
826 io->head = kmalloc(size, GFP_KERNEL | GFP_DMA);
827 if (io->head != NULL) {
829 io->in_frame = FALSE;
830 io->state = OUTSIDE_FRAME;
833 return io->head ? 0 : -ENOMEM;
836 static const struct net_device_ops sa1100_irda_netdev_ops = {
837 .ndo_open = sa1100_irda_start,
838 .ndo_stop = sa1100_irda_stop,
839 .ndo_start_xmit = sa1100_irda_hard_xmit,
840 .ndo_do_ioctl = sa1100_irda_ioctl,
843 static int sa1100_irda_probe(struct platform_device *pdev)
845 struct net_device *dev;
846 struct sa1100_irda *si;
847 unsigned int baudrate_mask;
850 if (!pdev->dev.platform_data)
853 irq = platform_get_irq(pdev, 0);
855 return irq < 0 ? irq : -ENXIO;
857 err = request_mem_region(__PREG(Ser2UTCR0), 0x24, "IrDA") ? 0 : -EBUSY;
860 err = request_mem_region(__PREG(Ser2HSCR0), 0x1c, "IrDA") ? 0 : -EBUSY;
863 err = request_mem_region(__PREG(Ser2HSCR2), 0x04, "IrDA") ? 0 : -EBUSY;
867 dev = alloc_irdadev(sizeof(struct sa1100_irda));
871 SET_NETDEV_DEV(dev, &pdev->dev);
873 si = netdev_priv(dev);
874 si->dev = &pdev->dev;
875 si->pdata = pdev->dev.platform_data;
878 * Initialise the HP-SIR buffers
880 err = sa1100_irda_init_iobuf(&si->rx_buff, 14384);
883 err = sa1100_irda_init_iobuf(&si->tx_buff, 4000);
887 dev->netdev_ops = &sa1100_irda_netdev_ops;
890 irda_init_max_qos_capabilies(&si->qos);
893 * We support original IRDA up to 115k2. (we don't currently
894 * support 4Mbps). Min Turn Time set to 1ms or greater.
896 baudrate_mask = IR_9600;
899 case 4000000: baudrate_mask |= IR_4000000 << 8;
900 case 115200: baudrate_mask |= IR_115200;
901 case 57600: baudrate_mask |= IR_57600;
902 case 38400: baudrate_mask |= IR_38400;
903 case 19200: baudrate_mask |= IR_19200;
906 si->qos.baud_rate.bits &= baudrate_mask;
907 si->qos.min_turn_time.bits = 7;
909 irda_qos_bits_to_value(&si->qos);
911 si->utcr4 = UTCR4_HPSIR;
913 si->utcr4 |= UTCR4_Z1_6us;
916 * Initially enable HP-SIR modulation, and ensure that the port
920 Ser2UTCR4 = si->utcr4;
921 Ser2HSCR0 = HSCR0_UART;
923 err = register_netdev(dev);
925 platform_set_drvdata(pdev, dev);
929 kfree(si->tx_buff.head);
930 kfree(si->rx_buff.head);
933 release_mem_region(__PREG(Ser2HSCR2), 0x04);
935 release_mem_region(__PREG(Ser2HSCR0), 0x1c);
937 release_mem_region(__PREG(Ser2UTCR0), 0x24);
943 static int sa1100_irda_remove(struct platform_device *pdev)
945 struct net_device *dev = platform_get_drvdata(pdev);
948 struct sa1100_irda *si = netdev_priv(dev);
949 unregister_netdev(dev);
950 kfree(si->tx_buff.head);
951 kfree(si->rx_buff.head);
955 release_mem_region(__PREG(Ser2HSCR2), 0x04);
956 release_mem_region(__PREG(Ser2HSCR0), 0x1c);
957 release_mem_region(__PREG(Ser2UTCR0), 0x24);
964 * Suspend the IrDA interface.
966 static int sa1100_irda_suspend(struct platform_device *pdev, pm_message_t state)
968 struct net_device *dev = platform_get_drvdata(pdev);
969 struct sa1100_irda *si;
974 si = netdev_priv(dev);
977 * Stop the transmit queue
979 netif_device_detach(dev);
980 disable_irq(dev->irq);
981 sa1100_irda_shutdown(si);
982 __sa1100_irda_set_power(si, 0);
989 * Resume the IrDA interface.
991 static int sa1100_irda_resume(struct platform_device *pdev)
993 struct net_device *dev = platform_get_drvdata(pdev);
994 struct sa1100_irda *si;
999 si = netdev_priv(dev);
1002 * If we missed a speed change, initialise at the new speed
1003 * directly. It is debatable whether this is actually
1004 * required, but in the interests of continuing from where
1005 * we left off it is desirable. The converse argument is
1006 * that we should re-negotiate at 9600 baud again.
1009 si->speed = si->newspeed;
1013 sa1100_irda_startup(si);
1014 __sa1100_irda_set_power(si, si->power);
1015 enable_irq(dev->irq);
1018 * This automatically wakes up the queue
1020 netif_device_attach(dev);
1026 #define sa1100_irda_suspend NULL
1027 #define sa1100_irda_resume NULL
1030 static struct platform_driver sa1100ir_driver = {
1031 .probe = sa1100_irda_probe,
1032 .remove = sa1100_irda_remove,
1033 .suspend = sa1100_irda_suspend,
1034 .resume = sa1100_irda_resume,
1036 .name = "sa11x0-ir",
1037 .owner = THIS_MODULE,
1041 static int __init sa1100_irda_init(void)
1044 * Limit power level a sensible range.
1046 if (power_level < 1)
1048 if (power_level > 3)
1051 return platform_driver_register(&sa1100ir_driver);
1054 static void __exit sa1100_irda_exit(void)
1056 platform_driver_unregister(&sa1100ir_driver);
1059 module_init(sa1100_irda_init);
1060 module_exit(sa1100_irda_exit);
1061 module_param(power_level, int, 0);
1062 module_param(tx_lpm, int, 0);
1063 module_param(max_rate, int, 0);
1065 MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>");
1066 MODULE_DESCRIPTION("StrongARM SA1100 IrDA driver");
1067 MODULE_LICENSE("GPL");
1068 MODULE_PARM_DESC(power_level, "IrDA power level, 1 (low) to 3 (high)");
1069 MODULE_PARM_DESC(tx_lpm, "Enable transmitter low power (1.6us) mode");
1070 MODULE_PARM_DESC(max_rate, "Maximum baud rate (4000000, 115200, 57600, 38400, 19200, 9600)");
1071 MODULE_ALIAS("platform:sa11x0-ir");