From patchwork Thu Mar 17 10:12:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?QXhlIFlhbmcgKOadqOejiik=?= X-Patchwork-Id: 12783849 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 43EEAC433F5 for ; Thu, 17 Mar 2022 10:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :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=zDi3qFwXe2/X8O4yRHY6AUdZxZNo4gfcbUL5Ivsb8/I=; b=0p1tby4FazKLL3 E0J6/7D1pzR2Lr8LyhqM95UsdTTTuGpuCDaA6xeLnFkY9KvDn5tqu/2wLf6EFWKpj13aV+4+hEByO DLpLDWwStD+VA1zIAM1Jp5BzN8DwMmsg5x6m8izYMPhhY2AOfldxJlvxqv1Tl15/NkBrUEQ7cGpDW yl5gSkJPfcqggmrYvEfZz1EHHuqdFFln/dNWkMqqaVhvWF+iZ5nxzw5ErchIJJN+gzy7IXzv/GsJ5 c9HPzAt5hRvJFrPlokaxf2R12qud5KHKrr/8qsqusE6Ao0cKCh6VRE3ePUhEUncqk7aO6UrirtKCa Sfth9XLT96dCUMNL0/8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUn7O-00Fehm-Mw; Thu, 17 Mar 2022 10:12:30 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUn7L-00Feg6-Kt; Thu, 17 Mar 2022 10:12:28 +0000 X-UUID: 05b57920c2084c8ea6301e234fea2737-20220317 X-UUID: 05b57920c2084c8ea6301e234fea2737-20220317 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1674470256; Thu, 17 Mar 2022 03:12:22 -0700 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 17 Mar 2022 03:12:20 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 17 Mar 2022 18:12:19 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 17 Mar 2022 18:12:17 +0800 From: Axe Yang To: Ulf Hansson , Rob Herring , Chaotian Jing , Matthias Brugger , Adrian Hunter CC: Yoshihiro Shimoda , Satya Tangirala , Andy Shevchenko , Wolfram Sang , Axe Yang , Lucas Stach , Eric Biggers , Andrew Jeffery , Stephen Boyd , Kiwoong Kim , Yue Hu , Tian Tao , , , , , , Subject: [RESEND v7 0/3] mmc: mediatek: add support for SDIO async IRQ Date: Thu, 17 Mar 2022 18:12:12 +0800 Message-ID: <20220317101215.24985-1-axe.yang@mediatek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220317_031227_700328_5197B39D X-CRM114-Status: UNSURE ( 9.81 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Change in v7: - add device_init_wakeup() to register SDIO host as wakeup source Change in v6: - abandon cap-sdio-async-irq flag, use wakeup-source flag instead - extend interrupts and pinctrls in mediatek mmc host controller DT documents - add mmc_card_enable_async_irq() to access enable_async_irq flag - simplify wakeup irq implementation with dedicate wake up irq related interface Change in v5: - resort variables to reversed xmas tree order - restore old copyright year range and add current year back Change in v4: - add MMC_CAP2_SDIO_ASYNC_IRQ judge before lookup eint pinctrl - replace spin_lock_irqsave() variant with spin_lock() in eint irq handler Changes in v3: - correct abbreviations with capital letters in commit message - replace copyright year with 2022 in mtk-sd.c - remove unnessary pointer casting - adjust variable order to reversed xmas tree - remove a redundant blank line - refine if statement, following standard pattern Change in v2: - change flag name from 'cap-sdio-async-int' to 'cap-sdio-async-irq' - change corresponding macro names from xxx_INT to xxx_IRQ - resort new member in msdc_host structure - refine function msdc_request_dat1_eint_irq() - rename msdc_{suspend,resume} function names, add suffix '_noirq' - add MMC_CAP2_NO_SDIO judgement before parse eint related pin setting Axe Yang (3): dt-bindings: mmc: mtk-sd: extend interrupts and pinctrls properties mmc: core: Add support for SDIO wakeup interrupt mmc: mediatek: add support for SDIO eint wakup IRQ .../devicetree/bindings/mmc/mtk-sd.yaml | 24 ++++- drivers/mmc/core/sdio.c | 17 +++ drivers/mmc/host/mtk-sd.c | 100 ++++++++++++++++-- include/linux/mmc/card.h | 8 +- include/linux/mmc/sdio.h | 5 + 5 files changed, 144 insertions(+), 10 deletions(-)