xref: /linux/include/sound/sdca_ump.h (revision daab108504be73182c16a72b9cfe47ac3b1928ca)
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_UMP_H__
11 #define __SDCA_UMP_H__
12 
13 struct regmap;
14 struct sdca_control;
15 struct sdca_entity;
16 struct sdca_function_data;
17 struct snd_soc_component;
18 
19 int sdca_ump_get_owner_host(struct device *dev,
20 			    struct regmap *function_regmap,
21 			    struct sdca_function_data *function,
22 			    struct sdca_entity *entity,
23 			    struct sdca_control *control);
24 int sdca_ump_set_owner_device(struct device *dev,
25 			      struct regmap *function_regmap,
26 			      struct sdca_function_data *function,
27 			      struct sdca_entity *entity,
28 			      struct sdca_control *control);
29 int sdca_ump_read_message(struct device *dev,
30 			  struct regmap *device_regmap,
31 			  struct regmap *function_regmap,
32 			  struct sdca_function_data *function,
33 			  struct sdca_entity *entity,
34 			  unsigned int offset_sel, unsigned int length_sel,
35 			  void **msg);
36 int sdca_ump_write_message(struct device *dev,
37 			   struct regmap *device_regmap,
38 			   struct regmap *function_regmap,
39 			   struct sdca_function_data *function,
40 			   struct sdca_entity *entity,
41 			   unsigned int offset_sel, unsigned int msg_offset,
42 			   unsigned int length_sel,
43 			   void *msg, int msg_len);
44 
45 #endif // __SDCA_UMP_H__
46