xref: /linux/drivers/soundwire/irq.h (revision 1553a1c48281243359a9529a10ddb551f3b967ab)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (C) 2023 Cirrus Logic, Inc. and
4  *                    Cirrus Logic International Semiconductor Ltd.
5  */
6 
7 #ifndef __SDW_IRQ_H
8 #define __SDW_IRQ_H
9 
10 #include <linux/soundwire/sdw.h>
11 #include <linux/fwnode.h>
12 
13 #if IS_ENABLED(CONFIG_IRQ_DOMAIN)
14 
15 int sdw_irq_create(struct sdw_bus *bus,
16 		   struct fwnode_handle *fwnode);
17 void sdw_irq_delete(struct sdw_bus *bus);
18 void sdw_irq_create_mapping(struct sdw_slave *slave);
19 void sdw_irq_dispose_mapping(struct sdw_slave *slave);
20 
21 #else /* CONFIG_IRQ_DOMAIN */
22 
23 static inline int sdw_irq_create(struct sdw_bus *bus,
24 				 struct fwnode_handle *fwnode)
25 {
26 	return 0;
27 }
28 
29 static inline void sdw_irq_delete(struct sdw_bus *bus)
30 {
31 }
32 
33 static inline void sdw_irq_create_mapping(struct sdw_slave *slave)
34 {
35 }
36 
37 static inline void sdw_irq_dispose_mapping(struct sdw_slave *slave)
38 {
39 }
40 
41 #endif /* CONFIG_IRQ_DOMAIN */
42 
43 #endif /* __SDW_IRQ_H */
44