static void hs_gpio_register(void) { struct headset_notifier notifier; if (hi->pdata.uart_gpio) { notifier.id = HEADSET_REG_UART_SET; notifier.func = hs_gpio_uart_set; headset_notifier_register(¬ifier); } if (hi->pdata.hpin_gpio) { notifier.id = HEADSET_REG_HPIN_GPIO; notifier.func = hs_gpio_hpin_state; headset_notifier_register(¬ifier); } if (hi->pdata.mic_select_gpio) { notifier.id = HEADSET_REG_MIC_SELECT; notifier.func = hs_gpio_mic_select; headset_notifier_register(¬ifier); } if (hi->pdata.key_enable_gpio) { notifier.id = HEADSET_REG_KEY_ENABLE; notifier.func = hs_gpio_key_enable; headset_notifier_register(¬ifier); } }
static void hs_1wire_register(void) { struct headset_notifier notifier; notifier.id = HEADSET_REG_1WIRE_INIT; notifier.func = hs_1wire_init; headset_notifier_register(¬ifier); notifier.id = HEADSET_REG_1WIRE_QUERY; notifier.func = hs_1wire_query; headset_notifier_register(¬ifier); notifier.id = HEADSET_REG_1WIRE_READ_KEY; notifier.func = hs_1wire_read_key; headset_notifier_register(¬ifier); notifier.id = HEADSET_REG_1WIRE_DEINIT; notifier.func = hs_1wire_deinit; headset_notifier_register(¬ifier); notifier.id = HEADSET_REG_1WIRE_REPORT_TYPE; notifier.func = hs_1wire_report_type; headset_notifier_register(¬ifier); }
static void hs_pmic_register(void) { struct headset_notifier notifier; if (pmic_info->pdata.hpin_gpio) { notifier.id = HEADSET_REG_HPIN_GPIO; notifier.func = hs_pmic_hpin_state; headset_notifier_register(¬ifier); } if (pmic_info->pdata.driver_flag & DRIVER_HS_PMIC_RPC_KEY) { notifier.id = HEADSET_REG_REMOTE_ADC; notifier.func = hs_pmic_remote_adc; headset_notifier_register(¬ifier); notifier.id = HEADSET_REG_RPC_KEY; notifier.func = hs_pmic_rpc_key; headset_notifier_register(¬ifier); notifier.id = HEADSET_REG_MIC_STATUS; notifier.func = hs_pmic_mic_status; headset_notifier_register(¬ifier); } if (pmic_info->pdata.key_enable_gpio) { notifier.id = HEADSET_REG_KEY_ENABLE; notifier.func = hs_pmic_key_enable; headset_notifier_register(¬ifier); } }
static void hs_gpio_register(void) { struct headset_notifier notifier; if (pjack_info->mic_select_gpio) { notifier.id = HEADSET_REG_MIC_SELECT; notifier.func = hs_gpio_mic_select; headset_notifier_register(¬ifier); } if (pjack_info->key_enable_gpio) { notifier.id = HEADSET_REG_KEY_ENABLE; notifier.func = hs_gpio_key_enable; headset_notifier_register(¬ifier); } if (pjack_info->mic_detect) { notifier.id = HEADSET_REG_MIC_STATUS; notifier.func = hs_gpio_get_mic; headset_notifier_register(¬ifier); notifier.id = HEADSET_REG_KEY_INT_ENABLE; notifier.func = hs_enable_key_irq; headset_notifier_register(¬ifier); } }
static void hs_mic_register(void) { struct headset_notifier notifier; notifier.id = HEADSET_REG_MIC_BIAS; notifier.func = htcleo_mic_enable; headset_notifier_register(¬ifier); }
static void hs_8x60_register(void) { struct headset_notifier notifier; notifier.id = HEADSET_REG_REMOTE_ADC; notifier.func = hs_8x60_remote_adc; headset_notifier_register(¬ifier); notifier.id = HEADSET_REG_REMOTE_KEYCODE; notifier.func = hs_8x60_adc_to_keycode; headset_notifier_register(¬ifier); notifier.id = HEADSET_REG_MIC_STATUS; notifier.func = hs_8x60_mic_status; headset_notifier_register(¬ifier); }
static void hs_misc_register(void) { struct headset_notifier notifier; if (hi->pdata.indicator_power_gpio) { notifier.id = HEADSET_REG_INDICATOR_ENABLE; notifier.func = headset_indicator_enable; headset_notifier_register(¬ifier); } }
static void rt5501_register_hs_notification(void) { #if 1 struct headset_notifier notifier; notifier.id = HEADSET_REG_HS_INSERT; notifier.func = rt5501_headset_detect; headset_notifier_register(¬ifier); #else rt5501_headset_detect(0); #endif }
static void hs_pmic_register(void) { struct headset_notifier notifier; if (hi->pdata.hpin_gpio) { notifier.id = HEADSET_REG_HPIN_GPIO; notifier.func = hs_pmic_hpin_state; headset_notifier_register(¬ifier); } if ((hi->pdata.driver_flag & DRIVER_HS_PMIC_RPC_KEY) || (hi->pdata.driver_flag & DRIVER_HS_PMIC_ADC)) { #ifdef HTC_HEADSET_CONFIG_MSM_RPC notifier.id = HEADSET_REG_REMOTE_ADC; notifier.func = hs_pmic_remote_adc; headset_notifier_register(¬ifier); #endif notifier.id = HEADSET_REG_REMOTE_KEYCODE; notifier.func = hs_pmic_adc_to_keycode; headset_notifier_register(¬ifier); notifier.id = HEADSET_REG_RPC_KEY; notifier.func = hs_pmic_rpc_key; headset_notifier_register(¬ifier); notifier.id = HEADSET_REG_MIC_STATUS; notifier.func = hs_pmic_mic_status; headset_notifier_register(¬ifier); } if (hi->pdata.key_enable_gpio) { notifier.id = HEADSET_REG_KEY_ENABLE; notifier.func = hs_pmic_key_enable; headset_notifier_register(¬ifier); } if (hi->pdata.key_gpio) { notifier.id = HEADSET_REG_KEY_INT_ENABLE; notifier.func = hs_pmic_key_int_enable; headset_notifier_register(¬ifier); } }