cs42l56           718 sound/soc/codecs/cs42l56.c 	struct cs42l56_private *cs42l56 = snd_soc_component_get_drvdata(component);
cs42l56           724 sound/soc/codecs/cs42l56.c 		cs42l56->mclk_div2 = 0;
cs42l56           725 sound/soc/codecs/cs42l56.c 		cs42l56->mclk_prediv = 0;
cs42l56           730 sound/soc/codecs/cs42l56.c 		cs42l56->mclk_div2 = CS42L56_MCLK_DIV2;
cs42l56           731 sound/soc/codecs/cs42l56.c 		cs42l56->mclk_prediv = 0;
cs42l56           736 sound/soc/codecs/cs42l56.c 		cs42l56->mclk_div2 = CS42L56_MCLK_DIV2;
cs42l56           737 sound/soc/codecs/cs42l56.c 		cs42l56->mclk_prediv = CS42L56_MCLK_PREDIV;
cs42l56           742 sound/soc/codecs/cs42l56.c 	cs42l56->mclk = freq;
cs42l56           746 sound/soc/codecs/cs42l56.c 				cs42l56->mclk_prediv);
cs42l56           749 sound/soc/codecs/cs42l56.c 				cs42l56->mclk_div2);
cs42l56           757 sound/soc/codecs/cs42l56.c 	struct cs42l56_private *cs42l56 = snd_soc_component_get_drvdata(component);
cs42l56           761 sound/soc/codecs/cs42l56.c 		cs42l56->iface = CS42L56_MASTER_MODE;
cs42l56           764 sound/soc/codecs/cs42l56.c 		cs42l56->iface = CS42L56_SLAVE_MODE;
cs42l56           773 sound/soc/codecs/cs42l56.c 		cs42l56->iface_fmt = CS42L56_DIG_FMT_I2S;
cs42l56           776 sound/soc/codecs/cs42l56.c 		cs42l56->iface_fmt = CS42L56_DIG_FMT_LEFT_J;
cs42l56           785 sound/soc/codecs/cs42l56.c 		cs42l56->iface_inv = 0;
cs42l56           788 sound/soc/codecs/cs42l56.c 		cs42l56->iface_inv = CS42L56_SCLK_INV;
cs42l56           795 sound/soc/codecs/cs42l56.c 			    CS42L56_MS_MODE_MASK, cs42l56->iface);
cs42l56           797 sound/soc/codecs/cs42l56.c 			    CS42L56_DIG_FMT_MASK, cs42l56->iface_fmt);
cs42l56           799 sound/soc/codecs/cs42l56.c 			    CS42L56_SCLK_INV_MASK, cs42l56->iface_inv);
cs42l56           863 sound/soc/codecs/cs42l56.c 	struct cs42l56_private *cs42l56 = snd_soc_component_get_drvdata(component);
cs42l56           866 sound/soc/codecs/cs42l56.c 	ratio = cs42l56_get_mclk_ratio(cs42l56->mclk, params_rate(params));
cs42l56           881 sound/soc/codecs/cs42l56.c 	struct cs42l56_private *cs42l56 = snd_soc_component_get_drvdata(component);
cs42l56           895 sound/soc/codecs/cs42l56.c 			regcache_cache_only(cs42l56->regmap, false);
cs42l56           896 sound/soc/codecs/cs42l56.c 			regcache_sync(cs42l56->regmap);
cs42l56           897 sound/soc/codecs/cs42l56.c 			ret = regulator_bulk_enable(ARRAY_SIZE(cs42l56->supplies),
cs42l56           898 sound/soc/codecs/cs42l56.c 						    cs42l56->supplies);
cs42l56           900 sound/soc/codecs/cs42l56.c 				dev_err(cs42l56->dev,
cs42l56           914 sound/soc/codecs/cs42l56.c 		regcache_cache_only(cs42l56->regmap, true);
cs42l56           915 sound/soc/codecs/cs42l56.c 		regulator_bulk_disable(ARRAY_SIZE(cs42l56->supplies),
cs42l56           916 sound/soc/codecs/cs42l56.c 						    cs42l56->supplies);
cs42l56           963 sound/soc/codecs/cs42l56.c 	struct cs42l56_private *cs42l56 =
cs42l56           965 sound/soc/codecs/cs42l56.c 	struct snd_soc_component *component = cs42l56->component;
cs42l56           971 sound/soc/codecs/cs42l56.c 	if (cs42l56->beep_rate) {
cs42l56           973 sound/soc/codecs/cs42l56.c 			if (abs(cs42l56->beep_rate - beep_freq[i]) <
cs42l56           974 sound/soc/codecs/cs42l56.c 			    abs(cs42l56->beep_rate - beep_freq[best]))
cs42l56           979 sound/soc/codecs/cs42l56.c 			beep_freq[best], cs42l56->beep_rate);
cs42l56          1002 sound/soc/codecs/cs42l56.c 	struct cs42l56_private *cs42l56 = snd_soc_component_get_drvdata(component);
cs42l56          1017 sound/soc/codecs/cs42l56.c 	cs42l56->beep_rate = hz;
cs42l56          1018 sound/soc/codecs/cs42l56.c 	schedule_work(&cs42l56->beep_work);
cs42l56          1026 sound/soc/codecs/cs42l56.c 	struct cs42l56_private *cs42l56 = dev_get_drvdata(dev);
cs42l56          1034 sound/soc/codecs/cs42l56.c 	input_event(cs42l56->beep, EV_SND, SND_TONE, time);
cs42l56          1043 sound/soc/codecs/cs42l56.c 	struct cs42l56_private *cs42l56 = snd_soc_component_get_drvdata(component);
cs42l56          1046 sound/soc/codecs/cs42l56.c 	cs42l56->beep = devm_input_allocate_device(component->dev);
cs42l56          1047 sound/soc/codecs/cs42l56.c 	if (!cs42l56->beep) {
cs42l56          1052 sound/soc/codecs/cs42l56.c 	INIT_WORK(&cs42l56->beep_work, cs42l56_beep_work);
cs42l56          1053 sound/soc/codecs/cs42l56.c 	cs42l56->beep_rate = 0;
cs42l56          1055 sound/soc/codecs/cs42l56.c 	cs42l56->beep->name = "CS42L56 Beep Generator";
cs42l56          1056 sound/soc/codecs/cs42l56.c 	cs42l56->beep->phys = dev_name(component->dev);
cs42l56          1057 sound/soc/codecs/cs42l56.c 	cs42l56->beep->id.bustype = BUS_I2C;
cs42l56          1059 sound/soc/codecs/cs42l56.c 	cs42l56->beep->evbit[0] = BIT_MASK(EV_SND);
cs42l56          1060 sound/soc/codecs/cs42l56.c 	cs42l56->beep->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE);
cs42l56          1061 sound/soc/codecs/cs42l56.c 	cs42l56->beep->event = cs42l56_beep_event;
cs42l56          1062 sound/soc/codecs/cs42l56.c 	cs42l56->beep->dev.parent = component->dev;
cs42l56          1063 sound/soc/codecs/cs42l56.c 	input_set_drvdata(cs42l56->beep, component);
cs42l56          1065 sound/soc/codecs/cs42l56.c 	ret = input_register_device(cs42l56->beep);
cs42l56          1067 sound/soc/codecs/cs42l56.c 		cs42l56->beep = NULL;
cs42l56          1080 sound/soc/codecs/cs42l56.c 	struct cs42l56_private *cs42l56 = snd_soc_component_get_drvdata(component);
cs42l56          1083 sound/soc/codecs/cs42l56.c 	cancel_work_sync(&cs42l56->beep_work);
cs42l56          1084 sound/soc/codecs/cs42l56.c 	cs42l56->beep = NULL;
cs42l56          1172 sound/soc/codecs/cs42l56.c 	struct cs42l56_private *cs42l56;
cs42l56          1180 sound/soc/codecs/cs42l56.c 	cs42l56 = devm_kzalloc(&i2c_client->dev, sizeof(*cs42l56), GFP_KERNEL);
cs42l56          1181 sound/soc/codecs/cs42l56.c 	if (cs42l56 == NULL)
cs42l56          1183 sound/soc/codecs/cs42l56.c 	cs42l56->dev = &i2c_client->dev;
cs42l56          1185 sound/soc/codecs/cs42l56.c 	cs42l56->regmap = devm_regmap_init_i2c(i2c_client, &cs42l56_regmap);
cs42l56          1186 sound/soc/codecs/cs42l56.c 	if (IS_ERR(cs42l56->regmap)) {
cs42l56          1187 sound/soc/codecs/cs42l56.c 		ret = PTR_ERR(cs42l56->regmap);
cs42l56          1193 sound/soc/codecs/cs42l56.c 		cs42l56->pdata = *pdata;
cs42l56          1202 sound/soc/codecs/cs42l56.c 						     &cs42l56->pdata);
cs42l56          1206 sound/soc/codecs/cs42l56.c 		cs42l56->pdata = *pdata;
cs42l56          1209 sound/soc/codecs/cs42l56.c 	if (cs42l56->pdata.gpio_nreset) {
cs42l56          1210 sound/soc/codecs/cs42l56.c 		ret = gpio_request_one(cs42l56->pdata.gpio_nreset,
cs42l56          1215 sound/soc/codecs/cs42l56.c 				cs42l56->pdata.gpio_nreset, ret);
cs42l56          1218 sound/soc/codecs/cs42l56.c 		gpio_set_value_cansleep(cs42l56->pdata.gpio_nreset, 0);
cs42l56          1219 sound/soc/codecs/cs42l56.c 		gpio_set_value_cansleep(cs42l56->pdata.gpio_nreset, 1);
cs42l56          1223 sound/soc/codecs/cs42l56.c 	i2c_set_clientdata(i2c_client, cs42l56);
cs42l56          1225 sound/soc/codecs/cs42l56.c 	for (i = 0; i < ARRAY_SIZE(cs42l56->supplies); i++)
cs42l56          1226 sound/soc/codecs/cs42l56.c 		cs42l56->supplies[i].supply = cs42l56_supply_names[i];
cs42l56          1229 sound/soc/codecs/cs42l56.c 				      ARRAY_SIZE(cs42l56->supplies),
cs42l56          1230 sound/soc/codecs/cs42l56.c 				      cs42l56->supplies);
cs42l56          1237 sound/soc/codecs/cs42l56.c 	ret = regulator_bulk_enable(ARRAY_SIZE(cs42l56->supplies),
cs42l56          1238 sound/soc/codecs/cs42l56.c 				    cs42l56->supplies);
cs42l56          1245 sound/soc/codecs/cs42l56.c 	ret = regmap_read(cs42l56->regmap, CS42L56_CHIP_ID_1, &reg);
cs42l56          1260 sound/soc/codecs/cs42l56.c 	if (cs42l56->pdata.ain1a_ref_cfg)
cs42l56          1261 sound/soc/codecs/cs42l56.c 		regmap_update_bits(cs42l56->regmap, CS42L56_AIN_REFCFG_ADC_MUX,
cs42l56          1265 sound/soc/codecs/cs42l56.c 	if (cs42l56->pdata.ain1b_ref_cfg)
cs42l56          1266 sound/soc/codecs/cs42l56.c 		regmap_update_bits(cs42l56->regmap, CS42L56_AIN_REFCFG_ADC_MUX,
cs42l56          1270 sound/soc/codecs/cs42l56.c 	if (cs42l56->pdata.ain2a_ref_cfg)
cs42l56          1271 sound/soc/codecs/cs42l56.c 		regmap_update_bits(cs42l56->regmap, CS42L56_AIN_REFCFG_ADC_MUX,
cs42l56          1275 sound/soc/codecs/cs42l56.c 	if (cs42l56->pdata.ain2b_ref_cfg)
cs42l56          1276 sound/soc/codecs/cs42l56.c 		regmap_update_bits(cs42l56->regmap, CS42L56_AIN_REFCFG_ADC_MUX,
cs42l56          1280 sound/soc/codecs/cs42l56.c 	if (cs42l56->pdata.micbias_lvl)
cs42l56          1281 sound/soc/codecs/cs42l56.c 		regmap_update_bits(cs42l56->regmap, CS42L56_GAIN_BIAS_CTL,
cs42l56          1283 sound/soc/codecs/cs42l56.c 				cs42l56->pdata.micbias_lvl);
cs42l56          1285 sound/soc/codecs/cs42l56.c 	if (cs42l56->pdata.chgfreq)
cs42l56          1286 sound/soc/codecs/cs42l56.c 		regmap_update_bits(cs42l56->regmap, CS42L56_CLASSH_CTL,
cs42l56          1288 sound/soc/codecs/cs42l56.c 				cs42l56->pdata.chgfreq);
cs42l56          1290 sound/soc/codecs/cs42l56.c 	if (cs42l56->pdata.hpfb_freq)
cs42l56          1291 sound/soc/codecs/cs42l56.c 		regmap_update_bits(cs42l56->regmap, CS42L56_HPF_CTL,
cs42l56          1293 sound/soc/codecs/cs42l56.c 				cs42l56->pdata.hpfb_freq);
cs42l56          1295 sound/soc/codecs/cs42l56.c 	if (cs42l56->pdata.hpfa_freq)
cs42l56          1296 sound/soc/codecs/cs42l56.c 		regmap_update_bits(cs42l56->regmap, CS42L56_HPF_CTL,
cs42l56          1298 sound/soc/codecs/cs42l56.c 				cs42l56->pdata.hpfa_freq);
cs42l56          1300 sound/soc/codecs/cs42l56.c 	if (cs42l56->pdata.adaptive_pwr)
cs42l56          1301 sound/soc/codecs/cs42l56.c 		regmap_update_bits(cs42l56->regmap, CS42L56_CLASSH_CTL,
cs42l56          1303 sound/soc/codecs/cs42l56.c 				cs42l56->pdata.adaptive_pwr);
cs42l56          1313 sound/soc/codecs/cs42l56.c 	regulator_bulk_disable(ARRAY_SIZE(cs42l56->supplies),
cs42l56          1314 sound/soc/codecs/cs42l56.c 			       cs42l56->supplies);
cs42l56          1320 sound/soc/codecs/cs42l56.c 	struct cs42l56_private *cs42l56 = i2c_get_clientdata(client);
cs42l56          1322 sound/soc/codecs/cs42l56.c 	regulator_bulk_disable(ARRAY_SIZE(cs42l56->supplies),
cs42l56          1323 sound/soc/codecs/cs42l56.c 			       cs42l56->supplies);