cs42l52           474 sound/soc/codecs/cs42l52.c 	struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component);
cs42l52           475 sound/soc/codecs/cs42l52.c 	struct cs42l52_platform_data *pdata = &cs42l52->pdata;
cs42l52           716 sound/soc/codecs/cs42l52.c 	struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component);
cs42l52           719 sound/soc/codecs/cs42l52.c 		cs42l52->sysclk = freq;
cs42l52           730 sound/soc/codecs/cs42l52.c 	struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component);
cs42l52           781 sound/soc/codecs/cs42l52.c 	cs42l52->config.format = iface;
cs42l52           782 sound/soc/codecs/cs42l52.c 	snd_soc_component_write(component, CS42L52_IFACE_CTL1, cs42l52->config.format);
cs42l52           808 sound/soc/codecs/cs42l52.c 	struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component);
cs42l52           812 sound/soc/codecs/cs42l52.c 	index = cs42l52_get_clk(cs42l52->sysclk, params_rate(params));
cs42l52           814 sound/soc/codecs/cs42l52.c 		cs42l52->sysclk = clk_map_table[index].mclk;
cs42l52           834 sound/soc/codecs/cs42l52.c 	struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component);
cs42l52           845 sound/soc/codecs/cs42l52.c 			regcache_cache_only(cs42l52->regmap, false);
cs42l52           846 sound/soc/codecs/cs42l52.c 			regcache_sync(cs42l52->regmap);
cs42l52           852 sound/soc/codecs/cs42l52.c 		regcache_cache_only(cs42l52->regmap, true);
cs42l52           899 sound/soc/codecs/cs42l52.c 	struct cs42l52_private *cs42l52 =
cs42l52           901 sound/soc/codecs/cs42l52.c 	struct snd_soc_component *component = cs42l52->component;
cs42l52           907 sound/soc/codecs/cs42l52.c 	if (cs42l52->beep_rate) {
cs42l52           909 sound/soc/codecs/cs42l52.c 			if (abs(cs42l52->beep_rate - beep_rates[i]) <
cs42l52           910 sound/soc/codecs/cs42l52.c 			    abs(cs42l52->beep_rate - beep_rates[best]))
cs42l52           915 sound/soc/codecs/cs42l52.c 			beep_rates[best], cs42l52->beep_rate);
cs42l52           938 sound/soc/codecs/cs42l52.c 	struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component);
cs42l52           953 sound/soc/codecs/cs42l52.c 	cs42l52->beep_rate = hz;
cs42l52           954 sound/soc/codecs/cs42l52.c 	schedule_work(&cs42l52->beep_work);
cs42l52           962 sound/soc/codecs/cs42l52.c 	struct cs42l52_private *cs42l52 = dev_get_drvdata(dev);
cs42l52           970 sound/soc/codecs/cs42l52.c 	input_event(cs42l52->beep, EV_SND, SND_TONE, time);
cs42l52           979 sound/soc/codecs/cs42l52.c 	struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component);
cs42l52           982 sound/soc/codecs/cs42l52.c 	cs42l52->beep = devm_input_allocate_device(component->dev);
cs42l52           983 sound/soc/codecs/cs42l52.c 	if (!cs42l52->beep) {
cs42l52           988 sound/soc/codecs/cs42l52.c 	INIT_WORK(&cs42l52->beep_work, cs42l52_beep_work);
cs42l52           989 sound/soc/codecs/cs42l52.c 	cs42l52->beep_rate = 0;
cs42l52           991 sound/soc/codecs/cs42l52.c 	cs42l52->beep->name = "CS42L52 Beep Generator";
cs42l52           992 sound/soc/codecs/cs42l52.c 	cs42l52->beep->phys = dev_name(component->dev);
cs42l52           993 sound/soc/codecs/cs42l52.c 	cs42l52->beep->id.bustype = BUS_I2C;
cs42l52           995 sound/soc/codecs/cs42l52.c 	cs42l52->beep->evbit[0] = BIT_MASK(EV_SND);
cs42l52           996 sound/soc/codecs/cs42l52.c 	cs42l52->beep->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE);
cs42l52           997 sound/soc/codecs/cs42l52.c 	cs42l52->beep->event = cs42l52_beep_event;
cs42l52           998 sound/soc/codecs/cs42l52.c 	cs42l52->beep->dev.parent = component->dev;
cs42l52           999 sound/soc/codecs/cs42l52.c 	input_set_drvdata(cs42l52->beep, component);
cs42l52          1001 sound/soc/codecs/cs42l52.c 	ret = input_register_device(cs42l52->beep);
cs42l52          1003 sound/soc/codecs/cs42l52.c 		cs42l52->beep = NULL;
cs42l52          1016 sound/soc/codecs/cs42l52.c 	struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component);
cs42l52          1019 sound/soc/codecs/cs42l52.c 	cancel_work_sync(&cs42l52->beep_work);
cs42l52          1020 sound/soc/codecs/cs42l52.c 	cs42l52->beep = NULL;
cs42l52          1028 sound/soc/codecs/cs42l52.c 	struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component);
cs42l52          1030 sound/soc/codecs/cs42l52.c 	regcache_cache_only(cs42l52->regmap, true);
cs42l52          1036 sound/soc/codecs/cs42l52.c 	cs42l52->sysclk = CS42L52_DEFAULT_CLK;
cs42l52          1037 sound/soc/codecs/cs42l52.c 	cs42l52->config.format = CS42L52_DEFAULT_FORMAT;
cs42l52          1091 sound/soc/codecs/cs42l52.c 	struct cs42l52_private *cs42l52;
cs42l52          1098 sound/soc/codecs/cs42l52.c 	cs42l52 = devm_kzalloc(&i2c_client->dev, sizeof(*cs42l52), GFP_KERNEL);
cs42l52          1099 sound/soc/codecs/cs42l52.c 	if (cs42l52 == NULL)
cs42l52          1101 sound/soc/codecs/cs42l52.c 	cs42l52->dev = &i2c_client->dev;
cs42l52          1103 sound/soc/codecs/cs42l52.c 	cs42l52->regmap = devm_regmap_init_i2c(i2c_client, &cs42l52_regmap);
cs42l52          1104 sound/soc/codecs/cs42l52.c 	if (IS_ERR(cs42l52->regmap)) {
cs42l52          1105 sound/soc/codecs/cs42l52.c 		ret = PTR_ERR(cs42l52->regmap);
cs42l52          1110 sound/soc/codecs/cs42l52.c 		cs42l52->pdata = *pdata;
cs42l52          1138 sound/soc/codecs/cs42l52.c 		cs42l52->pdata = *pdata;
cs42l52          1141 sound/soc/codecs/cs42l52.c 	if (cs42l52->pdata.reset_gpio) {
cs42l52          1143 sound/soc/codecs/cs42l52.c 					    cs42l52->pdata.reset_gpio,
cs42l52          1148 sound/soc/codecs/cs42l52.c 				cs42l52->pdata.reset_gpio, ret);
cs42l52          1151 sound/soc/codecs/cs42l52.c 		gpio_set_value_cansleep(cs42l52->pdata.reset_gpio, 0);
cs42l52          1152 sound/soc/codecs/cs42l52.c 		gpio_set_value_cansleep(cs42l52->pdata.reset_gpio, 1);
cs42l52          1155 sound/soc/codecs/cs42l52.c 	i2c_set_clientdata(i2c_client, cs42l52);
cs42l52          1157 sound/soc/codecs/cs42l52.c 	ret = regmap_register_patch(cs42l52->regmap, cs42l52_threshold_patch,
cs42l52          1160 sound/soc/codecs/cs42l52.c 		dev_warn(cs42l52->dev, "Failed to apply regmap patch: %d\n",
cs42l52          1163 sound/soc/codecs/cs42l52.c 	ret = regmap_read(cs42l52->regmap, CS42L52_CHIP, &reg);
cs42l52          1177 sound/soc/codecs/cs42l52.c 	if (cs42l52->pdata.mica_diff_cfg)
cs42l52          1178 sound/soc/codecs/cs42l52.c 		regmap_update_bits(cs42l52->regmap, CS42L52_MICA_CTL,
cs42l52          1180 sound/soc/codecs/cs42l52.c 				cs42l52->pdata.mica_diff_cfg <<
cs42l52          1183 sound/soc/codecs/cs42l52.c 	if (cs42l52->pdata.micb_diff_cfg)
cs42l52          1184 sound/soc/codecs/cs42l52.c 		regmap_update_bits(cs42l52->regmap, CS42L52_MICB_CTL,
cs42l52          1186 sound/soc/codecs/cs42l52.c 				cs42l52->pdata.micb_diff_cfg <<
cs42l52          1189 sound/soc/codecs/cs42l52.c 	if (cs42l52->pdata.chgfreq)
cs42l52          1190 sound/soc/codecs/cs42l52.c 		regmap_update_bits(cs42l52->regmap, CS42L52_CHARGE_PUMP,
cs42l52          1192 sound/soc/codecs/cs42l52.c 				cs42l52->pdata.chgfreq <<
cs42l52          1195 sound/soc/codecs/cs42l52.c 	if (cs42l52->pdata.micbias_lvl)
cs42l52          1196 sound/soc/codecs/cs42l52.c 		regmap_update_bits(cs42l52->regmap, CS42L52_IFACE_CTL2,
cs42l52          1198 sound/soc/codecs/cs42l52.c 				cs42l52->pdata.micbias_lvl);