Lines Matching refs:rt722
166 struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev); in rt722_sdca_update_status() local
169 rt722->hw_init = false; in rt722_sdca_update_status()
172 if (rt722->hs_jack) { in rt722_sdca_update_status()
179 sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INTMASK1, in rt722_sdca_update_status()
181 sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INTMASK2, in rt722_sdca_update_status()
190 if (rt722->hw_init || status != SDW_SLAVE_ATTACHED) in rt722_sdca_update_status()
270 struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev); in rt722_sdca_interrupt_callback() local
275 if (cancel_delayed_work_sync(&rt722->jack_detect_work)) { in rt722_sdca_interrupt_callback()
278 if (rt722->scp_sdca_stat2) in rt722_sdca_interrupt_callback()
279 scp_sdca_stat2 = rt722->scp_sdca_stat2; in rt722_sdca_interrupt_callback()
289 mutex_lock(&rt722->disable_irq_lock); in rt722_sdca_interrupt_callback()
291 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT1); in rt722_sdca_interrupt_callback()
294 rt722->scp_sdca_stat1 = ret; in rt722_sdca_interrupt_callback()
295 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT2); in rt722_sdca_interrupt_callback()
298 rt722->scp_sdca_stat2 = ret; in rt722_sdca_interrupt_callback()
300 rt722->scp_sdca_stat2 |= scp_sdca_stat2; in rt722_sdca_interrupt_callback()
303 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT1); in rt722_sdca_interrupt_callback()
307 ret = sdw_update_no_pm(rt722->slave, SDW_SCP_SDCA_INT1, in rt722_sdca_interrupt_callback()
312 ret = sdw_update_no_pm(rt722->slave, SDW_SCP_SDCA_INT1, in rt722_sdca_interrupt_callback()
317 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT2); in rt722_sdca_interrupt_callback()
321 ret = sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INT2, in rt722_sdca_interrupt_callback()
328 ret = sdw_read_no_pm(rt722->slave, SDW_DP0_INT); in rt722_sdca_interrupt_callback()
333 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT1); in rt722_sdca_interrupt_callback()
338 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT2); in rt722_sdca_interrupt_callback()
351 rt722->scp_sdca_stat1, rt722->scp_sdca_stat2); in rt722_sdca_interrupt_callback()
353 if (status->sdca_cascade && !rt722->disable_irq) in rt722_sdca_interrupt_callback()
355 &rt722->jack_detect_work, msecs_to_jiffies(280)); in rt722_sdca_interrupt_callback()
357 mutex_unlock(&rt722->disable_irq_lock); in rt722_sdca_interrupt_callback()
362 mutex_unlock(&rt722->disable_irq_lock); in rt722_sdca_interrupt_callback()
392 struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev); in rt722_sdca_sdw_remove() local
394 if (rt722->hw_init) { in rt722_sdca_sdw_remove()
395 cancel_delayed_work_sync(&rt722->jack_detect_work); in rt722_sdca_sdw_remove()
396 cancel_delayed_work_sync(&rt722->jack_btn_check_work); in rt722_sdca_sdw_remove()
399 if (rt722->first_hw_init) in rt722_sdca_sdw_remove()
402 mutex_destroy(&rt722->calibrate_mutex); in rt722_sdca_sdw_remove()
403 mutex_destroy(&rt722->disable_irq_lock); in rt722_sdca_sdw_remove()
416 struct rt722_sdca_priv *rt722 = dev_get_drvdata(dev); in rt722_sdca_dev_suspend() local
418 if (!rt722->hw_init) in rt722_sdca_dev_suspend()
421 cancel_delayed_work_sync(&rt722->jack_detect_work); in rt722_sdca_dev_suspend()
422 cancel_delayed_work_sync(&rt722->jack_btn_check_work); in rt722_sdca_dev_suspend()
424 regcache_cache_only(rt722->regmap, true); in rt722_sdca_dev_suspend()
425 regcache_cache_only(rt722->mbq_regmap, true); in rt722_sdca_dev_suspend()
465 struct rt722_sdca_priv *rt722 = dev_get_drvdata(dev); in rt722_sdca_dev_resume() local
468 if (!rt722->first_hw_init) in rt722_sdca_dev_resume()
472 mutex_lock(&rt722->disable_irq_lock); in rt722_sdca_dev_resume()
473 if (rt722->disable_irq == true) { in rt722_sdca_dev_resume()
476 rt722->disable_irq = false; in rt722_sdca_dev_resume()
478 mutex_unlock(&rt722->disable_irq_lock); in rt722_sdca_dev_resume()
493 regcache_cache_only(rt722->regmap, false); in rt722_sdca_dev_resume()
494 regcache_sync(rt722->regmap); in rt722_sdca_dev_resume()
495 regcache_cache_only(rt722->mbq_regmap, false); in rt722_sdca_dev_resume()
496 regcache_sync(rt722->mbq_regmap); in rt722_sdca_dev_resume()