4 #define HEADSET_IN_HIGH 0x00000001
5 #define HEADSET_IN_LOW 0x00000000
7 #define HOOK_DOWN_HIGH 0x00000001
8 #define HOOK_DOWN_LOW 0x00000000
10 struct rk_headset_pdata{
12 unsigned int headset_gpio;
13 unsigned int headset_insert_type;// Headphones into the state level
15 unsigned int hook_gpio;
16 unsigned int hook_down_type; //Hook key down status
17 #ifdef CONFIG_MODEM_MIC_SWITCH
19 unsigned int mic_switch_gpio;
20 unsigned int hp_mic_io_value;
21 unsigned int main_mic_io_value;
23 struct iio_channel *chan;
27 #define HOOK_KEY_CODE KEY_MEDIA
29 extern int rk_headset_probe(struct platform_device *pdev,struct rk_headset_pdata *pdata);
30 extern int rk_headset_adc_probe(struct platform_device *pdev,struct rk_headset_pdata *pdata);
31 extern int rk_headset_adc_suspend(struct platform_device *pdev, pm_message_t state);
32 extern int rk_headset_adc_resume(struct platform_device *pdev);