Lines Matching full:wsa883x

1000 static int wsa883x_init(struct wsa883x_priv *wsa883x)  in wsa883x_init()  argument
1002 struct regmap *regmap = wsa883x->regmap; in wsa883x_init()
1016 dev_info(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8830\n", in wsa883x_init()
1020 dev_info(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8835\n", in wsa883x_init()
1024 dev_info(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8832\n", in wsa883x_init()
1028 dev_info(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8835_V2\n", in wsa883x_init()
1035 wsa883x->comp_offset = COMP_OFFSET2; in wsa883x_init()
1041 wsa883x->comp_offset = COMP_OFFSET3; in wsa883x_init()
1044 wsa883x->comp_offset); in wsa883x_init()
1053 struct wsa883x_priv *wsa883x = dev_get_drvdata(&slave->dev); in wsa883x_update_status() local
1056 return wsa883x_init(wsa883x); in wsa883x_update_status()
1065 struct wsa883x_priv *wsa883x = dev_get_drvdata(&slave->dev); in wsa883x_port_prep() local
1068 wsa883x->port_prepared[prepare_ch->num - 1] = true; in wsa883x_port_prep()
1070 wsa883x->port_prepared[prepare_ch->num - 1] = false; in wsa883x_port_prep()
1084 struct wsa883x_priv *wsa883x = snd_soc_component_get_drvdata(component); in wsa_dev_mode_get() local
1086 ucontrol->value.enumerated.item[0] = wsa883x->dev_mode; in wsa_dev_mode_get()
1095 struct wsa883x_priv *wsa883x = snd_soc_component_get_drvdata(component); in wsa_dev_mode_put() local
1097 if (wsa883x->dev_mode == ucontrol->value.enumerated.item[0]) in wsa_dev_mode_put()
1100 wsa883x->dev_mode = ucontrol->value.enumerated.item[0]; in wsa_dev_mode_put()
1151 struct wsa883x_priv *wsa883x = snd_soc_component_get_drvdata(component); in wsa883x_get_comp_offset() local
1153 ucontrol->value.integer.value[0] = wsa883x->comp_offset; in wsa883x_get_comp_offset()
1162 struct wsa883x_priv *wsa883x = snd_soc_component_get_drvdata(component); in wsa883x_set_comp_offset() local
1164 if (wsa883x->comp_offset == ucontrol->value.integer.value[0]) in wsa883x_set_comp_offset()
1167 wsa883x->comp_offset = ucontrol->value.integer.value[0]; in wsa883x_set_comp_offset()
1174 struct wsa883x_priv *wsa883x = snd_soc_component_get_drvdata(comp); in wsa883x_codec_probe() local
1176 snd_soc_component_init_regmap(comp, wsa883x->regmap); in wsa883x_codec_probe()
1185 struct wsa883x_priv *wsa883x = snd_soc_component_get_drvdata(component); in wsa883x_spkr_event() local
1189 switch (wsa883x->dev_mode) { in wsa883x_spkr_event()
1214 if (wsa883x->port_enable[WSA883X_PORT_COMP]) in wsa883x_spkr_event()
1217 wsa883x->comp_offset); in wsa883x_spkr_event()
1270 .name = "WSA883x",
1284 struct wsa883x_priv *wsa883x = dev_get_drvdata(dai->dev); in wsa883x_hw_params() local
1287 wsa883x->active_ports = 0; in wsa883x_hw_params()
1289 if (!wsa883x->port_enable[i]) in wsa883x_hw_params()
1292 wsa883x->port_config[wsa883x->active_ports] = wsa883x_pconfig[i]; in wsa883x_hw_params()
1293 wsa883x->active_ports++; in wsa883x_hw_params()
1296 wsa883x->sconfig.frame_rate = params_rate(params); in wsa883x_hw_params()
1298 return sdw_stream_add_slave(wsa883x->slave, &wsa883x->sconfig, in wsa883x_hw_params()
1299 wsa883x->port_config, wsa883x->active_ports, in wsa883x_hw_params()
1300 wsa883x->sruntime); in wsa883x_hw_params()
1306 struct wsa883x_priv *wsa883x = dev_get_drvdata(dai->dev); in wsa883x_hw_free() local
1308 sdw_stream_remove_slave(wsa883x->slave, wsa883x->sruntime); in wsa883x_hw_free()
1316 struct wsa883x_priv *wsa883x = dev_get_drvdata(dai->dev); in wsa883x_set_sdw_stream() local
1318 wsa883x->sruntime = stream; in wsa883x_set_sdw_stream()
1373 struct wsa883x_priv *wsa883x; in wsa883x_probe() local
1377 wsa883x = devm_kzalloc(dev, sizeof(*wsa883x), GFP_KERNEL); in wsa883x_probe()
1378 if (!wsa883x) in wsa883x_probe()
1381 wsa883x->vdd = devm_regulator_get(dev, "vdd"); in wsa883x_probe()
1382 if (IS_ERR(wsa883x->vdd)) in wsa883x_probe()
1383 return dev_err_probe(dev, PTR_ERR(wsa883x->vdd), in wsa883x_probe()
1386 ret = regulator_enable(wsa883x->vdd); in wsa883x_probe()
1390 wsa883x->sd_n = devm_gpiod_get_optional(dev, "powerdown", in wsa883x_probe()
1392 if (IS_ERR(wsa883x->sd_n)) { in wsa883x_probe()
1393 ret = dev_err_probe(dev, PTR_ERR(wsa883x->sd_n), in wsa883x_probe()
1398 dev_set_drvdata(dev, wsa883x); in wsa883x_probe()
1399 wsa883x->slave = pdev; in wsa883x_probe()
1400 wsa883x->dev = dev; in wsa883x_probe()
1401 wsa883x->sconfig.ch_count = 1; in wsa883x_probe()
1402 wsa883x->sconfig.bps = 1; in wsa883x_probe()
1403 wsa883x->sconfig.direction = SDW_DATA_DIR_RX; in wsa883x_probe()
1404 wsa883x->sconfig.type = SDW_STREAM_PDM; in wsa883x_probe()
1418 gpiod_direction_output(wsa883x->sd_n, 0); in wsa883x_probe()
1420 wsa883x->regmap = devm_regmap_init_sdw(pdev, &wsa883x_regmap_config); in wsa883x_probe()
1421 if (IS_ERR(wsa883x->regmap)) { in wsa883x_probe()
1422 gpiod_direction_output(wsa883x->sd_n, 1); in wsa883x_probe()
1423 ret = dev_err_probe(dev, PTR_ERR(wsa883x->regmap), in wsa883x_probe()
1439 regulator_disable(wsa883x->vdd); in wsa883x_probe()
1478 .name = "wsa883x-codec",
1489 MODULE_DESCRIPTION("WSA883x codec driver");