diff options
author | codeworkx <daniel.hillenbrand@codeworkx.de> | 2012-06-02 13:09:29 +0200 |
---|---|---|
committer | codeworkx <daniel.hillenbrand@codeworkx.de> | 2012-06-02 13:09:29 +0200 |
commit | c6da2cfeb05178a11c6d062a06f8078150ee492f (patch) | |
tree | f3b4021d252c52d6463a9b3c1bb7245e399b009c /include/linux/sec_jack.h | |
parent | c6d7c4dbff353eac7919342ae6b3299a378160a6 (diff) | |
download | kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.zip kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.tar.gz kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.tar.bz2 |
samsung update 1
Diffstat (limited to 'include/linux/sec_jack.h')
-rw-r--r-- | include/linux/sec_jack.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/include/linux/sec_jack.h b/include/linux/sec_jack.h new file mode 100644 index 0000000..5c12495 --- /dev/null +++ b/include/linux/sec_jack.h @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2008 Samsung Electronics, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __ASM_ARCH_SEC_HEADSET_H +#define __ASM_ARCH_SEC_HEADSET_H + +#ifdef __KERNEL__ + +enum { + SEC_JACK_NO_DEVICE = 0x0, + SEC_HEADSET_4POLE = 0x01 << 0, + SEC_HEADSET_3POLE = 0x01 << 1, + SEC_TTY_DEVICE = 0x01 << 2, + SEC_FM_HEADSET = 0x01 << 3, + SEC_FM_SPEAKER = 0x01 << 4, + SEC_TVOUT_DEVICE = 0x01 << 5, + SEC_EXTRA_DOCK_SPEAKER = 0x01 << 6, + SEC_EXTRA_CAR_DOCK_SPEAKER = 0x01 << 7, + SEC_UNKNOWN_DEVICE = 0x01 << 8, +}; + +struct sec_jack_zone { + unsigned int adc_high; + unsigned int delay_ms; + unsigned int check_count; + unsigned int jack_type; +}; + +struct sec_jack_buttons_zone { + unsigned int code; + unsigned int adc_low; + unsigned int adc_high; +}; + +struct sec_jack_platform_data { + struct s3c_adc_client *padc; + void (*set_micbias_state) (bool); + struct sec_jack_zone *zones; + struct sec_jack_buttons_zone *buttons_zones; + int num_zones; + int num_buttons_zones; + int det_gpio; + int send_end_gpio; + bool det_active_high; + bool send_end_active_high; +}; + +#if defined(CONFIG_STMPE811_ADC) +u16 stmpe811_get_adc_data(u8 channel); +#endif + +#endif + +#endif |