]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00142436-1 MX53 LOCO: Audio not work in 2.6.38 kernel
authorZeng Zhaoming <b32542@freescale.com>
Thu, 21 Apr 2011 00:01:53 +0000 (08:01 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:32:49 +0000 (08:32 +0200)
Audio init failed with:
failed to call snd_soc_jack_add_gpios
soc-audio soc-audio: asoc: failed to init HiFi: -16
asoc: failed to instantiate card sgtl5000-audio: -16

This is caused by hp_status() callback gpio setting introduced by:
9dbaab8db17c3ce6bbe368a2b708c41ea1db33f8

Fix it by provide gpio setting in platform data.

Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
arch/arm/mach-mx5/board-mx53_loco.c

index 356349fd6d4b92005fbb61dfcf371925ae99d504..82aec683c593303441b91159d3ebd453bc1cf214 100755 (executable)
 #include "devices.h"
 #include "usb.h"
 
-#define LOCO_DISP0_PWR                 IMX_GPIO_NR(3, 24)
-#define LOCO_DISP0_DET_INT             IMX_GPIO_NR(3, 31)
-#define LOCO_DISP0_RESET               IMX_GPIO_NR(5, 0)
 #define MX53_LOCO_POWER                        IMX_GPIO_NR(1, 8)
+#define LOCO_HEADPHONE_DET             IMX_GPIO_NR(2, 5)
 #define MX53_LOCO_UI1                  IMX_GPIO_NR(2, 14)
 #define MX53_LOCO_UI2                  IMX_GPIO_NR(2, 15)
-#define LOCO_FEC_PHY_RST               IMX_GPIO_NR(7, 6)
-#define LOCO_USBH1_VBUS                        IMX_GPIO_NR(7, 8)
-#define MX53_LOCO_SD1_CD               IMX_GPIO_NR(3, 13)
 #define MX53_LOCO_SD3_CD               IMX_GPIO_NR(3, 11)
 #define MX53_LOCO_SD3_WP               IMX_GPIO_NR(3, 12)
+#define MX53_LOCO_SD1_CD               IMX_GPIO_NR(3, 13)
+#define LOCO_DISP0_PWR                 IMX_GPIO_NR(3, 24)
+#define LOCO_DISP0_DET_INT             IMX_GPIO_NR(3, 31)
+#define LOCO_DISP0_RESET               IMX_GPIO_NR(5, 0)
+#define LOCO_FEC_PHY_RST               IMX_GPIO_NR(7, 6)
+#define LOCO_USBH1_VBUS                        IMX_GPIO_NR(7, 8)
 
 extern void __iomem *arm_plat_base;
 extern void __iomem *gpc_base;
@@ -610,6 +611,8 @@ static struct mxc_audio_platform_data loco_audio_data = {
        .src_port = 2,
        .ext_port = 5,
        .init = loco_sgtl5000_init,
+       .hp_gpio = LOCO_HEADPHONE_DET,
+       .hp_active_low = 1,
 };
 
 static struct platform_device loco_audio_device = {