headset: mod for 3.10 adc detect
[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         unsigned int hook_gpio;
16         unsigned int hook_down_type; //Hook key down status  
17 #ifdef CONFIG_MODEM_MIC_SWITCH
18 //mic about     
19         unsigned int mic_switch_gpio;
20         unsigned int hp_mic_io_value;
21         unsigned int main_mic_io_value; 
22 #endif
23         struct iio_channel *chan;
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