Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933424AbdGKOoC (ORCPT ); Tue, 11 Jul 2017 10:44:02 -0400 Received: from mail-qk0-f176.google.com ([209.85.220.176]:36622 "EHLO mail-qk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932834AbdGKOn4 (ORCPT ); Tue, 11 Jul 2017 10:43:56 -0400 MIME-Version: 1.0 In-Reply-To: <1499063096-10604-1-git-send-email-chaotian.jing@mediatek.com> References: <1499063096-10604-1-git-send-email-chaotian.jing@mediatek.com> From: Ulf Hansson Date: Tue, 11 Jul 2017 16:43:54 +0200 Message-ID: Subject: Re: [PATCH] mmc: mediatek: add ops->get_cd() support To: Chaotian Jing Cc: Matthias Brugger , yong mao , Linus Walleij , Heiner Kallweit , Javier Martinez Canillas , "linux-mmc@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , linux-mediatek@lists.infradead.org, "linux-kernel@vger.kernel.org" , srv_heupstream Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1155 Lines: 34 On 3 July 2017 at 08:24, Chaotian Jing wrote: > if user plug out sd card slowly, finally card is plugged out but > cat /proc/partitions can find that card is still exist in kernel. > that's because alougth get card detect interrupt but CMD13 still > can get correct response(all other pins are connected expect card > detect pin). > add ops->get_cd() can avoid this issue. > > Signed-off-by: Chaotian Jing Thanks, applied for next! Kind regards Uffe > --- > drivers/mmc/host/mtk-sd.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c > index 5c1e178..975c765 100644 > --- a/drivers/mmc/host/mtk-sd.c > +++ b/drivers/mmc/host/mtk-sd.c > @@ -1585,6 +1585,7 @@ static void msdc_hw_reset(struct mmc_host *mmc) > .request = msdc_ops_request, > .set_ios = msdc_ops_set_ios, > .get_ro = mmc_gpio_get_ro, > + .get_cd = mmc_gpio_get_cd, > .start_signal_voltage_switch = msdc_ops_switch_volt, > .card_busy = msdc_card_busy, > .execute_tuning = msdc_execute_tuning, > -- > 1.8.1.1.dirty >