xref: /linux/sound/soc/sdca/sdca_class.h (revision e76ccf19e22a74309bb9c14e64bb97ade3c5fee8)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * The MIPI SDCA specification is available for public downloads at
4  * https://www.mipi.org/mipi-sdca-v1-0-download
5  *
6  * Copyright (C) 2025 Cirrus Logic, Inc. and
7  *                    Cirrus Logic International Semiconductor Ltd.
8  */
9 
10 #ifndef __SDCA_CLASS_H__
11 #define __SDCA_CLASS_H__
12 
13 #include <linux/completion.h>
14 #include <linux/mutex.h>
15 #include <linux/workqueue.h>
16 
17 struct device;
18 struct regmap;
19 struct sdw_slave;
20 struct sdca_function_data;
21 
22 struct sdca_class_drv {
23 	struct device *dev;
24 	struct regmap *dev_regmap;
25 	struct sdw_slave *sdw;
26 
27 	struct sdca_interrupt_info *irq_info;
28 
29 	struct mutex regmap_lock;
30 	/* Serialise function initialisations */
31 	struct mutex init_lock;
32 	struct work_struct boot_work;
33 	struct completion device_attach;
34 
35 	bool attached;
36 };
37 
38 #endif /* __SDCA_CLASS_H__ */
39