From fed357301747905a8879eef0e27c7e3bd6b2cb5a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=82=B1=E5=BB=BA=E6=96=8C?= Date: Mon, 11 Apr 2011 14:08:07 +0800 Subject: [PATCH] rk29:wm8994 board fix --- arch/arm/mach-rk29/board-rk29-a22.c | 2 ++ arch/arm/mach-rk29/board-rk29-phonesdk.c | 2 ++ drivers/headset_observe/rk2818_headset.c | 26 ++++++++++++------------ 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-rk29/board-rk29-a22.c b/arch/arm/mach-rk29/board-rk29-a22.c index c5f1005af32f..0f11599ef2d5 100755 --- a/arch/arm/mach-rk29/board-rk29-a22.c +++ b/arch/arm/mach-rk29/board-rk29-a22.c @@ -1382,6 +1382,8 @@ struct wm8994_pdata wm8994_platdata = { .jd_scthr = 0, .jd_thr = 0, + + .a22_ldo_enable =1, }; //#endif diff --git a/arch/arm/mach-rk29/board-rk29-phonesdk.c b/arch/arm/mach-rk29/board-rk29-phonesdk.c index ac294b062ff9..3d7e57504b04 100755 --- a/arch/arm/mach-rk29/board-rk29-phonesdk.c +++ b/arch/arm/mach-rk29/board-rk29-phonesdk.c @@ -1380,6 +1380,8 @@ struct wm8994_pdata wm8994_platdata = { .jd_scthr = 0, .jd_thr = 0, + + .a22_ldo_enable =0, }; //#endif diff --git a/drivers/headset_observe/rk2818_headset.c b/drivers/headset_observe/rk2818_headset.c index 7e6027526afc..8d425fe94cee 100755 --- a/drivers/headset_observe/rk2818_headset.c +++ b/drivers/headset_observe/rk2818_headset.c @@ -1,4 +1,4 @@ -/* arch/arm/mach-rockchip/rk28_headset.c +/* arch/arm/mach-rockchip/rk28_headset.c * * Copyright (C) 2009 Rockchip Corporation. * @@ -74,7 +74,7 @@ EXPORT_SYMBOL_GPL(headset_status); static irqreturn_t headset_interrupt(int irq, void *dev_id) { - DBG("---headset_interrupt---\n"); +// DBG("---headset_interrupt---\n"); schedule_delayed_work(&g_headsetobserve_work, msecs_to_jiffies(20)); return IRQ_HANDLED; } @@ -82,7 +82,7 @@ static irqreturn_t headset_interrupt(int irq, void *dev_id) static int headset_change_irqtype(unsigned int irq_type) { int ret = 0; - DBG("--------%s----------\n",__FUNCTION__); +// DBG("--------%s----------\n",__FUNCTION__); free_irq(prk2818_headset_info->irq,NULL); ret = request_irq(prk2818_headset_info->irq, headset_interrupt, irq_type, NULL, NULL); @@ -98,7 +98,7 @@ static void headsetobserve_work(struct work_struct *work) { int i,level = 0; - DBG("---headsetobserve_work---\n"); +// DBG("---headsetobserve_work---\n"); mutex_lock(&Headset_dev.mutex_lock); for(i=0; i<3; i++) @@ -123,30 +123,30 @@ static void headsetobserve_work(struct work_struct *work) { case HEADSET_IN_HIGH: if(level > 0) - {//插入--高电平 + {//²åÈë--¸ßµçƽ DBG("--- HEADSET_IN_HIGH headset in---\n"); Headset_dev.cur_headset_status = BIT_HEADSET; - headset_change_irqtype(IRQF_TRIGGER_FALLING);//设置为下降沿 + headset_change_irqtype(IRQF_TRIGGER_FALLING);//ÉèÖÃΪϽµÑØ } else if(level == 0) - {//拔出--低电平 + {//°Î³ö--µÍµçƽ DBG("---HEADSET_IN_HIGH headset out---\n"); Headset_dev.cur_headset_status = ~(BIT_HEADSET|BIT_HEADSET_NO_MIC); - headset_change_irqtype(IRQF_TRIGGER_RISING);//设置为上升沿 + headset_change_irqtype(IRQF_TRIGGER_RISING);//ÉèÖÃΪÉÏÉýÑØ } break; case HEADSET_IN_LOW: if(level == 0) - {//插入--低电平 + {//²åÈë--µÍµçƽ DBG("---HEADSET_IN_LOW headset in---\n"); Headset_dev.cur_headset_status = BIT_HEADSET; - headset_change_irqtype(IRQF_TRIGGER_RISING);//设置为上升沿 + headset_change_irqtype(IRQF_TRIGGER_RISING);//ÉèÖÃΪÉÏÉýÑØ } else if(level > 0) - {//拔出--高电平 + {//°Î³ö--¸ßµçƽ DBG("---HEADSET_IN_LOW headset out---\n"); Headset_dev.cur_headset_status = ~(BIT_HEADSET|BIT_HEADSET_NO_MIC); - headset_change_irqtype(IRQF_TRIGGER_FALLING);//设置为下降沿 + headset_change_irqtype(IRQF_TRIGGER_FALLING);//ÉèÖÃΪϽµÑØ } break; default: @@ -206,7 +206,7 @@ static int rockchip_headsetobserve_probe(struct platform_device *pdev) DBG("headsetobserve: request gpio_request failed\n"); return ret; } - gpio_pull_updown(prk2818_headset_info->gpio, GPIONormal);//不上拉也不下拉 + gpio_pull_updown(prk2818_headset_info->gpio, GPIONormal);//²»ÉÏÀ­Ò²²»ÏÂÀ­ gpio_direction_input(prk2818_headset_info->gpio); prk2818_headset_info->irq = gpio_to_irq(prk2818_headset_info->gpio); -- 2.34.1