Lines Matching refs:rt711
144 struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); in rt711_sdca_update_status() local
147 rt711->hw_init = false; in rt711_sdca_update_status()
150 if (rt711->hs_jack) { in rt711_sdca_update_status()
157 sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INTMASK1, in rt711_sdca_update_status()
159 sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INTMASK2, in rt711_sdca_update_status()
168 if (rt711->hw_init || status != SDW_SLAVE_ATTACHED) in rt711_sdca_update_status()
240 struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); in rt711_sdca_interrupt_callback() local
249 if (cancel_delayed_work_sync(&rt711->jack_detect_work)) { in rt711_sdca_interrupt_callback()
252 if (rt711->scp_sdca_stat2) in rt711_sdca_interrupt_callback()
253 scp_sdca_stat2 = rt711->scp_sdca_stat2; in rt711_sdca_interrupt_callback()
263 mutex_lock(&rt711->disable_irq_lock); in rt711_sdca_interrupt_callback()
265 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT1); in rt711_sdca_interrupt_callback()
268 rt711->scp_sdca_stat1 = ret; in rt711_sdca_interrupt_callback()
269 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT2); in rt711_sdca_interrupt_callback()
272 rt711->scp_sdca_stat2 = ret; in rt711_sdca_interrupt_callback()
274 rt711->scp_sdca_stat2 |= scp_sdca_stat2; in rt711_sdca_interrupt_callback()
278 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT1); in rt711_sdca_interrupt_callback()
282 ret = sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INT1, in rt711_sdca_interrupt_callback()
287 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT2); in rt711_sdca_interrupt_callback()
291 ret = sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INT2, in rt711_sdca_interrupt_callback()
298 ret = sdw_read_no_pm(rt711->slave, SDW_DP0_INT); in rt711_sdca_interrupt_callback()
303 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT1); in rt711_sdca_interrupt_callback()
308 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT2); in rt711_sdca_interrupt_callback()
321 rt711->scp_sdca_stat1, rt711->scp_sdca_stat2); in rt711_sdca_interrupt_callback()
323 if (status->sdca_cascade && !rt711->disable_irq) in rt711_sdca_interrupt_callback()
325 &rt711->jack_detect_work, msecs_to_jiffies(30)); in rt711_sdca_interrupt_callback()
327 mutex_unlock(&rt711->disable_irq_lock); in rt711_sdca_interrupt_callback()
332 mutex_unlock(&rt711->disable_irq_lock); in rt711_sdca_interrupt_callback()
362 struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); in rt711_sdca_sdw_remove() local
364 if (rt711->hw_init) { in rt711_sdca_sdw_remove()
365 cancel_delayed_work_sync(&rt711->jack_detect_work); in rt711_sdca_sdw_remove()
366 cancel_delayed_work_sync(&rt711->jack_btn_check_work); in rt711_sdca_sdw_remove()
371 mutex_destroy(&rt711->calibrate_mutex); in rt711_sdca_sdw_remove()
372 mutex_destroy(&rt711->disable_irq_lock); in rt711_sdca_sdw_remove()
385 struct rt711_sdca_priv *rt711 = dev_get_drvdata(dev); in rt711_sdca_dev_suspend() local
387 if (!rt711->hw_init) in rt711_sdca_dev_suspend()
390 cancel_delayed_work_sync(&rt711->jack_detect_work); in rt711_sdca_dev_suspend()
391 cancel_delayed_work_sync(&rt711->jack_btn_check_work); in rt711_sdca_dev_suspend()
393 regcache_cache_only(rt711->regmap, true); in rt711_sdca_dev_suspend()
394 regcache_cache_only(rt711->mbq_regmap, true); in rt711_sdca_dev_suspend()
434 struct rt711_sdca_priv *rt711 = dev_get_drvdata(dev); in rt711_sdca_dev_resume() local
437 if (!rt711->first_hw_init) in rt711_sdca_dev_resume()
441 mutex_lock(&rt711->disable_irq_lock); in rt711_sdca_dev_resume()
442 if (rt711->disable_irq == true) { in rt711_sdca_dev_resume()
445 rt711->disable_irq = false; in rt711_sdca_dev_resume()
447 mutex_unlock(&rt711->disable_irq_lock); in rt711_sdca_dev_resume()
462 regcache_cache_only(rt711->regmap, false); in rt711_sdca_dev_resume()
463 regcache_sync(rt711->regmap); in rt711_sdca_dev_resume()
464 regcache_cache_only(rt711->mbq_regmap, false); in rt711_sdca_dev_resume()
465 regcache_sync(rt711->mbq_regmap); in rt711_sdca_dev_resume()