| 1 |
|
| 2 | #ifndef _KERNEL_IRQ_DEBUGFS_H
|
| 3 | #define _KERNEL_IRQ_DEBUGFS_H
|
| 4 |
|
| 5 | #ifdef CONFIG_GENERIC_IRQ_DEBUGFS
|
| 6 | #include <linux/debugfs.h>
|
| 7 |
|
| 8 | struct irq_bit_descr {
|
| 9 | unsigned int mask;
|
| 10 | char *name;
|
| 11 | };
|
| 12 |
|
| 13 | #define BIT_MASK_DESCR(m) { .mask = m, .name = #m }
|
| 14 |
|
| 15 | void irq_debug_show_bits(struct seq_file *m, int ind, unsigned int state,
|
| 16 | const struct irq_bit_descr *sd, int size);
|
| 17 |
|
| 18 | void irq_add_debugfs_entry(unsigned int irq, struct irq_desc *desc);
|
| 19 | static inline void irq_remove_debugfs_entry(struct irq_desc *desc)
|
| 20 | {
|
| 21 | debugfs_remove(desc->debugfs_file);
|
| 22 | kfree(desc->dev_name);
|
| 23 | }
|
| 24 | void irq_debugfs_copy_devname(int irq, struct device *dev);
|
| 25 | # ifdef CONFIG_IRQ_DOMAIN
|
| 26 | void irq_domain_debugfs_init(struct dentry *root);
|
| 27 | # else
|
| 28 | static inline void irq_domain_debugfs_init(struct dentry *root)
|
| 29 | {
|
| 30 | }
|
| 31 | # endif
|
| 32 | #else
|
| 33 | static inline void irq_add_debugfs_entry(unsigned int irq, struct irq_desc *d)
|
| 34 | {
|
| 35 | }
|
| 36 | static inline void irq_remove_debugfs_entry(struct irq_desc *d)
|
| 37 | {
|
| 38 | }
|
| 39 | static inline void irq_debugfs_copy_devname(int irq, struct device *dev)
|
| 40 | {
|
| 41 | }
|
| 42 | #endif
|
| 43 |
|
| 44 | #endif
|