Lines Matching refs:rt1017
321 struct rt1017_sdca_priv *rt1017 = dev_get_drvdata(dev); in rt1017_sdca_io_init() local
323 if (rt1017->hw_init) in rt1017_sdca_io_init()
326 if (rt1017->first_hw_init) { in rt1017_sdca_io_init()
327 regcache_cache_only(rt1017->regmap, false); in rt1017_sdca_io_init()
328 regcache_cache_bypass(rt1017->regmap, true); in rt1017_sdca_io_init()
350 regmap_write(rt1017->regmap, 0xc000, 0x02); in rt1017_sdca_io_init()
353 regmap_multi_reg_write(rt1017->regmap, rt1017_blind_write, in rt1017_sdca_io_init()
356 if (rt1017->first_hw_init) { in rt1017_sdca_io_init()
357 regcache_cache_bypass(rt1017->regmap, false); in rt1017_sdca_io_init()
358 regcache_mark_dirty(rt1017->regmap); in rt1017_sdca_io_init()
360 rt1017->first_hw_init = true; in rt1017_sdca_io_init()
363 rt1017->hw_init = true; in rt1017_sdca_io_init()
375 struct rt1017_sdca_priv *rt1017 = dev_get_drvdata(&slave->dev); in rt1017_sdca_update_status() local
378 rt1017->hw_init = false; in rt1017_sdca_update_status()
384 if (rt1017->hw_init || status != SDW_SLAVE_ATTACHED) in rt1017_sdca_update_status()
424 struct rt1017_sdca_priv *rt1017 = snd_soc_component_get_drvdata(component); in rt1017_sdca_pde23_event() local
429 regmap_write(rt1017->regmap, in rt1017_sdca_pde23_event()
435 regmap_write(rt1017->regmap, in rt1017_sdca_pde23_event()
450 struct rt1017_sdca_priv *rt1017 = snd_soc_component_get_drvdata(component); in rt1017_sdca_classd_event() local
454 regmap_update_bits(rt1017->regmap, RT1017_PWM_TRIM_1, in rt1017_sdca_classd_event()
456 regmap_write(rt1017->regmap, RT1017_CLASSD_INT_1, 0x10); in rt1017_sdca_classd_event()
469 struct rt1017_sdca_priv *rt1017 = snd_soc_component_get_drvdata(component); in rt1017_sdca_feedback_event() local
473 regmap_update_bits(rt1017->regmap, 0xd017, 0x1f, 0x08); in rt1017_sdca_feedback_event()
476 regmap_update_bits(rt1017->regmap, 0xd017, 0x1f, 0x09); in rt1017_sdca_feedback_event()
541 struct rt1017_sdca_priv *rt1017 = snd_soc_component_get_drvdata(component); in rt1017_sdca_component_remove() local
543 regcache_cache_only(rt1017->regmap, true); in rt1017_sdca_component_remove()
577 struct rt1017_sdca_priv *rt1017 = snd_soc_component_get_drvdata(component); in rt1017_sdca_pcm_hw_params() local
591 if (!rt1017->sdw_slave) in rt1017_sdca_pcm_hw_params()
619 retval = sdw_stream_add_slave(rt1017->sdw_slave, &stream_config, in rt1017_sdca_pcm_hw_params()
647 regmap_write(rt1017->regmap, in rt1017_sdca_pcm_hw_params()
659 struct rt1017_sdca_priv *rt1017 = snd_soc_component_get_drvdata(component); in rt1017_sdca_pcm_hw_free() local
663 if (!rt1017->sdw_slave) in rt1017_sdca_pcm_hw_free()
666 sdw_stream_remove_slave(rt1017->sdw_slave, sdw_stream); in rt1017_sdca_pcm_hw_free()
706 struct rt1017_sdca_priv *rt1017; in rt1017_sdca_init() local
709 rt1017 = devm_kzalloc(dev, sizeof(*rt1017), GFP_KERNEL); in rt1017_sdca_init()
710 if (!rt1017) in rt1017_sdca_init()
713 dev_set_drvdata(dev, rt1017); in rt1017_sdca_init()
714 rt1017->sdw_slave = slave; in rt1017_sdca_init()
715 rt1017->regmap = regmap; in rt1017_sdca_init()
721 rt1017->hw_init = false; in rt1017_sdca_init()
722 rt1017->first_hw_init = false; in rt1017_sdca_init()
747 struct rt1017_sdca_priv *rt1017 = dev_get_drvdata(&slave->dev); in rt1017_sdca_sdw_remove() local
749 if (rt1017->first_hw_init) in rt1017_sdca_sdw_remove()
763 struct rt1017_sdca_priv *rt1017 = dev_get_drvdata(dev); in rt1017_sdca_dev_suspend() local
765 if (!rt1017->hw_init) in rt1017_sdca_dev_suspend()
768 regcache_cache_only(rt1017->regmap, true); in rt1017_sdca_dev_suspend()
778 struct rt1017_sdca_priv *rt1017 = dev_get_drvdata(dev); in rt1017_sdca_dev_resume() local
781 if (!rt1017->first_hw_init) in rt1017_sdca_dev_resume()
798 regcache_cache_only(rt1017->regmap, false); in rt1017_sdca_dev_resume()
799 regcache_sync(rt1017->regmap); in rt1017_sdca_dev_resume()