From 1eb0d0aec8d96508fb83433870db12e5fb071572 Mon Sep 17 00:00:00 2001 From: zwp Date: Sat, 20 Aug 2011 01:46:22 -0700 Subject: [PATCH] phone-pad:add headset support to board. --- arch/arm/mach-rk29/board-rk29phonepadsdk.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm/mach-rk29/board-rk29phonepadsdk.c b/arch/arm/mach-rk29/board-rk29phonepadsdk.c index 22d69dd3ee73..d684d3cba9e8 100755 --- a/arch/arm/mach-rk29/board-rk29phonepadsdk.c +++ b/arch/arm/mach-rk29/board-rk29phonepadsdk.c @@ -837,6 +837,25 @@ struct wm8994_pdata wm8994_platdata = { .recorder_vol = 50, }; + +#ifdef CONFIG_RK_HEADSET_DET + +struct rk_headset_pdata rk_headset_info = { + .Headset_gpio = RK29_PIN4_PD2, + .headset_in_type= HEADSET_IN_HIGH, + .Hook_gpio = RK29_PIN4_PD1,//Detection Headset--Must be set + .hook_key_code = KEY_MEDIA, +}; + +struct platform_device rk_device_headset = { + .name = "rk_headsetdet", + .id = 0, + .dev = { + .platform_data = &rk_headset_info, + } +}; +#endif + #if defined (CONFIG_BATTERY_BQ27541) #define DC_CHECK_PIN RK29_PIN4_PA1 #define LI_LION_BAT_NUM 2 @@ -1897,6 +1916,10 @@ static struct platform_device *devices[] __initdata = { #ifdef CONFIG_VIDEO_RK29XX_VOUT &rk29_v4l2_output_devce, #endif +#ifdef CONFIG_RK_HEADSET_DET + &rk_device_headset, +#endif + }; /***************************************************************************************** -- 2.34.1