]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00137340-2 MX53_SMD: add headphone detection support.
authorZhang Jiejing <jiejing.zhang@freescale.com>
Fri, 15 Apr 2011 02:02:33 +0000 (10:02 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:32:48 +0000 (08:32 +0200)
add headphone gpio in imx sound card platform data.
delete old method of headphone detection codec.

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
arch/arm/mach-mx5/board-mx53_smd.c

index 281320b48e367320aee209da7ee2dd4cddf8d0ec..4780d4898db340e95a6a5cee003485e8bd49ab9c 100755 (executable)
@@ -580,10 +580,6 @@ static int smd_sgtl5000_init(void)
 {
        smd_audio_data.sysclk = 22579200;
 
-       /* headphone_det_b */
-       gpio_request(MX53_SMD_HEADPHONE_DEC, "headphone-dec");
-       gpio_direction_input(MX53_SMD_HEADPHONE_DEC);
-
        /* Enable OSC_CKIH1_EN for audio */
        gpio_request(MX53_SMD_OSC_CKIH1_EN, "osc-en");
        gpio_direction_output(MX53_SMD_OSC_CKIH1_EN, 1);
@@ -595,6 +591,8 @@ static struct mxc_audio_platform_data smd_audio_data = {
        .src_port = 2,
        .ext_port = 5,
        .init = smd_sgtl5000_init,
+       .hp_gpio = MX53_SMD_HEADPHONE_DEC,
+       .hp_active_low = 1,
 };
 
 static struct platform_device smd_audio_device = {