diff options
author | codeworkx <codeworkx@cyanogenmod.com> | 2012-09-22 09:48:20 +0200 |
---|---|---|
committer | codeworkx <codeworkx@cyanogenmod.com> | 2012-09-22 14:02:16 +0200 |
commit | 2489007e7d740ccbc3e0a202914e243ad5178787 (patch) | |
tree | b8e6380ea7b1da63474ad68a5dba997e01146043 /arch/arm/mach-exynos/p4note-jack.c | |
parent | 5f67568eb31e3a813c7c52461dcf66ade15fc2e7 (diff) | |
download | kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.zip kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.tar.gz kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.tar.bz2 |
merge opensource jb u5
Change-Id: I1aaec157aa196f3448eff8636134fce89a814cf2
Diffstat (limited to 'arch/arm/mach-exynos/p4note-jack.c')
-rw-r--r-- | arch/arm/mach-exynos/p4note-jack.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/p4note-jack.c b/arch/arm/mach-exynos/p4note-jack.c index 2a4d0df..7c85b27 100644 --- a/arch/arm/mach-exynos/p4note-jack.c +++ b/arch/arm/mach-exynos/p4note-jack.c @@ -24,6 +24,55 @@ static void sec_set_jack_micbias(bool on) gpio_set_value(GPIO_EAR_MIC_BIAS_EN, on); } +#ifdef CONFIG_TARGET_LOCALE_KOR +static struct sec_jack_zone sec_jack_zones[] = { + { + /* adc == 0, unstable zone, default to 3pole if it stays + * in this range for 300ms (15ms delays, 20 samples) + */ + .adc_high = 0, + .delay_ms = 10, + .check_count = 10, + .jack_type = SEC_HEADSET_3POLE, + }, + { + /* 0 < adc <= 1200, unstable zone, default to 3pole if it stays + * in this range for 300ms (15ms delays, 20 samples) + */ + .adc_high = 1200, + .delay_ms = 10, + .check_count = 10, + .jack_type = SEC_HEADSET_3POLE, + }, + { + /* 1200 < adc <= 2600, unstable zone, default to 4pole if it + * stays in this range for 100ms (10ms delays, 80 samples) + */ + .adc_high = 2600, + .delay_ms = 10, + .check_count = 10, + .jack_type = SEC_HEADSET_4POLE, + }, + { + /* 2600 < adc <= 3800, 4 pole zone, default to 4pole if it + * stays in this range for 100ms (10ms delays, 10 samples) + */ + .adc_high = 3800, + .delay_ms = 10, + .check_count = 5, + .jack_type = SEC_HEADSET_4POLE, + }, + { + /* adc > 3800, unstable zone, default to 3pole if it stays + * in this range for two seconds (10ms delays, 200 samples) + */ + .adc_high = 0x7fffffff, + .delay_ms = 10, + .check_count = 200, + .jack_type = SEC_HEADSET_3POLE, + }, +}; +#else static struct sec_jack_zone sec_jack_zones[] = { { /* adc == 0, unstable zone, default to 3pole if it stays @@ -71,6 +120,7 @@ static struct sec_jack_zone sec_jack_zones[] = { .jack_type = SEC_HEADSET_3POLE, }, }; +#endif /* To support 3-buttons earjack */ static struct sec_jack_buttons_zone sec_jack_buttons_zones[] = { |