From patchwork Mon Jul 3 06:24:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaotian Jing X-Patchwork-Id: 9821991 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 80FCB60246 for ; Mon, 3 Jul 2017 06:25:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75CFE28504 for ; Mon, 3 Jul 2017 06:25:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 69D5D2851A; Mon, 3 Jul 2017 06:25:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 268A828504 for ; Mon, 3 Jul 2017 06:25:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=/mchE/y6slPNRsysBoyf5WtuvtQ6CtrKRtacwsHg3b8=; b=dAaY9y3qqImpR8 6o88JPffuWafhe8JyUdRZpK2gRVRkcb1AfE3Tm2Pbv9OvkR+u1E7l54FYv8KSRh3+LQ1JcGtOBImg VGxP+kg3cCjjELcIsN3Rxor6EwKmGaxS/aSGa6xuGXEkg9vvmsgrEsTixgxsEU7B+HvPVJHByeSAc aWLVF+FEGRCp8KFFA/lAekEinbsr0AMglw3mMDsl1usulKUtvsIEhL+UjoTO47nOURx1Chxr8N3C3 Yykx1yJ3mDSHhcSuXV3hJalQhAQbdiC7vkr5jtOIqRhtt30xggW0dXotSmGh77CL5uZf1f/JRn+eU 5RzPdpukIlMeNLmyK3ig==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dRunh-0004HL-J0; Mon, 03 Jul 2017 06:25:37 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dRunW-0002zj-Eh; Mon, 03 Jul 2017 06:25:35 +0000 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1325970537; Mon, 03 Jul 2017 14:25:01 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs03n2.mediatek.inc (172.21.101.182) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 3 Jul 2017 14:25:00 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Mon, 3 Jul 2017 14:24:59 +0800 From: Chaotian Jing To: Ulf Hansson Subject: [PATCH] mmc: mediatek: add ops->get_cd() support Date: Mon, 3 Jul 2017 14:24:56 +0800 Message-ID: <1499063096-10604-1-git-send-email-chaotian.jing@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170702_232526_692296_C7B9FD51 X-CRM114-Status: GOOD ( 11.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: srv_heupstream@mediatek.com, Linus Walleij , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, yong mao , Javier Martinez Canillas , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger , Chaotian Jing , Heiner Kallweit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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,