Lines Matching refs:data
77 if (priv->data->eint_detect_mode == 0x3 || in adjust_eint_analog_setting()
78 priv->data->eint_detect_mode == 0x4) { in adjust_eint_analog_setting()
83 if (priv->data->eint_detect_mode == 0x4) { in adjust_eint_analog_setting()
97 if (priv->data->eint_use_ext_res == 0x3 || in adjust_eint_analog_setting()
98 priv->data->eint_use_ext_res == 0x4) { in adjust_eint_analog_setting()
123 if (priv->data->eint_detect_mode == 0x4) { in adjust_eint_digital_setting()
149 priv->data->pwm_deb->eint_debounce0); in mt6359_accdet_jd_setting()
159 if (priv->data->eint_detect_mode == 0x3 || in recover_eint_analog_setting()
160 priv->data->eint_detect_mode == 0x4) { in recover_eint_analog_setting()
165 if (priv->data->eint_detect_mode == 0x4) { in recover_eint_analog_setting()
193 if (priv->data->eint_detect_mode == 0x4) { in recover_eint_digital_setting()
210 if (priv->data->eint_detect_mode != 0x1) { in recover_eint_digital_setting()
260 priv->data->pwm_deb->debounce0); in mt6359_accdet_recover_jd_setting()
262 priv->data->pwm_deb->debounce1); in mt6359_accdet_recover_jd_setting()
264 priv->data->pwm_deb->debounce3); in mt6359_accdet_recover_jd_setting()
337 if (v < priv->data->four_key.down && in check_button()
338 v >= priv->data->four_key.up) in check_button()
340 if (v < priv->data->four_key.up && in check_button()
341 v >= priv->data->four_key.voice) in check_button()
343 if (v < priv->data->four_key.voice && in check_button()
344 v >= priv->data->four_key.mid) in check_button()
346 if (v < priv->data->four_key.mid) in check_button()
349 if (v < priv->data->three_key.down && in check_button()
350 v >= priv->data->three_key.up) in check_button()
352 if (v < priv->data->three_key.up && in check_button()
353 v >= priv->data->three_key.mid) in check_button()
355 if (v < priv->data->three_key.mid) in check_button()
449 priv->data->pwm_deb->debounce3); in mt6359_accdet_jd_work()
460 static irqreturn_t mt6359_accdet_irq(int irq, void *data) in mt6359_accdet_irq() argument
462 struct mt6359_accdet *priv = data; in mt6359_accdet_irq()
565 &priv->data->mic_vol); in mt6359_accdet_parse_dt()
567 priv->data->mic_vol = 8; in mt6359_accdet_parse_dt()
570 &priv->data->plugout_deb); in mt6359_accdet_parse_dt()
572 priv->data->plugout_deb = 1; in mt6359_accdet_parse_dt()
575 &priv->data->mic_mode); in mt6359_accdet_parse_dt()
577 priv->data->mic_mode = 2; in mt6359_accdet_parse_dt()
583 memcpy(priv->data->pwm_deb, pwm_deb, sizeof(pwm_deb)); in mt6359_accdet_parse_dt()
586 &priv->data->eint_pol); in mt6359_accdet_parse_dt()
588 priv->data->eint_pol = 8; in mt6359_accdet_parse_dt()
599 &priv->data->eint_detect_mode); in mt6359_accdet_parse_dt()
602 priv->data->eint_detect_mode = 0x4; in mt6359_accdet_parse_dt()
625 &priv->data->eint_use_ext_res); in mt6359_accdet_parse_dt()
628 priv->data->eint_use_ext_res = 0x0; in mt6359_accdet_parse_dt()
632 &priv->data->eint_comp_vth); in mt6359_accdet_parse_dt()
634 priv->data->eint_comp_vth = 0x0; in mt6359_accdet_parse_dt()
648 memcpy(&priv->data->three_key, three_key + 1, in mt6359_accdet_parse_dt()
659 memcpy(&priv->data->four_key, four_key + 1, in mt6359_accdet_parse_dt()
674 memcpy(&priv->data->three_key, three_key + 1, in mt6359_accdet_parse_dt()
688 (priv->data->pwm_deb->eint_pwm_width << 4 | in config_digital_init_by_mode()
689 priv->data->pwm_deb->eint_pwm_thresh)); in config_digital_init_by_mode()
714 if (priv->data->eint_detect_mode == 0x1) { in config_digital_init_by_mode()
760 if (priv->data->eint_detect_mode == 0x1 || in config_eint_init_by_mode()
761 priv->data->eint_detect_mode == 0x2 || in config_eint_init_by_mode()
762 priv->data->eint_detect_mode == 0x3) { in config_eint_init_by_mode()
763 if (priv->data->eint_use_ext_res == 0x1) { in config_eint_init_by_mode()
790 if (priv->data->eint_detect_mode != 0x1) { in config_eint_init_by_mode()
797 val | priv->data->eint_comp_vth << RG_EINTCOMPVTH_SFT); in config_eint_init_by_mode()
812 priv->data->pwm_deb->debounce0); in mt6359_accdet_init()
814 priv->data->pwm_deb->debounce1); in mt6359_accdet_init()
816 priv->data->pwm_deb->debounce3); in mt6359_accdet_init()
818 priv->data->pwm_deb->debounce4); in mt6359_accdet_init()
821 priv->data->pwm_deb->eint_debounce0); in mt6359_accdet_init()
823 priv->data->pwm_deb->eint_debounce1); in mt6359_accdet_init()
825 priv->data->pwm_deb->eint_debounce3); in mt6359_accdet_init()
827 priv->data->pwm_deb->eint_inverter_debounce); in mt6359_accdet_init()
842 REGISTER_VAL(priv->data->pwm_deb->pwm_width)); in mt6359_accdet_init()
844 REGISTER_VAL(priv->data->pwm_deb->pwm_thresh)); in mt6359_accdet_init()
846 (priv->data->pwm_deb->fall_delay << 15 | in mt6359_accdet_init()
847 priv->data->pwm_deb->rise_delay)); in mt6359_accdet_init()
850 if (priv->data->mic_vol <= 7) { in mt6359_accdet_init()
853 reg | (priv->data->mic_vol << RG_AUDMICBIAS1VREF_SFT) | in mt6359_accdet_init()
855 } else if (priv->data->mic_vol == 8) { in mt6359_accdet_init()
860 } else if (priv->data->mic_vol == 9) { in mt6359_accdet_init()
868 if (priv->data->mic_mode == HEADSET_MODE_1) { in mt6359_accdet_init()
878 } else if (priv->data->mic_mode == HEADSET_MODE_2) { in mt6359_accdet_init()
886 } else if (priv->data->mic_mode == HEADSET_MODE_6) { in mt6359_accdet_init()
940 priv->data = devm_kzalloc(&pdev->dev, sizeof(struct dts_data), in mt6359_accdet_probe()
942 if (!priv->data) in mt6359_accdet_probe()
945 priv->data->pwm_deb = devm_kzalloc(&pdev->dev, in mt6359_accdet_probe()
948 if (!priv->data->pwm_deb) in mt6359_accdet_probe()