1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com>
4 <http://rt2x00.serialmonkey.com>
10 Abstract: Data structures for the rt2x00debug.
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); \
37 unsigned int word_base; \
38 unsigned int word_size; \
39 unsigned int word_count; \
44 * Reference to the modules structure.
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 */