Lines Matching refs:wm8985

566 	struct wm8985_priv *wm8985 = snd_soc_component_get_drvdata(component);  in wm8985_add_widgets()  local
569 switch (wm8985->dev_type) { in wm8985_add_widgets()
752 struct wm8985_priv *wm8985; in wm8985_hw_params() local
758 wm8985 = snd_soc_component_get_drvdata(component); in wm8985_hw_params()
760 wm8985->bclk = snd_soc_params_to_bclk(params); in wm8985_hw_params()
761 if ((int)wm8985->bclk < 0) in wm8985_hw_params()
762 return wm8985->bclk; in wm8985_hw_params()
803 dev_dbg(dai->dev, "Target BCLK = %uHz\n", wm8985->bclk); in wm8985_hw_params()
804 dev_dbg(dai->dev, "SYSCLK = %uHz\n", wm8985->sysclk); in wm8985_hw_params()
807 if (wm8985->sysclk / params_rate(params) in wm8985_hw_params()
814 wm8985->sysclk, params_rate(params)); in wm8985_hw_params()
823 tmp = (wm8985->sysclk / fs_ratios[i].div) * 10; in wm8985_hw_params()
825 if (wm8985->bclk == tmp / bclk_divs[i]) in wm8985_hw_params()
922 struct wm8985_priv *wm8985; in wm8985_set_sysclk() local
925 wm8985 = snd_soc_component_get_drvdata(component); in wm8985_set_sysclk()
943 wm8985->sysclk = freq; in wm8985_set_sysclk()
951 struct wm8985_priv *wm8985; in wm8985_set_bias_level() local
953 wm8985 = snd_soc_component_get_drvdata(component); in wm8985_set_bias_level()
964 ret = regulator_bulk_enable(ARRAY_SIZE(wm8985->supplies), in wm8985_set_bias_level()
965 wm8985->supplies); in wm8985_set_bias_level()
973 regcache_sync(wm8985->regmap); in wm8985_set_bias_level()
1016 regcache_mark_dirty(wm8985->regmap); in wm8985_set_bias_level()
1018 regulator_bulk_disable(ARRAY_SIZE(wm8985->supplies), in wm8985_set_bias_level()
1019 wm8985->supplies); in wm8985_set_bias_level()
1029 struct wm8985_priv *wm8985; in wm8985_probe() local
1032 wm8985 = snd_soc_component_get_drvdata(component); in wm8985_probe()
1034 for (i = 0; i < ARRAY_SIZE(wm8985->supplies); i++) in wm8985_probe()
1035 wm8985->supplies[i].supply = wm8985_supply_names[i]; in wm8985_probe()
1037 ret = devm_regulator_bulk_get(component->dev, ARRAY_SIZE(wm8985->supplies), in wm8985_probe()
1038 wm8985->supplies); in wm8985_probe()
1044 ret = regulator_bulk_enable(ARRAY_SIZE(wm8985->supplies), in wm8985_probe()
1045 wm8985->supplies); in wm8985_probe()
1070 regulator_bulk_disable(ARRAY_SIZE(wm8985->supplies), wm8985->supplies); in wm8985_probe()
1136 struct wm8985_priv *wm8985; in wm8985_spi_probe() local
1139 wm8985 = devm_kzalloc(&spi->dev, sizeof *wm8985, GFP_KERNEL); in wm8985_spi_probe()
1140 if (!wm8985) in wm8985_spi_probe()
1143 spi_set_drvdata(spi, wm8985); in wm8985_spi_probe()
1145 wm8985->dev_type = WM8985; in wm8985_spi_probe()
1147 wm8985->regmap = devm_regmap_init_spi(spi, &wm8985_regmap); in wm8985_spi_probe()
1148 if (IS_ERR(wm8985->regmap)) { in wm8985_spi_probe()
1149 ret = PTR_ERR(wm8985->regmap); in wm8985_spi_probe()
1172 struct wm8985_priv *wm8985; in wm8985_i2c_probe() local
1175 wm8985 = devm_kzalloc(&i2c->dev, sizeof *wm8985, GFP_KERNEL); in wm8985_i2c_probe()
1176 if (!wm8985) in wm8985_i2c_probe()
1179 i2c_set_clientdata(i2c, wm8985); in wm8985_i2c_probe()
1181 wm8985->dev_type = id->driver_data; in wm8985_i2c_probe()
1183 wm8985->regmap = devm_regmap_init_i2c(i2c, &wm8985_regmap); in wm8985_i2c_probe()
1184 if (IS_ERR(wm8985->regmap)) { in wm8985_i2c_probe()
1185 ret = PTR_ERR(wm8985->regmap); in wm8985_i2c_probe()