Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1239122pxb; Fri, 21 Jan 2022 13:06:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxlsgcSGRSYtUbYd2syQj/KdXLBh1wqPTnBPFRT050BTzXi6DY96ydkPxEz1pnfvEW6iFrl X-Received: by 2002:a17:902:c407:b0:14a:7d39:73ca with SMTP id k7-20020a170902c40700b0014a7d3973camr5491094plk.97.1642799166738; Fri, 21 Jan 2022 13:06:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642799166; cv=none; d=google.com; s=arc-20160816; b=SYjhSMdwKJlZnt+ZQM9NfjNMiXl9CHT3Wqo6WaDCm0lB77X4NtwkDv9tECIf7Zsd9u r9dnbGy9u8teDC6NEXaubGES/J87yoL8rbbFNxRK3pZyBAB8wOcX/0aAUFP/Q/GGYIcT zRE3i1PhnbNYegAHG0t554I7ITJTYKzZURvXYeEgUScTPn8bXM52DNMaVmvRjcM2RzgB tJJFcvryzTy9oDopFccUmSmbpmbW+ZoYQulGpt1UxyEycdYJlhmWJnAp1Pg8B9/QxOr5 IdiBONLKgrcx2y2QX7GGvOdZxCoHq0h9xYBB8s8xZeDVu3tI+9RoT2EXA4kXgOqc5XPQ OQJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=3BJyXwlsDmwhE7xycQ+5GjpV4KSpOR6rasWLQdUOIto=; b=pg9WQ4ABrnh4paUC/yiUoojU35AwUcMbP+sc2j30/tfIvGbgVA9c3jgYkT/NATuu7N vqNKZFjfjN2ihod2FBuIPHHfZABPTAxTZXuHjAg7zcDWIA3QWpFVkgjbAh5SDjFjM4oM fVtlOgYqkD2MltxM5t/KlORVKlA0wOO9+L2Ceiid5bzZ9Cag4TW5FJJOB9T21MMvqRG+ m6DRgsEZpKIIFqjRiyxAmcRA/ijlAShPUK1Cl3fIxex0uk3U2d/0AuFkWckgM+6eCmcD yWLZciE7rMbr74otH7n6SNkTGUXLwV4AHKOuRgqf6cC2OuaReCyESkB9Atd2kPPiVEhv T7Kg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr17si15265560pjb.102.2022.01.21.13.05.54; Fri, 21 Jan 2022 13:06:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358597AbiATFeP (ORCPT + 99 others); Thu, 20 Jan 2022 00:34:15 -0500 Received: from mailgw01.mediatek.com ([60.244.123.138]:60516 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229989AbiATFeO (ORCPT ); Thu, 20 Jan 2022 00:34:14 -0500 X-UUID: 79d0c64fb85748de93dbc62341103159-20220120 X-UUID: 79d0c64fb85748de93dbc62341103159-20220120 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1240064530; Thu, 20 Jan 2022 13:34:11 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 20 Jan 2022 13:34:09 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 20 Jan 2022 13:34:08 +0800 Message-ID: <0b6ef0ce05bb92cd458043be2441101e20166242.camel@mediatek.com> Subject: Re: [PATCH v4 3/3] mmc: mediatek: add support for SDIO eint IRQ From: Axe Yang To: Andy Shevchenko CC: Ulf Hansson , Rob Herring , Chaotian Jing , Matthias Brugger , Adrian Hunter , Yoshihiro Shimoda , Satya Tangirala , Wolfram Sang , "Lucas Stach" , Eric Biggers , Andrew Jeffery , Stephen Boyd , Kiwoong Kim , Yue Hu , Tian Tao , , , , , , , Yong Mao Date: Thu, 20 Jan 2022 13:34:08 +0800 In-Reply-To: References: <20220119103212.13158-1-axe.yang@mediatek.com> <20220119103212.13158-4-axe.yang@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2022-01-19 at 21:47 +0200, Andy Shevchenko wrote: > On Wed, Jan 19, 2022 at 06:32:12PM +0800, Axe Yang wrote: > > Add support for eint IRQ when MSDC is used as an SDIO host. This > > feature requires SDIO device support async IRQ function. With this > > feature, SDIO host can be awakened by SDIO card in suspend state, > > without additional pin. > > > > MSDC driver will time-share the SDIO DAT1 pin. During suspend, MSDC > > turn off clock and switch SDIO DAT1 pin to GPIO mode. And during > > resume, switch GPIO function back to DAT1 mode then turn on clock. > > > > Some device tree property should be added or modified in MSDC node > > to support SDIO eint IRQ. Pinctrls named state_dat1 and state_eint > > are mandatory. And cap-sdio-async-irq flag is necessary since this > > feature depends on asynchronous interrupt: > > &mmcX { > > ... > > pinctrl-names = "default", "state_uhs", > > "state_eint", > > "state_dat1"; > > ... > > pinctrl-2 = <&mmc2_pins_eint>; > > pinctrl-3 = <&mmc2_pins_dat1>; > > ... > > cap-sdio-async-irq; > > ... > > }; > > > > Signed-off-by: Axe Yang > > The submitters SoB must be last among all SoB tags. Please, read > Submitting > Patches document carefully. > > > Signed-off-by: Yong Mao > > Who is they, why their SoB appeared here? > Yong Mao is the co-developer of this patch, I will reorder the SoB chains. > ... > > > /* > > - * Copyright (c) 2014-2015 MediaTek Inc. > > + * Copyright (c) 2022 MediaTek Inc. > > This doesn't feel right. Why did you remove old years? I should keep the publish year 2014 of this driver. But I still think range 2014-2022 is the most appropriate way to change the copyright time. Over these years, mediatek is keeping maintaining this driver continuously. What do you think? > > > * Author: Chaotian.Jing > > */ > > ... > > > + desc = devm_gpiod_get(host->dev, "eint", GPIOD_IN); > > + if (IS_ERR(desc)) > > + return PTR_ERR(desc); > > + ret = gpiod_to_irq(desc); > > + if (ret < 0) > > + return ret; > > + > > + irq = ret; > > Since both of them are local variables and there is no specific use > of the > returned value, I believe it's fine just to > > irq = gpiod_to_irq(desc); > ... I agree, will fix in next version. > Hmm... I was wondering if you can use fwnode_irq_get_byname(). > Ah, it's not (yet) in upstream. > > ... > > > static int __maybe_unused msdc_runtime_suspend(struct device *dev) > > { > > + unsigned long flags; > > Can you keep reversed xmas tree order? > > > struct mmc_host *mmc = dev_get_drvdata(dev); > > struct msdc_host *host = mmc_priv(mmc); > > (it means to add new variable here) Will fix it in next version. > > > return 0; > > } > > ... > > > static int __maybe_unused msdc_runtime_resume(struct device *dev) > > { > > + unsigned long flags; > > Ditto. Will fix it in next version. > > > struct mmc_host *mmc = dev_get_drvdata(dev); > > struct msdc_host *host = mmc_priv(mmc); > > int ret; > > return 0; > > } > -- Best Regard, Axe Yang