-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>: This series is the next step of adding SDCA support. Here we add helper functions to allow drivers to easily use the SDCA DisCo information to create a register map for the device. The basic idea here is the code takes the list of SDCA controls parsed from DisCo and uses primarily the Access Mode to determine if the register should be marked as readable/writable etc. Further more some additional concepts such as DisCo Constants and Defaults are handled. There is some potential confusion, as DisCo Constants are handled as an entry in the regmap defaults table, whereas a DisCo Default is simply handled as a write to the register. Alas the naming confusion is an unavoidable result of the slight impedance mismatch between the two systems.
- Loading branch information
Showing
5 changed files
with
391 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
/* | ||
* The MIPI SDCA specification is available for public downloads at | ||
* https://www.mipi.org/mipi-sdca-v1-0-download | ||
* | ||
* Copyright (C) 2025 Cirrus Logic, Inc. and | ||
* Cirrus Logic International Semiconductor Ltd. | ||
*/ | ||
|
||
#ifndef __SDCA_REGMAP_H__ | ||
#define __SDCA_REGMAP_H__ | ||
|
||
struct device; | ||
struct sdca_function_data; | ||
struct regmap; | ||
struct reg_default; | ||
|
||
bool sdca_regmap_readable(struct sdca_function_data *function, unsigned int reg); | ||
bool sdca_regmap_writeable(struct sdca_function_data *function, unsigned int reg); | ||
bool sdca_regmap_volatile(struct sdca_function_data *function, unsigned int reg); | ||
bool sdca_regmap_deferrable(struct sdca_function_data *function, unsigned int reg); | ||
int sdca_regmap_mbq_size(struct sdca_function_data *function, unsigned int reg); | ||
|
||
int sdca_regmap_count_constants(struct device *dev, struct sdca_function_data *function); | ||
int sdca_regmap_populate_constants(struct device *dev, struct sdca_function_data *function, | ||
struct reg_default *consts); | ||
|
||
int sdca_regmap_write_defaults(struct device *dev, struct regmap *regmap, | ||
struct sdca_function_data *function); | ||
|
||
#endif // __SDCA_REGMAP_H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
|
||
snd-soc-sdca-y := sdca_functions.o sdca_device.o | ||
snd-soc-sdca-y := sdca_functions.o sdca_device.o sdca_regmap.o | ||
|
||
obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca.o |
Oops, something went wrong.