New file: acx_util.h
[acx-mac80211.git] / irq.c
blob446359efef0f3c2291acd7e94cbd95a71894c69d
1 /*
2 * IRQ handling: top half, bottom half (halves?) and utilities.
4 * This file is mainly modeled on the b43 way of doing things.
6 * Copyright (c) 2008, Francis Galiegue <fgaliegue@gmail.com> for the ACX100
7 * driver project.
9 * This file is licensed under GPLv2.
11 #include <linux/irq.h>
13 #include "acx_config.h"
14 #include "acx_log.h"
15 #include "acx_struct.h"
16 #include "acx_irq.h"
19 * TODO: implement!
22 //static irqreturn_t acx_interrupt_handler(int irq, void *dev_id);
25 * acx_enable_irqs() and acx_disable_irqs():
28 /**
29 * acx_enable_irqs(): set the interrupt mask on the card. Should be called with
30 * a mask saved by the acx_disable_irqs() function.
31 * @adev: the device on which to enable the IRQs.
32 * @mask: the mask to apply to this device.
34 //void acx_enable_irqs(acx_device_t *adev, u16 mask)
35 //{
36 // write_reg16(adev, IO_ACX_IRQ_MASK, mask);
37 // write_reg16(adev, IO_ACX_FEMR, 0x0);
38 //}
40 /**
41 * acx_disable_irqs(): set an interrupt mask on the card, and return the mask
42 * that was present on the card.
43 * @adev: the device on which to disable the IRQs.
44 * @mask: the mask to set.
46 * FIXME: I couldn't actually find an example of reading the current interrupt
47 * mask, but it would make sense that you read it from the same location that
48 * you write to...
50 //u16 acx_disable_irqs(acx_device_t *adev, u16 mask)
51 //{
52 // u16 saved_mask = read_reg16(adev, IO_ACX_IRQ_MASK);
53 // write_reg16(adev, IO_ACX_IRQ_MASK, mask);
54 // write_reg16(adev, IO_ACX_FEMR, 0x0);
55 // return saved_mask;
56 //}