2 * Driver for Feature Integration Technology Inc. (aka Fintek) LPC CIR
4 * Copyright (C) 2011 Jarod Wilson <jarod@redhat.com>
6 * Special thanks to Fintek for providing hardware and spec sheets.
7 * This driver is based upon the nuvoton, ite and ene drivers for
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
21 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
23 #include <linux/kernel.h>
24 #include <linux/module.h>
25 #include <linux/pnp.h>
27 #include <linux/interrupt.h>
28 #include <linux/sched.h>
29 #include <linux/slab.h>
30 #include <media/rc-core.h>
32 #include "fintek-cir.h"
34 /* write val to config reg */
35 static inline void fintek_cr_write(struct fintek_dev
*fintek
, u8 val
, u8 reg
)
37 fit_dbg("%s: reg 0x%02x, val 0x%02x (ip/dp: %02x/%02x)",
38 __func__
, reg
, val
, fintek
->cr_ip
, fintek
->cr_dp
);
39 outb(reg
, fintek
->cr_ip
);
40 outb(val
, fintek
->cr_dp
);
43 /* read val from config reg */
44 static inline u8
fintek_cr_read(struct fintek_dev
*fintek
, u8 reg
)
48 outb(reg
, fintek
->cr_ip
);
49 val
= inb(fintek
->cr_dp
);
51 fit_dbg("%s: reg 0x%02x, val 0x%02x (ip/dp: %02x/%02x)",
52 __func__
, reg
, val
, fintek
->cr_ip
, fintek
->cr_dp
);
56 /* update config register bit without changing other bits */
57 static inline void fintek_set_reg_bit(struct fintek_dev
*fintek
, u8 val
, u8 reg
)
59 u8 tmp
= fintek_cr_read(fintek
, reg
) | val
;
60 fintek_cr_write(fintek
, tmp
, reg
);
63 /* clear config register bit without changing other bits */
64 static inline void fintek_clear_reg_bit(struct fintek_dev
*fintek
, u8 val
, u8 reg
)
66 u8 tmp
= fintek_cr_read(fintek
, reg
) & ~val
;
67 fintek_cr_write(fintek
, tmp
, reg
);
70 /* enter config mode */
71 static inline void fintek_config_mode_enable(struct fintek_dev
*fintek
)
73 /* Enabling Config Mode explicitly requires writing 2x */
74 outb(CONFIG_REG_ENABLE
, fintek
->cr_ip
);
75 outb(CONFIG_REG_ENABLE
, fintek
->cr_ip
);
78 /* exit config mode */
79 static inline void fintek_config_mode_disable(struct fintek_dev
*fintek
)
81 outb(CONFIG_REG_DISABLE
, fintek
->cr_ip
);
85 * When you want to address a specific logical device, write its logical
86 * device number to GCR_LOGICAL_DEV_NO
88 static inline void fintek_select_logical_dev(struct fintek_dev
*fintek
, u8 ldev
)
90 fintek_cr_write(fintek
, ldev
, GCR_LOGICAL_DEV_NO
);
93 /* write val to cir config register */
94 static inline void fintek_cir_reg_write(struct fintek_dev
*fintek
, u8 val
, u8 offset
)
96 outb(val
, fintek
->cir_addr
+ offset
);
99 /* read val from cir config register */
100 static u8
fintek_cir_reg_read(struct fintek_dev
*fintek
, u8 offset
)
102 return inb(fintek
->cir_addr
+ offset
);
105 /* dump current cir register contents */
106 static void cir_dump_regs(struct fintek_dev
*fintek
)
108 fintek_config_mode_enable(fintek
);
109 fintek_select_logical_dev(fintek
, fintek
->logical_dev_cir
);
111 pr_info("%s: Dump CIR logical device registers:\n", FINTEK_DRIVER_NAME
);
112 pr_info(" * CR CIR BASE ADDR: 0x%x\n",
113 (fintek_cr_read(fintek
, CIR_CR_BASE_ADDR_HI
) << 8) |
114 fintek_cr_read(fintek
, CIR_CR_BASE_ADDR_LO
));
115 pr_info(" * CR CIR IRQ NUM: 0x%x\n",
116 fintek_cr_read(fintek
, CIR_CR_IRQ_SEL
));
118 fintek_config_mode_disable(fintek
);
120 pr_info("%s: Dump CIR registers:\n", FINTEK_DRIVER_NAME
);
121 pr_info(" * STATUS: 0x%x\n",
122 fintek_cir_reg_read(fintek
, CIR_STATUS
));
123 pr_info(" * CONTROL: 0x%x\n",
124 fintek_cir_reg_read(fintek
, CIR_CONTROL
));
125 pr_info(" * RX_DATA: 0x%x\n",
126 fintek_cir_reg_read(fintek
, CIR_RX_DATA
));
127 pr_info(" * TX_CONTROL: 0x%x\n",
128 fintek_cir_reg_read(fintek
, CIR_TX_CONTROL
));
129 pr_info(" * TX_DATA: 0x%x\n",
130 fintek_cir_reg_read(fintek
, CIR_TX_DATA
));
133 /* detect hardware features */
134 static int fintek_hw_detect(struct fintek_dev
*fintek
)
137 u8 chip_major
, chip_minor
;
138 u8 vendor_major
, vendor_minor
;
139 u8 portsel
, ir_class
;
142 fintek_config_mode_enable(fintek
);
144 /* Check if we're using config port 0x4e or 0x2e */
145 portsel
= fintek_cr_read(fintek
, GCR_CONFIG_PORT_SEL
);
146 if (portsel
== 0xff) {
147 fit_pr(KERN_INFO
, "first portsel read was bunk, trying alt");
148 fintek_config_mode_disable(fintek
);
149 fintek
->cr_ip
= CR_INDEX_PORT2
;
150 fintek
->cr_dp
= CR_DATA_PORT2
;
151 fintek_config_mode_enable(fintek
);
152 portsel
= fintek_cr_read(fintek
, GCR_CONFIG_PORT_SEL
);
154 fit_dbg("portsel reg: 0x%02x", portsel
);
156 ir_class
= fintek_cir_reg_read(fintek
, CIR_CR_CLASS
);
157 fit_dbg("ir_class reg: 0x%02x", ir_class
);
162 fintek
->hw_tx_capable
= true;
166 fintek
->hw_tx_capable
= false;
170 chip_major
= fintek_cr_read(fintek
, GCR_CHIP_ID_HI
);
171 chip_minor
= fintek_cr_read(fintek
, GCR_CHIP_ID_LO
);
172 chip
= chip_major
<< 8 | chip_minor
;
174 vendor_major
= fintek_cr_read(fintek
, GCR_VENDOR_ID_HI
);
175 vendor_minor
= fintek_cr_read(fintek
, GCR_VENDOR_ID_LO
);
176 vendor
= vendor_major
<< 8 | vendor_minor
;
178 if (vendor
!= VENDOR_ID_FINTEK
)
179 fit_pr(KERN_WARNING
, "Unknown vendor ID: 0x%04x", vendor
);
181 fit_dbg("Read Fintek vendor ID from chip");
183 fintek_config_mode_disable(fintek
);
185 spin_lock_irqsave(&fintek
->fintek_lock
, flags
);
186 fintek
->chip_major
= chip_major
;
187 fintek
->chip_minor
= chip_minor
;
188 fintek
->chip_vendor
= vendor
;
191 * Newer reviews of this chipset uses port 8 instead of 5
193 if ((chip
!= 0x0408) && (chip
!= 0x0804))
194 fintek
->logical_dev_cir
= LOGICAL_DEV_CIR_REV2
;
196 fintek
->logical_dev_cir
= LOGICAL_DEV_CIR_REV1
;
198 spin_unlock_irqrestore(&fintek
->fintek_lock
, flags
);
203 static void fintek_cir_ldev_init(struct fintek_dev
*fintek
)
205 /* Select CIR logical device and enable */
206 fintek_select_logical_dev(fintek
, fintek
->logical_dev_cir
);
207 fintek_cr_write(fintek
, LOGICAL_DEV_ENABLE
, CIR_CR_DEV_EN
);
209 /* Write allocated CIR address and IRQ information to hardware */
210 fintek_cr_write(fintek
, fintek
->cir_addr
>> 8, CIR_CR_BASE_ADDR_HI
);
211 fintek_cr_write(fintek
, fintek
->cir_addr
& 0xff, CIR_CR_BASE_ADDR_LO
);
213 fintek_cr_write(fintek
, fintek
->cir_irq
, CIR_CR_IRQ_SEL
);
215 fit_dbg("CIR initialized, base io address: 0x%lx, irq: %d (len: %d)",
216 fintek
->cir_addr
, fintek
->cir_irq
, fintek
->cir_port_len
);
219 /* enable CIR interrupts */
220 static void fintek_enable_cir_irq(struct fintek_dev
*fintek
)
222 fintek_cir_reg_write(fintek
, CIR_STATUS_IRQ_EN
, CIR_STATUS
);
225 static void fintek_cir_regs_init(struct fintek_dev
*fintek
)
227 /* clear any and all stray interrupts */
228 fintek_cir_reg_write(fintek
, CIR_STATUS_IRQ_MASK
, CIR_STATUS
);
230 /* and finally, enable interrupts */
231 fintek_enable_cir_irq(fintek
);
234 static void fintek_enable_wake(struct fintek_dev
*fintek
)
236 fintek_config_mode_enable(fintek
);
237 fintek_select_logical_dev(fintek
, LOGICAL_DEV_ACPI
);
239 /* Allow CIR PME's to wake system */
240 fintek_set_reg_bit(fintek
, ACPI_WAKE_EN_CIR_BIT
, LDEV_ACPI_WAKE_EN_REG
);
241 /* Enable CIR PME's */
242 fintek_set_reg_bit(fintek
, ACPI_PME_CIR_BIT
, LDEV_ACPI_PME_EN_REG
);
243 /* Clear CIR PME status register */
244 fintek_set_reg_bit(fintek
, ACPI_PME_CIR_BIT
, LDEV_ACPI_PME_CLR_REG
);
246 fintek_set_reg_bit(fintek
, ACPI_STATE_CIR_BIT
, LDEV_ACPI_STATE_REG
);
248 fintek_config_mode_disable(fintek
);
251 static int fintek_cmdsize(u8 cmd
, u8 subcmd
)
256 case BUF_COMMAND_NULL
:
257 if (subcmd
== BUF_HW_CMD_HEADER
)
260 case BUF_HW_CMD_HEADER
:
261 if (subcmd
== BUF_CMD_G_REVISION
)
264 case BUF_COMMAND_HEADER
:
266 case BUF_CMD_S_CARRIER
:
267 case BUF_CMD_S_TIMEOUT
:
268 case BUF_RSP_PULSE_COUNT
:
271 case BUF_CMD_SIG_END
:
272 case BUF_CMD_S_TXMASK
:
273 case BUF_CMD_S_RXSENSOR
:
282 /* process ir data stored in driver buffer */
283 static void fintek_process_rx_ir_data(struct fintek_dev
*fintek
)
285 struct ir_raw_event rawir
= {};
290 for (i
= 0; i
< fintek
->pkts
; i
++) {
291 sample
= fintek
->buf
[i
];
292 switch (fintek
->parser_state
) {
294 fintek
->cmd
= sample
;
295 if ((fintek
->cmd
== BUF_COMMAND_HEADER
) ||
296 ((fintek
->cmd
& BUF_COMMAND_MASK
) !=
298 fintek
->parser_state
= SUBCMD
;
301 fintek
->rem
= (fintek
->cmd
& BUF_LEN_MASK
);
302 fit_dbg("%s: rem: 0x%02x", __func__
, fintek
->rem
);
304 fintek
->parser_state
= PARSE_IRDATA
;
306 ir_raw_event_reset(fintek
->rdev
);
309 fintek
->rem
= fintek_cmdsize(fintek
->cmd
, sample
);
310 fintek
->parser_state
= CMD_DATA
;
317 rawir
.pulse
= ((sample
& BUF_PULSE_BIT
) != 0);
318 rawir
.duration
= US_TO_NS((sample
& BUF_SAMPLE_MASK
)
319 * CIR_SAMPLE_PERIOD
);
321 fit_dbg("Storing %s with duration %d",
322 rawir
.pulse
? "pulse" : "space",
324 if (ir_raw_event_store_with_filter(fintek
->rdev
,
330 if ((fintek
->parser_state
!= CMD_HEADER
) && !fintek
->rem
)
331 fintek
->parser_state
= CMD_HEADER
;
337 fit_dbg("Calling ir_raw_event_handle");
338 ir_raw_event_handle(fintek
->rdev
);
342 /* copy data from hardware rx register into driver buffer */
343 static void fintek_get_rx_ir_data(struct fintek_dev
*fintek
, u8 rx_irqs
)
348 spin_lock_irqsave(&fintek
->fintek_lock
, flags
);
351 * We must read data from CIR_RX_DATA until the hardware IR buffer
352 * is empty and clears the RX_TIMEOUT and/or RX_RECEIVE flags in
353 * the CIR_STATUS register
356 sample
= fintek_cir_reg_read(fintek
, CIR_RX_DATA
);
357 fit_dbg("%s: sample: 0x%02x", __func__
, sample
);
359 fintek
->buf
[fintek
->pkts
] = sample
;
362 status
= fintek_cir_reg_read(fintek
, CIR_STATUS
);
363 if (!(status
& CIR_STATUS_IRQ_EN
))
365 } while (status
& rx_irqs
);
367 fintek_process_rx_ir_data(fintek
);
369 spin_unlock_irqrestore(&fintek
->fintek_lock
, flags
);
372 static void fintek_cir_log_irqs(u8 status
)
374 fit_pr(KERN_INFO
, "IRQ 0x%02x:%s%s%s%s%s", status
,
375 status
& CIR_STATUS_IRQ_EN
? " IRQEN" : "",
376 status
& CIR_STATUS_TX_FINISH
? " TXF" : "",
377 status
& CIR_STATUS_TX_UNDERRUN
? " TXU" : "",
378 status
& CIR_STATUS_RX_TIMEOUT
? " RXTO" : "",
379 status
& CIR_STATUS_RX_RECEIVE
? " RXOK" : "");
382 /* interrupt service routine for incoming and outgoing CIR data */
383 static irqreturn_t
fintek_cir_isr(int irq
, void *data
)
385 struct fintek_dev
*fintek
= data
;
388 fit_dbg_verbose("%s firing", __func__
);
390 fintek_config_mode_enable(fintek
);
391 fintek_select_logical_dev(fintek
, fintek
->logical_dev_cir
);
392 fintek_config_mode_disable(fintek
);
395 * Get IR Status register contents. Write 1 to ack/clear
397 * bit: reg name - description
398 * 3: TX_FINISH - TX is finished
399 * 2: TX_UNDERRUN - TX underrun
400 * 1: RX_TIMEOUT - RX data timeout
401 * 0: RX_RECEIVE - RX data received
403 status
= fintek_cir_reg_read(fintek
, CIR_STATUS
);
404 if (!(status
& CIR_STATUS_IRQ_MASK
) || status
== 0xff) {
405 fit_dbg_verbose("%s exiting, IRSTS 0x%02x", __func__
, status
);
406 fintek_cir_reg_write(fintek
, CIR_STATUS_IRQ_MASK
, CIR_STATUS
);
407 return IRQ_RETVAL(IRQ_NONE
);
411 fintek_cir_log_irqs(status
);
413 rx_irqs
= status
& (CIR_STATUS_RX_RECEIVE
| CIR_STATUS_RX_TIMEOUT
);
415 fintek_get_rx_ir_data(fintek
, rx_irqs
);
417 /* ack/clear all irq flags we've got */
418 fintek_cir_reg_write(fintek
, status
, CIR_STATUS
);
420 fit_dbg_verbose("%s done", __func__
);
421 return IRQ_RETVAL(IRQ_HANDLED
);
424 static void fintek_enable_cir(struct fintek_dev
*fintek
)
426 /* set IRQ enabled */
427 fintek_cir_reg_write(fintek
, CIR_STATUS_IRQ_EN
, CIR_STATUS
);
429 fintek_config_mode_enable(fintek
);
431 /* enable the CIR logical device */
432 fintek_select_logical_dev(fintek
, fintek
->logical_dev_cir
);
433 fintek_cr_write(fintek
, LOGICAL_DEV_ENABLE
, CIR_CR_DEV_EN
);
435 fintek_config_mode_disable(fintek
);
437 /* clear all pending interrupts */
438 fintek_cir_reg_write(fintek
, CIR_STATUS_IRQ_MASK
, CIR_STATUS
);
440 /* enable interrupts */
441 fintek_enable_cir_irq(fintek
);
444 static void fintek_disable_cir(struct fintek_dev
*fintek
)
446 fintek_config_mode_enable(fintek
);
448 /* disable the CIR logical device */
449 fintek_select_logical_dev(fintek
, fintek
->logical_dev_cir
);
450 fintek_cr_write(fintek
, LOGICAL_DEV_DISABLE
, CIR_CR_DEV_EN
);
452 fintek_config_mode_disable(fintek
);
455 static int fintek_open(struct rc_dev
*dev
)
457 struct fintek_dev
*fintek
= dev
->priv
;
460 spin_lock_irqsave(&fintek
->fintek_lock
, flags
);
461 fintek_enable_cir(fintek
);
462 spin_unlock_irqrestore(&fintek
->fintek_lock
, flags
);
467 static void fintek_close(struct rc_dev
*dev
)
469 struct fintek_dev
*fintek
= dev
->priv
;
472 spin_lock_irqsave(&fintek
->fintek_lock
, flags
);
473 fintek_disable_cir(fintek
);
474 spin_unlock_irqrestore(&fintek
->fintek_lock
, flags
);
477 /* Allocate memory, probe hardware, and initialize everything */
478 static int fintek_probe(struct pnp_dev
*pdev
, const struct pnp_device_id
*dev_id
)
480 struct fintek_dev
*fintek
;
484 fintek
= kzalloc(sizeof(struct fintek_dev
), GFP_KERNEL
);
488 /* input device for IR remote (and tx) */
489 rdev
= rc_allocate_device(RC_DRIVER_IR_RAW
);
491 goto exit_free_dev_rdev
;
494 /* validate pnp resources */
495 if (!pnp_port_valid(pdev
, 0)) {
496 dev_err(&pdev
->dev
, "IR PNP Port not valid!\n");
497 goto exit_free_dev_rdev
;
500 if (!pnp_irq_valid(pdev
, 0)) {
501 dev_err(&pdev
->dev
, "IR PNP IRQ not valid!\n");
502 goto exit_free_dev_rdev
;
505 fintek
->cir_addr
= pnp_port_start(pdev
, 0);
506 fintek
->cir_irq
= pnp_irq(pdev
, 0);
507 fintek
->cir_port_len
= pnp_port_len(pdev
, 0);
509 fintek
->cr_ip
= CR_INDEX_PORT
;
510 fintek
->cr_dp
= CR_DATA_PORT
;
512 spin_lock_init(&fintek
->fintek_lock
);
514 pnp_set_drvdata(pdev
, fintek
);
517 ret
= fintek_hw_detect(fintek
);
519 goto exit_free_dev_rdev
;
521 /* Initialize CIR & CIR Wake Logical Devices */
522 fintek_config_mode_enable(fintek
);
523 fintek_cir_ldev_init(fintek
);
524 fintek_config_mode_disable(fintek
);
526 /* Initialize CIR & CIR Wake Config Registers */
527 fintek_cir_regs_init(fintek
);
529 /* Set up the rc device */
531 rdev
->allowed_protocols
= RC_PROTO_BIT_ALL_IR_DECODER
;
532 rdev
->open
= fintek_open
;
533 rdev
->close
= fintek_close
;
534 rdev
->device_name
= FINTEK_DESCRIPTION
;
535 rdev
->input_phys
= "fintek/cir0";
536 rdev
->input_id
.bustype
= BUS_HOST
;
537 rdev
->input_id
.vendor
= VENDOR_ID_FINTEK
;
538 rdev
->input_id
.product
= fintek
->chip_major
;
539 rdev
->input_id
.version
= fintek
->chip_minor
;
540 rdev
->dev
.parent
= &pdev
->dev
;
541 rdev
->driver_name
= FINTEK_DRIVER_NAME
;
542 rdev
->map_name
= RC_MAP_RC6_MCE
;
543 rdev
->timeout
= US_TO_NS(1000);
544 /* rx resolution is hardwired to 50us atm, 1, 25, 100 also possible */
545 rdev
->rx_resolution
= US_TO_NS(CIR_SAMPLE_PERIOD
);
550 /* now claim resources */
551 if (!request_region(fintek
->cir_addr
,
552 fintek
->cir_port_len
, FINTEK_DRIVER_NAME
))
553 goto exit_free_dev_rdev
;
555 if (request_irq(fintek
->cir_irq
, fintek_cir_isr
, IRQF_SHARED
,
556 FINTEK_DRIVER_NAME
, (void *)fintek
))
557 goto exit_free_cir_addr
;
559 ret
= rc_register_device(rdev
);
563 device_init_wakeup(&pdev
->dev
, true);
565 fit_pr(KERN_NOTICE
, "driver has been successfully loaded\n");
567 cir_dump_regs(fintek
);
572 free_irq(fintek
->cir_irq
, fintek
);
574 release_region(fintek
->cir_addr
, fintek
->cir_port_len
);
576 rc_free_device(rdev
);
582 static void fintek_remove(struct pnp_dev
*pdev
)
584 struct fintek_dev
*fintek
= pnp_get_drvdata(pdev
);
587 spin_lock_irqsave(&fintek
->fintek_lock
, flags
);
589 fintek_disable_cir(fintek
);
590 fintek_cir_reg_write(fintek
, CIR_STATUS_IRQ_MASK
, CIR_STATUS
);
591 /* enable CIR Wake (for IR power-on) */
592 fintek_enable_wake(fintek
);
593 spin_unlock_irqrestore(&fintek
->fintek_lock
, flags
);
596 free_irq(fintek
->cir_irq
, fintek
);
597 release_region(fintek
->cir_addr
, fintek
->cir_port_len
);
599 rc_unregister_device(fintek
->rdev
);
604 static int fintek_suspend(struct pnp_dev
*pdev
, pm_message_t state
)
606 struct fintek_dev
*fintek
= pnp_get_drvdata(pdev
);
609 fit_dbg("%s called", __func__
);
611 spin_lock_irqsave(&fintek
->fintek_lock
, flags
);
613 /* disable all CIR interrupts */
614 fintek_cir_reg_write(fintek
, CIR_STATUS_IRQ_MASK
, CIR_STATUS
);
616 spin_unlock_irqrestore(&fintek
->fintek_lock
, flags
);
618 fintek_config_mode_enable(fintek
);
620 /* disable cir logical dev */
621 fintek_select_logical_dev(fintek
, fintek
->logical_dev_cir
);
622 fintek_cr_write(fintek
, LOGICAL_DEV_DISABLE
, CIR_CR_DEV_EN
);
624 fintek_config_mode_disable(fintek
);
626 /* make sure wake is enabled */
627 fintek_enable_wake(fintek
);
632 static int fintek_resume(struct pnp_dev
*pdev
)
634 struct fintek_dev
*fintek
= pnp_get_drvdata(pdev
);
636 fit_dbg("%s called", __func__
);
639 fintek_enable_cir_irq(fintek
);
641 /* Enable CIR logical device */
642 fintek_config_mode_enable(fintek
);
643 fintek_select_logical_dev(fintek
, fintek
->logical_dev_cir
);
644 fintek_cr_write(fintek
, LOGICAL_DEV_ENABLE
, CIR_CR_DEV_EN
);
646 fintek_config_mode_disable(fintek
);
648 fintek_cir_regs_init(fintek
);
653 static void fintek_shutdown(struct pnp_dev
*pdev
)
655 struct fintek_dev
*fintek
= pnp_get_drvdata(pdev
);
656 fintek_enable_wake(fintek
);
659 static const struct pnp_device_id fintek_ids
[] = {
660 { "FIT0002", 0 }, /* CIR */
664 static struct pnp_driver fintek_driver
= {
665 .name
= FINTEK_DRIVER_NAME
,
666 .id_table
= fintek_ids
,
667 .flags
= PNP_DRIVER_RES_DO_NOT_CHANGE
,
668 .probe
= fintek_probe
,
669 .remove
= fintek_remove
,
670 .suspend
= fintek_suspend
,
671 .resume
= fintek_resume
,
672 .shutdown
= fintek_shutdown
,
675 module_param(debug
, int, S_IRUGO
| S_IWUSR
);
676 MODULE_PARM_DESC(debug
, "Enable debugging output");
678 MODULE_DEVICE_TABLE(pnp
, fintek_ids
);
679 MODULE_DESCRIPTION(FINTEK_DESCRIPTION
" driver");
681 MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
682 MODULE_LICENSE("GPL");
684 module_pnp_driver(fintek_driver
);