commit | author | age
|
a07526
|
1 |
/* SPDX-License-Identifier: GPL-2.0 */ |
H |
2 |
#ifndef RK_HEADSET_H |
|
3 |
#define RK_HEADSET_H |
|
4 |
|
|
5 |
#define HEADSET_IN_HIGH 0x00000001 |
|
6 |
#define HEADSET_IN_LOW 0x00000000 |
|
7 |
|
|
8 |
#define HOOK_DOWN_HIGH 0x00000001 |
|
9 |
#define HOOK_DOWN_LOW 0x00000000 |
|
10 |
|
|
11 |
struct rk_headset_pdata { |
|
12 |
/* heaset about */ |
|
13 |
unsigned int headset_gpio; |
619f0f
|
14 |
unsigned int spk_ctl_gpio; |
a07526
|
15 |
/* Headphones into the state level */ |
H |
16 |
unsigned int headset_insert_type; |
|
17 |
/* hook about */ |
|
18 |
unsigned int hook_gpio; |
|
19 |
/* Hook key down status */ |
|
20 |
unsigned int hook_down_type; |
|
21 |
#ifdef CONFIG_MODEM_MIC_SWITCH |
|
22 |
/* mic about */ |
|
23 |
unsigned int mic_switch_gpio; |
|
24 |
unsigned int hp_mic_io_value; |
|
25 |
unsigned int main_mic_io_value; |
|
26 |
#endif |
|
27 |
struct iio_channel *chan; |
|
28 |
int headset_wakeup; |
|
29 |
}; |
|
30 |
|
|
31 |
#define HOOK_KEY_CODE KEY_MEDIA |
|
32 |
|
|
33 |
int rk_headset_probe(struct platform_device *pdev, |
|
34 |
struct rk_headset_pdata *pdata); |
|
35 |
int rk_headset_adc_probe(struct platform_device *pdev, |
|
36 |
struct rk_headset_pdata *pdata); |
|
37 |
int rk_headset_adc_suspend(struct platform_device *pdev, pm_message_t state); |
|
38 |
int rk_headset_adc_resume(struct platform_device *pdev); |
|
39 |
#endif |