2 * arch/arm/mach-ixp4xx/nas100d-power.c
4 * NAS 100d Power/Reset driver
6 * Copyright (C) 2005 Tower Technologies
8 * based on nas100d-io.c
9 * Copyright (C) 2004 Karen Spearel
11 * Author: Alessandro Zummo <a.zummo@towertech.it>
12 * Maintainers: http://www.nslu2-linux.org/
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
20 #include <linux/module.h>
21 #include <linux/reboot.h>
22 #include <linux/interrupt.h>
24 #include <asm/mach-types.h>
26 extern void ctrl_alt_del(void);
28 static irqreturn_t
nas100d_reset_handler(int irq
, void *dev_id
, struct pt_regs
*regs
)
30 /* Signal init to do the ctrlaltdel action, this will bypass init if
31 * it hasn't started and do a kernel_restart.
38 static int __init
nas100d_power_init(void)
40 if (!(machine_is_nas100d()))
43 set_irq_type(NAS100D_RB_IRQ
, IRQT_LOW
);
45 if (request_irq(NAS100D_RB_IRQ
, &nas100d_reset_handler
,
46 SA_INTERRUPT
, "NAS100D reset button", NULL
) < 0) {
48 printk(KERN_DEBUG
"Reset Button IRQ %d not available\n",
57 static void __exit
nas100d_power_exit(void)
59 if (!(machine_is_nas100d()))
62 free_irq(NAS100D_RB_IRQ
, NULL
);
65 module_init(nas100d_power_init
);
66 module_exit(nas100d_power_exit
);
68 MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
69 MODULE_DESCRIPTION("NAS100D Power/Reset driver");
70 MODULE_LICENSE("GPL");
This page took 0.031425 seconds and 5 git commands to generate.