sta350            309 sound/soc/codecs/sta350.c 	struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component);
sta350            315 sound/soc/codecs/sta350.c 	mutex_lock(&sta350->coeff_lock);
sta350            318 sound/soc/codecs/sta350.c 	regmap_read(sta350->regmap, STA350_CFUD, &cfud);
sta350            324 sound/soc/codecs/sta350.c 	regmap_write(sta350->regmap, STA350_CFUD, cfud);
sta350            326 sound/soc/codecs/sta350.c 	regmap_write(sta350->regmap, STA350_CFADDR2, index);
sta350            328 sound/soc/codecs/sta350.c 		regmap_write(sta350->regmap, STA350_CFUD, cfud | 0x04);
sta350            330 sound/soc/codecs/sta350.c 		regmap_write(sta350->regmap, STA350_CFUD, cfud | 0x08);
sta350            337 sound/soc/codecs/sta350.c 		regmap_read(sta350->regmap, STA350_B1CF1 + i, &val);
sta350            342 sound/soc/codecs/sta350.c 	mutex_unlock(&sta350->coeff_lock);
sta350            351 sound/soc/codecs/sta350.c 	struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component);
sta350            358 sound/soc/codecs/sta350.c 	regmap_read(sta350->regmap, STA350_CFUD, &cfud);
sta350            364 sound/soc/codecs/sta350.c 	regmap_write(sta350->regmap, STA350_CFUD, cfud);
sta350            366 sound/soc/codecs/sta350.c 	regmap_write(sta350->regmap, STA350_CFADDR2, index);
sta350            368 sound/soc/codecs/sta350.c 		sta350->coef_shadow[index + i] =
sta350            373 sound/soc/codecs/sta350.c 		regmap_write(sta350->regmap, STA350_B1CF1 + i,
sta350            376 sound/soc/codecs/sta350.c 		regmap_write(sta350->regmap, STA350_CFUD, cfud | 0x01);
sta350            378 sound/soc/codecs/sta350.c 		regmap_write(sta350->regmap, STA350_CFUD, cfud | 0x02);
sta350            387 sound/soc/codecs/sta350.c 	struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component);
sta350            392 sound/soc/codecs/sta350.c 	regmap_read(sta350->regmap, STA350_CFUD, &cfud);
sta350            396 sound/soc/codecs/sta350.c 		regmap_write(sta350->regmap, STA350_CFADDR2, i);
sta350            397 sound/soc/codecs/sta350.c 		regmap_write(sta350->regmap, STA350_B1CF1,
sta350            398 sound/soc/codecs/sta350.c 			     (sta350->coef_shadow[i] >> 16) & 0xff);
sta350            399 sound/soc/codecs/sta350.c 		regmap_write(sta350->regmap, STA350_B1CF2,
sta350            400 sound/soc/codecs/sta350.c 			     (sta350->coef_shadow[i] >> 8) & 0xff);
sta350            401 sound/soc/codecs/sta350.c 		regmap_write(sta350->regmap, STA350_B1CF3,
sta350            402 sound/soc/codecs/sta350.c 			     (sta350->coef_shadow[i]) & 0xff);
sta350            407 sound/soc/codecs/sta350.c 		regmap_write(sta350->regmap, STA350_CFUD, cfud);
sta350            408 sound/soc/codecs/sta350.c 		regmap_write(sta350->regmap, STA350_CFUD, cfud | 0x01);
sta350            415 sound/soc/codecs/sta350.c 	struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component);
sta350            420 sound/soc/codecs/sta350.c 	regmap_read(sta350->regmap, STA350_CFUD, &mute);
sta350            421 sound/soc/codecs/sta350.c 	regmap_write(sta350->regmap, STA350_MMUTE, mute | STA350_MMUTE_MMUTE);
sta350            423 sound/soc/codecs/sta350.c 	rc = regcache_sync(sta350->regmap);
sta350            424 sound/soc/codecs/sta350.c 	regmap_write(sta350->regmap, STA350_MMUTE, mute);
sta350            613 sound/soc/codecs/sta350.c 	struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component);
sta350            616 sound/soc/codecs/sta350.c 	sta350->mclk = freq;
sta350            633 sound/soc/codecs/sta350.c 	struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component);
sta350            647 sound/soc/codecs/sta350.c 		sta350->format = fmt & SND_SOC_DAIFMT_FORMAT_MASK;
sta350            664 sound/soc/codecs/sta350.c 	return regmap_update_bits(sta350->regmap, STA350_CONFB,
sta350            682 sound/soc/codecs/sta350.c 	struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component);
sta350            688 sound/soc/codecs/sta350.c 	if (!sta350->mclk) {
sta350            695 sound/soc/codecs/sta350.c 	ratio = sta350->mclk / rate;
sta350            732 sound/soc/codecs/sta350.c 		switch (sta350->format) {
sta350            747 sound/soc/codecs/sta350.c 		switch (sta350->format) {
sta350            762 sound/soc/codecs/sta350.c 		switch (sta350->format) {
sta350            777 sound/soc/codecs/sta350.c 		switch (sta350->format) {
sta350            794 sound/soc/codecs/sta350.c 	ret = regmap_update_bits(sta350->regmap, STA350_CONFA,
sta350            800 sound/soc/codecs/sta350.c 	ret = regmap_update_bits(sta350->regmap, STA350_CONFB,
sta350            809 sound/soc/codecs/sta350.c static int sta350_startup_sequence(struct sta350_priv *sta350)
sta350            811 sound/soc/codecs/sta350.c 	if (sta350->gpiod_power_down)
sta350            812 sound/soc/codecs/sta350.c 		gpiod_set_value(sta350->gpiod_power_down, 1);
sta350            814 sound/soc/codecs/sta350.c 	if (sta350->gpiod_nreset) {
sta350            815 sound/soc/codecs/sta350.c 		gpiod_set_value(sta350->gpiod_nreset, 0);
sta350            817 sound/soc/codecs/sta350.c 		gpiod_set_value(sta350->gpiod_nreset, 1);
sta350            836 sound/soc/codecs/sta350.c 	struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component);
sta350            846 sound/soc/codecs/sta350.c 		regmap_update_bits(sta350->regmap, STA350_CONFF,
sta350            854 sound/soc/codecs/sta350.c 				ARRAY_SIZE(sta350->supplies),
sta350            855 sound/soc/codecs/sta350.c 				sta350->supplies);
sta350            862 sound/soc/codecs/sta350.c 			sta350_startup_sequence(sta350);
sta350            867 sound/soc/codecs/sta350.c 		regmap_update_bits(sta350->regmap, STA350_CONFF,
sta350            875 sound/soc/codecs/sta350.c 		regmap_update_bits(sta350->regmap, STA350_CONFF,
sta350            879 sound/soc/codecs/sta350.c 		if (sta350->gpiod_power_down)
sta350            880 sound/soc/codecs/sta350.c 			gpiod_set_value(sta350->gpiod_power_down, 0);
sta350            882 sound/soc/codecs/sta350.c 		if (sta350->gpiod_nreset)
sta350            883 sound/soc/codecs/sta350.c 			gpiod_set_value(sta350->gpiod_nreset, 0);
sta350            885 sound/soc/codecs/sta350.c 		regulator_bulk_disable(ARRAY_SIZE(sta350->supplies),
sta350            886 sound/soc/codecs/sta350.c 				       sta350->supplies);
sta350            912 sound/soc/codecs/sta350.c 	struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component);
sta350            913 sound/soc/codecs/sta350.c 	struct sta350_platform_data *pdata = sta350->pdata;
sta350            916 sound/soc/codecs/sta350.c 	ret = regulator_bulk_enable(ARRAY_SIZE(sta350->supplies),
sta350            917 sound/soc/codecs/sta350.c 				    sta350->supplies);
sta350            923 sound/soc/codecs/sta350.c 	ret = sta350_startup_sequence(sta350);
sta350            936 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_CONFA,
sta350            942 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_CONFC,
sta350            946 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_CONFC,
sta350            950 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap,
sta350            957 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_CONFE,
sta350            961 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_CONFE,
sta350            965 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_CONFE,
sta350            969 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_CONFE,
sta350            973 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_CONFE,
sta350            978 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_CONFF,
sta350            982 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_CONFF,
sta350            988 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_C1CFG,
sta350            992 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_C2CFG,
sta350            996 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_C3CFG,
sta350           1002 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_MISC1,
sta350           1006 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_MISC1,
sta350           1010 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_MISC1,
sta350           1014 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_MISC1,
sta350           1019 sound/soc/codecs/sta350.c 	regmap_update_bits(sta350->regmap, STA350_MISC2,
sta350           1026 sound/soc/codecs/sta350.c 		sta350->coef_shadow[i] = 0x400000;
sta350           1028 sound/soc/codecs/sta350.c 		sta350->coef_shadow[i] = 0x7fffff;
sta350           1029 sound/soc/codecs/sta350.c 	sta350->coef_shadow[55] = 0x5a9df7;
sta350           1030 sound/soc/codecs/sta350.c 	sta350->coef_shadow[56] = 0x7fffff;
sta350           1031 sound/soc/codecs/sta350.c 	sta350->coef_shadow[59] = 0x7fffff;
sta350           1032 sound/soc/codecs/sta350.c 	sta350->coef_shadow[60] = 0x400000;
sta350           1033 sound/soc/codecs/sta350.c 	sta350->coef_shadow[61] = 0x400000;
sta350           1037 sound/soc/codecs/sta350.c 	regulator_bulk_disable(ARRAY_SIZE(sta350->supplies), sta350->supplies);
sta350           1044 sound/soc/codecs/sta350.c 	struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component);
sta350           1046 sound/soc/codecs/sta350.c 	regulator_bulk_disable(ARRAY_SIZE(sta350->supplies), sta350->supplies);
sta350           1092 sound/soc/codecs/sta350.c static int sta350_probe_dt(struct device *dev, struct sta350_priv *sta350)
sta350           1184 sound/soc/codecs/sta350.c 	sta350->pdata = pdata;
sta350           1194 sound/soc/codecs/sta350.c 	struct sta350_priv *sta350;
sta350           1197 sound/soc/codecs/sta350.c 	sta350 = devm_kzalloc(dev, sizeof(struct sta350_priv), GFP_KERNEL);
sta350           1198 sound/soc/codecs/sta350.c 	if (!sta350)
sta350           1201 sound/soc/codecs/sta350.c 	mutex_init(&sta350->coeff_lock);
sta350           1202 sound/soc/codecs/sta350.c 	sta350->pdata = dev_get_platdata(dev);
sta350           1206 sound/soc/codecs/sta350.c 		ret = sta350_probe_dt(dev, sta350);
sta350           1213 sound/soc/codecs/sta350.c 	sta350->gpiod_nreset = devm_gpiod_get_optional(dev, "reset",
sta350           1215 sound/soc/codecs/sta350.c 	if (IS_ERR(sta350->gpiod_nreset))
sta350           1216 sound/soc/codecs/sta350.c 		return PTR_ERR(sta350->gpiod_nreset);
sta350           1218 sound/soc/codecs/sta350.c 	sta350->gpiod_power_down = devm_gpiod_get_optional(dev, "power-down",
sta350           1220 sound/soc/codecs/sta350.c 	if (IS_ERR(sta350->gpiod_power_down))
sta350           1221 sound/soc/codecs/sta350.c 		return PTR_ERR(sta350->gpiod_power_down);
sta350           1224 sound/soc/codecs/sta350.c 	for (i = 0; i < ARRAY_SIZE(sta350->supplies); i++)
sta350           1225 sound/soc/codecs/sta350.c 		sta350->supplies[i].supply = sta350_supply_names[i];
sta350           1227 sound/soc/codecs/sta350.c 	ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(sta350->supplies),
sta350           1228 sound/soc/codecs/sta350.c 				      sta350->supplies);
sta350           1234 sound/soc/codecs/sta350.c 	sta350->regmap = devm_regmap_init_i2c(i2c, &sta350_regmap);
sta350           1235 sound/soc/codecs/sta350.c 	if (IS_ERR(sta350->regmap)) {
sta350           1236 sound/soc/codecs/sta350.c 		ret = PTR_ERR(sta350->regmap);
sta350           1241 sound/soc/codecs/sta350.c 	i2c_set_clientdata(i2c, sta350);