summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wsa881x.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wsa881x.c')
-rw-r--r--sound/soc/codecs/wsa881x.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c
index fb9e92f08d98..dd2d6661adc7 100644
--- a/sound/soc/codecs/wsa881x.c
+++ b/sound/soc/codecs/wsa881x.c
@@ -386,33 +386,32 @@ enum wsa_port_ids {
/* 4 ports */
static struct sdw_dpn_prop wsa_sink_dpn_prop[WSA881X_MAX_SWR_PORTS] = {
- {
- /* DAC */
- .num = 1,
+ [WSA881X_PORT_DAC] = {
+ .num = WSA881X_PORT_DAC + 1,
.type = SDW_DPN_SIMPLE,
.min_ch = 1,
.max_ch = 1,
.simple_ch_prep_sm = true,
.read_only_wordlength = true,
- }, {
- /* COMP */
- .num = 2,
+ },
+ [WSA881X_PORT_COMP] = {
+ .num = WSA881X_PORT_COMP + 1,
.type = SDW_DPN_SIMPLE,
.min_ch = 1,
.max_ch = 1,
.simple_ch_prep_sm = true,
.read_only_wordlength = true,
- }, {
- /* BOOST */
- .num = 3,
+ },
+ [WSA881X_PORT_BOOST] = {
+ .num = WSA881X_PORT_BOOST + 1,
.type = SDW_DPN_SIMPLE,
.min_ch = 1,
.max_ch = 1,
.simple_ch_prep_sm = true,
.read_only_wordlength = true,
- }, {
- /* VISENSE */
- .num = 4,
+ },
+ [WSA881X_PORT_VISENSE] = {
+ .num = WSA881X_PORT_VISENSE + 1,
.type = SDW_DPN_SIMPLE,
.min_ch = 1,
.max_ch = 1,
@@ -422,17 +421,20 @@ static struct sdw_dpn_prop wsa_sink_dpn_prop[WSA881X_MAX_SWR_PORTS] = {
};
static const struct sdw_port_config wsa881x_pconfig[WSA881X_MAX_SWR_PORTS] = {
- {
- .num = 1,
+ [WSA881X_PORT_DAC] = {
+ .num = WSA881X_PORT_DAC + 1,
.ch_mask = 0x1,
- }, {
- .num = 2,
+ },
+ [WSA881X_PORT_COMP] = {
+ .num = WSA881X_PORT_COMP + 1,
.ch_mask = 0xf,
- }, {
- .num = 3,
+ },
+ [WSA881X_PORT_BOOST] = {
+ .num = WSA881X_PORT_BOOST + 1,
.ch_mask = 0x3,
- }, { /* IV feedback */
- .num = 4,
+ },
+ [WSA881X_PORT_VISENSE] = {
+ .num = WSA881X_PORT_VISENSE + 1,
.ch_mask = 0x3,
},
};
@@ -680,7 +682,6 @@ struct wsa881x_priv {
* For backwards compatibility.
*/
unsigned int sd_n_val;
- int version;
int active_ports;
bool port_prepared[WSA881X_MAX_SWR_PORTS];
bool port_enable[WSA881X_MAX_SWR_PORTS];
@@ -691,7 +692,6 @@ static void wsa881x_init(struct wsa881x_priv *wsa881x)
struct regmap *rm = wsa881x->regmap;
unsigned int val = 0;
- regmap_read(rm, WSA881X_CHIP_ID1, &wsa881x->version);
regmap_register_patch(wsa881x->regmap, wsa881x_rev_2_0,
ARRAY_SIZE(wsa881x_rev_2_0));