Lines Matching refs:wm8741

179 	struct wm8741_priv *wm8741 = snd_soc_component_get_drvdata(component);  in wm8741_startup()  local
181 if (wm8741->sysclk) in wm8741_startup()
184 wm8741->sysclk_constraints); in wm8741_startup()
194 struct wm8741_priv *wm8741 = snd_soc_component_get_drvdata(component); in wm8741_hw_params() local
201 if (!wm8741->sysclk) { in wm8741_hw_params()
208 for (i = 0; i < wm8741->sysclk_constraints->count; i++) { in wm8741_hw_params()
209 if (wm8741->sysclk_constraints->list[i] == params_rate(params)) in wm8741_hw_params()
213 if (i == wm8741->sysclk_constraints->count) { in wm8741_hw_params()
215 params_rate(params), wm8741->sysclk); in wm8741_hw_params()
262 struct wm8741_priv *wm8741 = snd_soc_component_get_drvdata(component); in wm8741_set_dai_sysclk() local
268 wm8741->sysclk_constraints = NULL; in wm8741_set_dai_sysclk()
271 wm8741->sysclk_constraints = &constraints_11289; in wm8741_set_dai_sysclk()
274 wm8741->sysclk_constraints = &constraints_12288; in wm8741_set_dai_sysclk()
277 wm8741->sysclk_constraints = &constraints_16384; in wm8741_set_dai_sysclk()
280 wm8741->sysclk_constraints = &constraints_16934; in wm8741_set_dai_sysclk()
283 wm8741->sysclk_constraints = &constraints_18432; in wm8741_set_dai_sysclk()
287 wm8741->sysclk_constraints = &constraints_22579; in wm8741_set_dai_sysclk()
290 wm8741->sysclk_constraints = &constraints_24576; in wm8741_set_dai_sysclk()
293 wm8741->sysclk_constraints = &constraints_36864; in wm8741_set_dai_sysclk()
299 wm8741->sysclk = freq; in wm8741_set_dai_sysclk()
416 struct wm8741_priv *wm8741 = snd_soc_component_get_drvdata(component); in wm8741_configure() local
419 switch (wm8741->pdata.diff_mode) { in wm8741_configure()
426 wm8741->pdata.diff_mode << WM8741_DIFF_SHIFT); in wm8741_configure()
447 struct wm8741_priv *wm8741 = snd_soc_component_get_drvdata(component); in wm8741_add_controls() local
449 switch (wm8741->pdata.diff_mode) { in wm8741_add_controls()
475 struct wm8741_priv *wm8741 = snd_soc_component_get_drvdata(component); in wm8741_probe() local
478 ret = regulator_bulk_enable(ARRAY_SIZE(wm8741->supplies), in wm8741_probe()
479 wm8741->supplies); in wm8741_probe()
507 regulator_bulk_disable(ARRAY_SIZE(wm8741->supplies), wm8741->supplies); in wm8741_probe()
514 struct wm8741_priv *wm8741 = snd_soc_component_get_drvdata(component); in wm8741_remove() local
516 regulator_bulk_disable(ARRAY_SIZE(wm8741->supplies), wm8741->supplies); in wm8741_remove()
549 static int wm8741_set_pdata(struct device *dev, struct wm8741_priv *wm8741) in wm8741_set_pdata() argument
557 wm8741->pdata.diff_mode = diff_mode; in wm8741_set_pdata()
560 memcpy(&wm8741->pdata, pdata, sizeof(wm8741->pdata)); in wm8741_set_pdata()
570 struct wm8741_priv *wm8741; in wm8741_i2c_probe() local
573 wm8741 = devm_kzalloc(&i2c->dev, sizeof(struct wm8741_priv), in wm8741_i2c_probe()
575 if (wm8741 == NULL) in wm8741_i2c_probe()
578 for (i = 0; i < ARRAY_SIZE(wm8741->supplies); i++) in wm8741_i2c_probe()
579 wm8741->supplies[i].supply = wm8741_supply_names[i]; in wm8741_i2c_probe()
581 ret = devm_regulator_bulk_get(&i2c->dev, ARRAY_SIZE(wm8741->supplies), in wm8741_i2c_probe()
582 wm8741->supplies); in wm8741_i2c_probe()
588 wm8741->regmap = devm_regmap_init_i2c(i2c, &wm8741_regmap); in wm8741_i2c_probe()
589 if (IS_ERR(wm8741->regmap)) { in wm8741_i2c_probe()
590 ret = PTR_ERR(wm8741->regmap); in wm8741_i2c_probe()
595 ret = wm8741_set_pdata(&i2c->dev, wm8741); in wm8741_i2c_probe()
601 i2c_set_clientdata(i2c, wm8741); in wm8741_i2c_probe()
628 struct wm8741_priv *wm8741; in wm8741_spi_probe() local
631 wm8741 = devm_kzalloc(&spi->dev, sizeof(struct wm8741_priv), in wm8741_spi_probe()
633 if (wm8741 == NULL) in wm8741_spi_probe()
636 for (i = 0; i < ARRAY_SIZE(wm8741->supplies); i++) in wm8741_spi_probe()
637 wm8741->supplies[i].supply = wm8741_supply_names[i]; in wm8741_spi_probe()
639 ret = devm_regulator_bulk_get(&spi->dev, ARRAY_SIZE(wm8741->supplies), in wm8741_spi_probe()
640 wm8741->supplies); in wm8741_spi_probe()
646 wm8741->regmap = devm_regmap_init_spi(spi, &wm8741_regmap); in wm8741_spi_probe()
647 if (IS_ERR(wm8741->regmap)) { in wm8741_spi_probe()
648 ret = PTR_ERR(wm8741->regmap); in wm8741_spi_probe()
653 ret = wm8741_set_pdata(&spi->dev, wm8741); in wm8741_spi_probe()
659 spi_set_drvdata(spi, wm8741); in wm8741_spi_probe()