WIP FPC-III support
[linux/fpc-iii.git] / drivers / net / wireless / ralink / rt2x00 / rt2x00debug.h
blob86658eca550cb0be5486d861bc403c6fb64c85f9
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com>
4 <http://rt2x00.serialmonkey.com>
6 */
8 /*
9 Module: rt2x00debug
10 Abstract: Data structures for the rt2x00debug.
13 #ifndef RT2X00DEBUG_H
14 #define RT2X00DEBUG_H
16 struct rt2x00_dev;
18 /**
19 * enum rt2x00debugfs_entry_flags: Flags for debugfs registry entry
21 * @RT2X00DEBUGFS_OFFSET: rt2x00lib should pass the register offset
22 * as argument when using the callback function read()/write()
24 enum rt2x00debugfs_entry_flags {
25 RT2X00DEBUGFS_OFFSET = (1 << 0),
28 #define RT2X00DEBUGFS_REGISTER_ENTRY(__name, __type) \
29 struct reg##__name { \
30 __type (*read)(struct rt2x00_dev *rt2x00dev, \
31 const unsigned int word); \
32 void (*write)(struct rt2x00_dev *rt2x00dev, \
33 const unsigned int word, __type data); \
35 unsigned int flags; \
37 unsigned int word_base; \
38 unsigned int word_size; \
39 unsigned int word_count; \
40 } __name
42 struct rt2x00debug {
44 * Reference to the modules structure.
46 struct module *owner;
49 * Register access entries.
51 RT2X00DEBUGFS_REGISTER_ENTRY(csr, u32);
52 RT2X00DEBUGFS_REGISTER_ENTRY(eeprom, u16);
53 RT2X00DEBUGFS_REGISTER_ENTRY(bbp, u8);
54 RT2X00DEBUGFS_REGISTER_ENTRY(rf, u32);
55 RT2X00DEBUGFS_REGISTER_ENTRY(rfcsr, u8);
58 #endif /* RT2X00DEBUG_H */