xref: /linux/include/sound/sdca_regmap.h (revision 1260ed77798502de9c98020040d2995008de10cc)
1e3f7caf7SCharles Keepax /* SPDX-License-Identifier: GPL-2.0 */
2e3f7caf7SCharles Keepax /*
3e3f7caf7SCharles Keepax  * The MIPI SDCA specification is available for public downloads at
4e3f7caf7SCharles Keepax  * https://www.mipi.org/mipi-sdca-v1-0-download
5e3f7caf7SCharles Keepax  *
6e3f7caf7SCharles Keepax  * Copyright (C) 2025 Cirrus Logic, Inc. and
7e3f7caf7SCharles Keepax  *                    Cirrus Logic International Semiconductor Ltd.
8e3f7caf7SCharles Keepax  */
9e3f7caf7SCharles Keepax 
10e3f7caf7SCharles Keepax #ifndef __SDCA_REGMAP_H__
11e3f7caf7SCharles Keepax #define __SDCA_REGMAP_H__
12e3f7caf7SCharles Keepax 
1328c12866SCharles Keepax struct device;
14e3f7caf7SCharles Keepax struct sdca_function_data;
15*c143755dSCharles Keepax struct regmap;
1628c12866SCharles Keepax struct reg_default;
17e3f7caf7SCharles Keepax 
18e3f7caf7SCharles Keepax bool sdca_regmap_readable(struct sdca_function_data *function, unsigned int reg);
19e3f7caf7SCharles Keepax bool sdca_regmap_writeable(struct sdca_function_data *function, unsigned int reg);
20e3f7caf7SCharles Keepax bool sdca_regmap_volatile(struct sdca_function_data *function, unsigned int reg);
21e3f7caf7SCharles Keepax bool sdca_regmap_deferrable(struct sdca_function_data *function, unsigned int reg);
22e3f7caf7SCharles Keepax int sdca_regmap_mbq_size(struct sdca_function_data *function, unsigned int reg);
23e3f7caf7SCharles Keepax 
2428c12866SCharles Keepax int sdca_regmap_count_constants(struct device *dev, struct sdca_function_data *function);
2528c12866SCharles Keepax int sdca_regmap_populate_constants(struct device *dev, struct sdca_function_data *function,
2628c12866SCharles Keepax 				   struct reg_default *consts);
2728c12866SCharles Keepax 
28*c143755dSCharles Keepax int sdca_regmap_write_defaults(struct device *dev, struct regmap *regmap,
29*c143755dSCharles Keepax 			       struct sdca_function_data *function);
30*c143755dSCharles Keepax 
31e3f7caf7SCharles Keepax #endif // __SDCA_REGMAP_H__
32