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