Lines Matching full:da7219_aad
53 struct da7219_aad_priv *da7219_aad = in da7219_aad_btn_det_work() local
55 struct snd_soc_component *component = da7219_aad->component; in da7219_aad_btn_det_work()
91 if (da7219_aad->micbias_pulse_lvl && da7219_aad->micbias_pulse_time) { in da7219_aad_btn_det_work()
96 da7219_aad->micbias_pulse_lvl); in da7219_aad_btn_det_work()
97 msleep(da7219_aad->micbias_pulse_time); in da7219_aad_btn_det_work()
104 da7219_aad->btn_cfg); in da7219_aad_btn_det_work()
109 struct da7219_aad_priv *da7219_aad = in da7219_aad_hptest_work() local
111 struct snd_soc_component *component = da7219_aad->component; in da7219_aad_hptest_work()
331 if (da7219_aad->jack_inserted) in da7219_aad_hptest_work()
332 snd_soc_jack_report(da7219_aad->jack, report, in da7219_aad_hptest_work()
338 struct da7219_aad_priv *da7219_aad = in da7219_aad_jack_det_work() local
340 struct snd_soc_component *component = da7219_aad->component; in da7219_aad_jack_det_work()
352 struct da7219_aad_priv *da7219_aad = data; in da7219_aad_irq_thread() local
353 struct snd_soc_component *component = da7219_aad->component; in da7219_aad_irq_thread()
380 delay = (da7219_aad->gnd_switch_delay * ((srm_st == 0x0) ? 2 : 1) - 2); in da7219_aad_irq_thread()
381 queue_delayed_work(da7219_aad->aad_wq, in da7219_aad_irq_thread()
382 &da7219_aad->jack_det_work, in da7219_aad_irq_thread()
400 da7219_aad->jack_inserted = true; in da7219_aad_irq_thread()
419 cancel_delayed_work_sync(&da7219_aad->jack_det_work); in da7219_aad_irq_thread()
426 queue_work(da7219_aad->aad_wq, &da7219_aad->btn_det_work); in da7219_aad_irq_thread()
428 queue_work(da7219_aad->aad_wq, &da7219_aad->hptest_work); in da7219_aad_irq_thread()
442 snd_soc_jack_report(da7219_aad->jack, report, mask); in da7219_aad_irq_thread()
458 da7219_aad->jack_inserted = false; in da7219_aad_irq_thread()
461 cancel_delayed_work_sync(&da7219_aad->jack_det_work); in da7219_aad_irq_thread()
462 cancel_work_sync(&da7219_aad->btn_det_work); in da7219_aad_irq_thread()
463 cancel_work_sync(&da7219_aad->hptest_work); in da7219_aad_irq_thread()
486 snd_soc_jack_report(da7219_aad->jack, report, mask); in da7219_aad_irq_thread()
669 aad_np = device_get_named_child_node(dev, "da7219_aad"); in da7219_aad_fw_to_pdata()
766 struct da7219_aad_priv *da7219_aad = da7219->aad; in da7219_aad_handle_pdata() local
773 da7219_aad->irq = aad_pdata->irq; in da7219_aad_handle_pdata()
778 da7219_aad->micbias_pulse_lvl = in da7219_aad_handle_pdata()
786 da7219_aad->micbias_pulse_time = aad_pdata->micbias_pulse_time; in da7219_aad_handle_pdata()
796 da7219_aad->btn_cfg = (aad_pdata->btn_cfg << in da7219_aad_handle_pdata()
899 struct da7219_aad_priv *da7219_aad = da7219->aad; in da7219_aad_handle_gnd_switch_time() local
906 da7219_aad->gnd_switch_delay = 32; in da7219_aad_handle_gnd_switch_time()
909 da7219_aad->gnd_switch_delay = 64; in da7219_aad_handle_gnd_switch_time()
912 da7219_aad->gnd_switch_delay = 128; in da7219_aad_handle_gnd_switch_time()
915 da7219_aad->gnd_switch_delay = 256; in da7219_aad_handle_gnd_switch_time()
918 da7219_aad->gnd_switch_delay = 32; in da7219_aad_handle_gnd_switch_time()
930 struct da7219_aad_priv *da7219_aad = da7219->aad; in da7219_aad_suspend() local
934 disable_irq(da7219_aad->irq); in da7219_aad_suspend()
936 if (da7219_aad->jack) { in da7219_aad_suspend()
940 cancel_delayed_work_sync(&da7219_aad->jack_det_work); in da7219_aad_suspend()
950 if (da7219_aad->jack_inserted) { in da7219_aad_suspend()
955 da7219_aad->micbias_resume_enable = true; in da7219_aad_suspend()
964 struct da7219_aad_priv *da7219_aad = da7219->aad; in da7219_aad_resume() local
967 if (da7219_aad->jack) { in da7219_aad_resume()
969 if (da7219_aad->jack_inserted && in da7219_aad_resume()
970 da7219_aad->micbias_resume_enable) { in da7219_aad_resume()
973 da7219_aad->micbias_resume_enable = false; in da7219_aad_resume()
982 enable_irq(da7219_aad->irq); in da7219_aad_resume()
993 struct da7219_aad_priv *da7219_aad = da7219->aad; in da7219_aad_init() local
997 da7219_aad->component = component; in da7219_aad_init()
1008 da7219_aad->aad_wq = create_singlethread_workqueue("da7219-aad"); in da7219_aad_init()
1009 if (!da7219_aad->aad_wq) { in da7219_aad_init()
1014 INIT_DELAYED_WORK(&da7219_aad->jack_det_work, da7219_aad_jack_det_work); in da7219_aad_init()
1015 INIT_WORK(&da7219_aad->btn_det_work, da7219_aad_btn_det_work); in da7219_aad_init()
1016 INIT_WORK(&da7219_aad->hptest_work, da7219_aad_hptest_work); in da7219_aad_init()
1018 ret = request_threaded_irq(da7219_aad->irq, NULL, in da7219_aad_init()
1021 "da7219-aad", da7219_aad); in da7219_aad_init()
1038 struct da7219_aad_priv *da7219_aad = da7219->aad; in da7219_aad_exit() local
1046 free_irq(da7219_aad->irq, da7219_aad); in da7219_aad_exit()
1048 cancel_delayed_work_sync(&da7219_aad->jack_det_work); in da7219_aad_exit()
1049 cancel_work_sync(&da7219_aad->btn_det_work); in da7219_aad_exit()
1050 cancel_work_sync(&da7219_aad->hptest_work); in da7219_aad_exit()
1051 destroy_workqueue(da7219_aad->aad_wq); in da7219_aad_exit()
1062 struct da7219_aad_priv *da7219_aad; in da7219_aad_probe() local
1064 da7219_aad = devm_kzalloc(dev, sizeof(*da7219_aad), GFP_KERNEL); in da7219_aad_probe()
1065 if (!da7219_aad) in da7219_aad_probe()
1068 da7219->aad = da7219_aad; in da7219_aad_probe()