Lines Matching refs:wm8804

86 	struct wm8804_priv *wm8804 = container_of(nb, struct wm8804_priv, \
89 regcache_mark_dirty(wm8804->regmap); \
138 struct wm8804_priv *wm8804 = snd_soc_component_get_drvdata(component); in wm8804_aif_event() local
143 if (!wm8804->aif_pwr) in wm8804_aif_event()
145 wm8804->aif_pwr++; in wm8804_aif_event()
149 wm8804->aif_pwr--; in wm8804_aif_event()
150 if (!wm8804->aif_pwr) in wm8804_aif_event()
211 static int wm8804_soft_reset(struct wm8804_priv *wm8804) in wm8804_soft_reset() argument
213 return regmap_write(wm8804->regmap, WM8804_RST_DEVID1, 0x0); in wm8804_soft_reset()
406 struct wm8804_priv *wm8804 = snd_soc_component_get_drvdata(component); in wm8804_set_pll() local
411 regmap_update_bits_check(wm8804->regmap, WM8804_PWRDN, in wm8804_set_pll()
414 pm_runtime_put(wm8804->dev); in wm8804_set_pll()
420 wm8804->mclk_div); in wm8804_set_pll()
425 regmap_update_bits_check(wm8804->regmap, WM8804_PWRDN, in wm8804_set_pll()
428 pm_runtime_get_sync(wm8804->dev); in wm8804_set_pll()
487 struct wm8804_priv *wm8804; in wm8804_set_clkdiv() local
496 wm8804 = snd_soc_component_get_drvdata(component); in wm8804_set_clkdiv()
497 wm8804->mclk_div = div; in wm8804_set_clkdiv()
566 struct wm8804_priv *wm8804; in wm8804_probe() local
570 wm8804 = devm_kzalloc(dev, sizeof(*wm8804), GFP_KERNEL); in wm8804_probe()
571 if (!wm8804) in wm8804_probe()
574 dev_set_drvdata(dev, wm8804); in wm8804_probe()
576 wm8804->dev = dev; in wm8804_probe()
577 wm8804->regmap = regmap; in wm8804_probe()
579 wm8804->reset = devm_gpiod_get_optional(dev, "wlf,reset", in wm8804_probe()
581 if (IS_ERR(wm8804->reset)) { in wm8804_probe()
582 ret = PTR_ERR(wm8804->reset); in wm8804_probe()
587 for (i = 0; i < ARRAY_SIZE(wm8804->supplies); i++) in wm8804_probe()
588 wm8804->supplies[i].supply = wm8804_supply_names[i]; in wm8804_probe()
590 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(wm8804->supplies), in wm8804_probe()
591 wm8804->supplies); in wm8804_probe()
597 wm8804->disable_nb[0].notifier_call = wm8804_regulator_event_0; in wm8804_probe()
598 wm8804->disable_nb[1].notifier_call = wm8804_regulator_event_1; in wm8804_probe()
601 for (i = 0; i < ARRAY_SIZE(wm8804->supplies); i++) { in wm8804_probe()
602 struct regulator *regulator = wm8804->supplies[i].consumer; in wm8804_probe()
605 &wm8804->disable_nb[i]); in wm8804_probe()
614 ret = regulator_bulk_enable(ARRAY_SIZE(wm8804->supplies), in wm8804_probe()
615 wm8804->supplies); in wm8804_probe()
621 gpiod_set_value_cansleep(wm8804->reset, 1); in wm8804_probe()
651 if (!wm8804->reset) { in wm8804_probe()
652 ret = wm8804_soft_reset(wm8804); in wm8804_probe()
673 regulator_bulk_disable(ARRAY_SIZE(wm8804->supplies), wm8804->supplies); in wm8804_probe()
687 struct wm8804_priv *wm8804 = dev_get_drvdata(dev); in wm8804_runtime_resume() local
690 ret = regulator_bulk_enable(ARRAY_SIZE(wm8804->supplies), in wm8804_runtime_resume()
691 wm8804->supplies); in wm8804_runtime_resume()
693 dev_err(wm8804->dev, "Failed to enable supplies: %d\n", ret); in wm8804_runtime_resume()
697 regcache_sync(wm8804->regmap); in wm8804_runtime_resume()
700 regmap_update_bits(wm8804->regmap, WM8804_PWRDN, 0x8, 0x0); in wm8804_runtime_resume()
707 struct wm8804_priv *wm8804 = dev_get_drvdata(dev); in wm8804_runtime_suspend() local
710 regmap_update_bits(wm8804->regmap, WM8804_PWRDN, 0x8, 0x8); in wm8804_runtime_suspend()
712 regulator_bulk_disable(ARRAY_SIZE(wm8804->supplies), in wm8804_runtime_suspend()
713 wm8804->supplies); in wm8804_runtime_suspend()