wm2000             84 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = i2c_get_clientdata(i2c);
wm2000             85 sound/soc/codecs/wm2000.c 	return regmap_write(wm2000->regmap, reg, value);
wm2000             88 sound/soc/codecs/wm2000.c static void wm2000_reset(struct wm2000_priv *wm2000)
wm2000             90 sound/soc/codecs/wm2000.c 	struct i2c_client *i2c = wm2000->i2c;
wm2000             96 sound/soc/codecs/wm2000.c 	wm2000->anc_mode = ANC_OFF;
wm2000            102 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = i2c_get_clientdata(i2c);
wm2000            106 sound/soc/codecs/wm2000.c 	regmap_read(wm2000->regmap, reg, &val);
wm2000            110 sound/soc/codecs/wm2000.c 		regmap_read(wm2000->regmap, reg, &val);
wm2000            121 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev);
wm2000            126 sound/soc/codecs/wm2000.c 	if (WARN_ON(wm2000->anc_mode != ANC_OFF))
wm2000            131 sound/soc/codecs/wm2000.c 	ret = regulator_bulk_enable(WM2000_NUM_SUPPLIES, wm2000->supplies);
wm2000            137 sound/soc/codecs/wm2000.c 	rate = clk_get_rate(wm2000->mclk);
wm2000            155 sound/soc/codecs/wm2000.c 		regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies);
wm2000            162 sound/soc/codecs/wm2000.c 		regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies);
wm2000            171 sound/soc/codecs/wm2000.c 		wm2000->anc_download_size - 2);
wm2000            173 sound/soc/codecs/wm2000.c 	ret = i2c_master_send(i2c, wm2000->anc_download,
wm2000            174 sound/soc/codecs/wm2000.c 			      wm2000->anc_download_size);
wm2000            177 sound/soc/codecs/wm2000.c 		regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies);
wm2000            180 sound/soc/codecs/wm2000.c 	if (ret != wm2000->anc_download_size) {
wm2000            182 sound/soc/codecs/wm2000.c 			ret, wm2000->anc_download_size);
wm2000            183 sound/soc/codecs/wm2000.c 		regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies);
wm2000            202 sound/soc/codecs/wm2000.c 	ret = regmap_read(wm2000->regmap, WM2000_REG_SPEECH_CLARITY, &val);
wm2000            205 sound/soc/codecs/wm2000.c 		regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies);
wm2000            208 sound/soc/codecs/wm2000.c 	if (wm2000->speech_clarity)
wm2000            222 sound/soc/codecs/wm2000.c 		regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies);
wm2000            229 sound/soc/codecs/wm2000.c 	wm2000->anc_mode = ANC_ACTIVE;
wm2000            236 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev);
wm2000            260 sound/soc/codecs/wm2000.c 	regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies);
wm2000            263 sound/soc/codecs/wm2000.c 	wm2000->anc_mode = ANC_OFF;
wm2000            270 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev);
wm2000            272 sound/soc/codecs/wm2000.c 	if (WARN_ON(wm2000->anc_mode != ANC_ACTIVE))
wm2000            301 sound/soc/codecs/wm2000.c 	wm2000->anc_mode = ANC_BYPASS;
wm2000            309 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev);
wm2000            311 sound/soc/codecs/wm2000.c 	if (WARN_ON(wm2000->anc_mode != ANC_BYPASS))
wm2000            336 sound/soc/codecs/wm2000.c 	wm2000->anc_mode = ANC_ACTIVE;
wm2000            344 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev);
wm2000            346 sound/soc/codecs/wm2000.c 	if (WARN_ON(wm2000->anc_mode != ANC_ACTIVE))
wm2000            378 sound/soc/codecs/wm2000.c 	wm2000->anc_mode = ANC_STANDBY;
wm2000            388 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev);
wm2000            390 sound/soc/codecs/wm2000.c 	if (WARN_ON(wm2000->anc_mode != ANC_STANDBY))
wm2000            417 sound/soc/codecs/wm2000.c 	wm2000->anc_mode = ANC_ACTIVE;
wm2000            534 sound/soc/codecs/wm2000.c static int wm2000_anc_transition(struct wm2000_priv *wm2000,
wm2000            537 sound/soc/codecs/wm2000.c 	struct i2c_client *i2c = wm2000->i2c;
wm2000            541 sound/soc/codecs/wm2000.c 	if (wm2000->anc_mode == mode)
wm2000            545 sound/soc/codecs/wm2000.c 		if (anc_transitions[i].source == wm2000->anc_mode &&
wm2000            550 sound/soc/codecs/wm2000.c 			wm2000->anc_mode, mode);
wm2000            556 sound/soc/codecs/wm2000.c 		ret = clk_prepare_enable(wm2000->mclk);
wm2000            573 sound/soc/codecs/wm2000.c 		clk_disable_unprepare(wm2000->mclk);
wm2000            578 sound/soc/codecs/wm2000.c static int wm2000_anc_set_mode(struct wm2000_priv *wm2000)
wm2000            580 sound/soc/codecs/wm2000.c 	struct i2c_client *i2c = wm2000->i2c;
wm2000            583 sound/soc/codecs/wm2000.c 	if (wm2000->anc_eng_ena && wm2000->spk_ena)
wm2000            584 sound/soc/codecs/wm2000.c 		if (wm2000->anc_active)
wm2000            592 sound/soc/codecs/wm2000.c 		mode, wm2000->anc_eng_ena, !wm2000->spk_ena,
wm2000            593 sound/soc/codecs/wm2000.c 		wm2000->anc_active);
wm2000            595 sound/soc/codecs/wm2000.c 	return wm2000_anc_transition(wm2000, mode);
wm2000            602 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev);
wm2000            604 sound/soc/codecs/wm2000.c 	ucontrol->value.integer.value[0] = wm2000->anc_active;
wm2000            613 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev);
wm2000            620 sound/soc/codecs/wm2000.c 	mutex_lock(&wm2000->lock);
wm2000            622 sound/soc/codecs/wm2000.c 	wm2000->anc_active = anc_active;
wm2000            624 sound/soc/codecs/wm2000.c 	ret = wm2000_anc_set_mode(wm2000);
wm2000            626 sound/soc/codecs/wm2000.c 	mutex_unlock(&wm2000->lock);
wm2000            635 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev);
wm2000            637 sound/soc/codecs/wm2000.c 	ucontrol->value.integer.value[0] = wm2000->spk_ena;
wm2000            646 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev);
wm2000            653 sound/soc/codecs/wm2000.c 	mutex_lock(&wm2000->lock);
wm2000            655 sound/soc/codecs/wm2000.c 	wm2000->spk_ena = val;
wm2000            657 sound/soc/codecs/wm2000.c 	ret = wm2000_anc_set_mode(wm2000);
wm2000            659 sound/soc/codecs/wm2000.c 	mutex_unlock(&wm2000->lock);
wm2000            678 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev);
wm2000            681 sound/soc/codecs/wm2000.c 	mutex_lock(&wm2000->lock);
wm2000            684 sound/soc/codecs/wm2000.c 		wm2000->anc_eng_ena = 1;
wm2000            687 sound/soc/codecs/wm2000.c 		wm2000->anc_eng_ena = 0;
wm2000            689 sound/soc/codecs/wm2000.c 	ret = wm2000_anc_set_mode(wm2000);
wm2000            691 sound/soc/codecs/wm2000.c 	mutex_unlock(&wm2000->lock);
wm2000            720 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev);
wm2000            722 sound/soc/codecs/wm2000.c 	return wm2000_anc_transition(wm2000, ANC_OFF);
wm2000            727 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev);
wm2000            729 sound/soc/codecs/wm2000.c 	return wm2000_anc_set_mode(wm2000);
wm2000            778 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev);
wm2000            781 sound/soc/codecs/wm2000.c 	wm2000_anc_set_mode(wm2000);
wm2000            788 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev);
wm2000            790 sound/soc/codecs/wm2000.c 	wm2000_anc_transition(wm2000, ANC_OFF);
wm2000            813 sound/soc/codecs/wm2000.c 	struct wm2000_priv *wm2000;
wm2000            821 sound/soc/codecs/wm2000.c 	wm2000 = devm_kzalloc(&i2c->dev, sizeof(*wm2000), GFP_KERNEL);
wm2000            822 sound/soc/codecs/wm2000.c 	if (!wm2000)
wm2000            825 sound/soc/codecs/wm2000.c 	mutex_init(&wm2000->lock);
wm2000            827 sound/soc/codecs/wm2000.c 	dev_set_drvdata(&i2c->dev, wm2000);
wm2000            829 sound/soc/codecs/wm2000.c 	wm2000->regmap = devm_regmap_init_i2c(i2c, &wm2000_regmap);
wm2000            830 sound/soc/codecs/wm2000.c 	if (IS_ERR(wm2000->regmap)) {
wm2000            831 sound/soc/codecs/wm2000.c 		ret = PTR_ERR(wm2000->regmap);
wm2000            838 sound/soc/codecs/wm2000.c 		wm2000->supplies[i].supply = wm2000_supplies[i];
wm2000            841 sound/soc/codecs/wm2000.c 				      wm2000->supplies);
wm2000            847 sound/soc/codecs/wm2000.c 	ret = regulator_bulk_enable(WM2000_NUM_SUPPLIES, wm2000->supplies);
wm2000            854 sound/soc/codecs/wm2000.c 	ret = regmap_read(wm2000->regmap, WM2000_REG_ID1, &reg);
wm2000            860 sound/soc/codecs/wm2000.c 	ret = regmap_read(wm2000->regmap, WM2000_REG_ID2, &reg);
wm2000            873 sound/soc/codecs/wm2000.c 	ret = regmap_read(wm2000->regmap, WM2000_REG_REVISON, &reg);
wm2000            880 sound/soc/codecs/wm2000.c 	wm2000->mclk = devm_clk_get(&i2c->dev, "MCLK");
wm2000            881 sound/soc/codecs/wm2000.c 	if (IS_ERR(wm2000->mclk)) {
wm2000            882 sound/soc/codecs/wm2000.c 		ret = PTR_ERR(wm2000->mclk);
wm2000            890 sound/soc/codecs/wm2000.c 		wm2000->speech_clarity = !pdata->speech_enh_disable;
wm2000            903 sound/soc/codecs/wm2000.c 	wm2000->anc_download_size = fw->size + 2;
wm2000            904 sound/soc/codecs/wm2000.c 	wm2000->anc_download = devm_kzalloc(&i2c->dev,
wm2000            905 sound/soc/codecs/wm2000.c 					    wm2000->anc_download_size,
wm2000            907 sound/soc/codecs/wm2000.c 	if (wm2000->anc_download == NULL) {
wm2000            912 sound/soc/codecs/wm2000.c 	wm2000->anc_download[0] = 0x80;
wm2000            913 sound/soc/codecs/wm2000.c 	wm2000->anc_download[1] = 0x00;
wm2000            914 sound/soc/codecs/wm2000.c 	memcpy(wm2000->anc_download + 2, fw->data, fw->size);
wm2000            916 sound/soc/codecs/wm2000.c 	wm2000->anc_eng_ena = 1;
wm2000            917 sound/soc/codecs/wm2000.c 	wm2000->anc_active = 1;
wm2000            918 sound/soc/codecs/wm2000.c 	wm2000->spk_ena = 1;
wm2000            919 sound/soc/codecs/wm2000.c 	wm2000->i2c = i2c;
wm2000            921 sound/soc/codecs/wm2000.c 	wm2000_reset(wm2000);
wm2000            927 sound/soc/codecs/wm2000.c 	regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies);