Lines Matching refs:rt711
144 struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); in rt711_sdca_update_status() local
147 rt711->status = status; in rt711_sdca_update_status()
150 rt711->hw_init = false; in rt711_sdca_update_status()
153 if (rt711->hs_jack) { in rt711_sdca_update_status()
160 sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INTMASK1, in rt711_sdca_update_status()
162 sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INTMASK2, in rt711_sdca_update_status()
171 if (rt711->hw_init || rt711->status != SDW_SLAVE_ATTACHED) in rt711_sdca_update_status()
244 struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); in rt711_sdca_interrupt_callback() local
253 if (cancel_delayed_work_sync(&rt711->jack_detect_work)) { in rt711_sdca_interrupt_callback()
256 if (rt711->scp_sdca_stat2) in rt711_sdca_interrupt_callback()
257 scp_sdca_stat2 = rt711->scp_sdca_stat2; in rt711_sdca_interrupt_callback()
267 mutex_lock(&rt711->disable_irq_lock); in rt711_sdca_interrupt_callback()
269 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT1); in rt711_sdca_interrupt_callback()
272 rt711->scp_sdca_stat1 = ret; in rt711_sdca_interrupt_callback()
273 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT2); in rt711_sdca_interrupt_callback()
276 rt711->scp_sdca_stat2 = ret; in rt711_sdca_interrupt_callback()
278 rt711->scp_sdca_stat2 |= scp_sdca_stat2; in rt711_sdca_interrupt_callback()
282 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT1); in rt711_sdca_interrupt_callback()
286 ret = sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INT1, in rt711_sdca_interrupt_callback()
291 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT2); in rt711_sdca_interrupt_callback()
295 ret = sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INT2, in rt711_sdca_interrupt_callback()
302 ret = sdw_read_no_pm(rt711->slave, SDW_DP0_INT); in rt711_sdca_interrupt_callback()
307 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT1); in rt711_sdca_interrupt_callback()
312 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT2); in rt711_sdca_interrupt_callback()
325 rt711->scp_sdca_stat1, rt711->scp_sdca_stat2); in rt711_sdca_interrupt_callback()
327 if (status->sdca_cascade && !rt711->disable_irq) in rt711_sdca_interrupt_callback()
329 &rt711->jack_detect_work, msecs_to_jiffies(30)); in rt711_sdca_interrupt_callback()
331 mutex_unlock(&rt711->disable_irq_lock); in rt711_sdca_interrupt_callback()
336 mutex_unlock(&rt711->disable_irq_lock); in rt711_sdca_interrupt_callback()
366 struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); in rt711_sdca_sdw_remove() local
368 if (rt711->hw_init) { in rt711_sdca_sdw_remove()
369 cancel_delayed_work_sync(&rt711->jack_detect_work); in rt711_sdca_sdw_remove()
370 cancel_delayed_work_sync(&rt711->jack_btn_check_work); in rt711_sdca_sdw_remove()
373 if (rt711->first_hw_init) in rt711_sdca_sdw_remove()
376 mutex_destroy(&rt711->calibrate_mutex); in rt711_sdca_sdw_remove()
377 mutex_destroy(&rt711->disable_irq_lock); in rt711_sdca_sdw_remove()
390 struct rt711_sdca_priv *rt711 = dev_get_drvdata(dev); in rt711_sdca_dev_suspend() local
392 if (!rt711->hw_init) in rt711_sdca_dev_suspend()
395 cancel_delayed_work_sync(&rt711->jack_detect_work); in rt711_sdca_dev_suspend()
396 cancel_delayed_work_sync(&rt711->jack_btn_check_work); in rt711_sdca_dev_suspend()
398 regcache_cache_only(rt711->regmap, true); in rt711_sdca_dev_suspend()
399 regcache_cache_only(rt711->mbq_regmap, true); in rt711_sdca_dev_suspend()
439 struct rt711_sdca_priv *rt711 = dev_get_drvdata(dev); in rt711_sdca_dev_resume() local
442 if (!rt711->first_hw_init) in rt711_sdca_dev_resume()
459 regcache_cache_only(rt711->regmap, false); in rt711_sdca_dev_resume()
460 regcache_sync(rt711->regmap); in rt711_sdca_dev_resume()
461 regcache_cache_only(rt711->mbq_regmap, false); in rt711_sdca_dev_resume()
462 regcache_sync(rt711->mbq_regmap); in rt711_sdca_dev_resume()