kernel 3.10 headset : headset driver support
[firefly-linux-kernel-4.4.55.git] / drivers / headset_observe / rk_headset.h
1 #ifndef RK_HEADSET_H
2 #define RK_HEADSET_H
3
4 #define HEADSET_IN_HIGH 0x00000001
5 #define HEADSET_IN_LOW  0x00000000
6
7 #define HOOK_DOWN_HIGH 0x00000001
8 #define HOOK_DOWN_LOW  0x00000000
9
10 struct rk_headset_pdata{
11 //heaset about
12         unsigned int headset_gpio;
13         unsigned int headset_insert_type;//     Headphones into the state level
14 //hook about
15         int hook_adc_chn; //adc channel
16         unsigned int hook_gpio;
17         unsigned int hook_down_type; //Hook key down status  
18 #ifdef CONFIG_MODEM_MIC_SWITCH
19 //mic about     
20         unsigned int mic_switch_gpio;
21         unsigned int hp_mic_io_value;
22         unsigned int main_mic_io_value;
23 #endif
24 };
25
26 #define HOOK_KEY_CODE KEY_MEDIA
27
28 extern int rk_headset_probe(struct platform_device *pdev,struct rk_headset_pdata *pdata);
29 extern int rk_headset_adc_probe(struct platform_device *pdev,struct rk_headset_pdata *pdata);
30 extern int rk_headset_adc_suspend(struct platform_device *pdev, pm_message_t state);
31 extern int rk_headset_adc_resume(struct platform_device *pdev);
32 #endif