From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Axe Yang <axe.yang@mediatek.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Chaotian Jing <chaotian.jing@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Satya Tangirala <satyat@google.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Lucas Stach <dev@lynxeye.de>, Eric Biggers <ebiggers@google.com>,
Andrew Jeffery <andrew@aj.id.au>,
Stephen Boyd <swboyd@chromium.org>,
Kiwoong Kim <kwmad.kim@samsung.com>, Yue Hu <huyue2@yulong.com>,
Tian Tao <tiantao6@hisilicon.com>,
angelogioacchino.delregno@collabora.com,
linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
Yong Mao <yong.mao@mediatek.com>
Subject: Re: [PATCH v4 3/3] mmc: mediatek: add support for SDIO eint IRQ
Date: Wed, 19 Jan 2022 21:47:56 +0200 [thread overview]
Message-ID: <Yehq7L36yfJ8D/j2@smile.fi.intel.com> (raw)
In-Reply-To: <20220119103212.13158-4-axe.yang@mediatek.com>
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 <axe.yang@mediatek.com>
The submitters SoB must be last among all SoB tags. Please, read Submitting
Patches document carefully.
> Signed-off-by: Yong Mao <yong.mao@mediatek.com>
Who is they, why their SoB appeared here?
...
> /*
> - * Copyright (c) 2014-2015 MediaTek Inc.
> + * Copyright (c) 2022 MediaTek Inc.
This doesn't feel right. Why did you remove old years?
> * Author: Chaotian.Jing <chaotian.jing@mediatek.com>
> */
...
> + 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);
...
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)
> return 0;
> }
...
> static int __maybe_unused msdc_runtime_resume(struct device *dev)
> {
> + unsigned long flags;
Ditto.
> struct mmc_host *mmc = dev_get_drvdata(dev);
> struct msdc_host *host = mmc_priv(mmc);
> int ret;
> return 0;
> }
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-01-19 19:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 10:32 [PATCH v4 0/3] mmc: mediatek: add support for SDIO eint IRQ Axe Yang
2022-01-19 10:32 ` [PATCH v4 1/3] dt-bindings: mmc: add cap-sdio-async-irq flag Axe Yang
2022-02-14 15:23 ` Ulf Hansson
2022-02-21 7:04 ` Axe Yang
2022-01-19 10:32 ` [PATCH v4 2/3] mmc: core: Add support for SDIO async interrupt Axe Yang
2022-01-19 10:32 ` [PATCH v4 3/3] mmc: mediatek: add support for SDIO eint IRQ Axe Yang
2022-01-19 19:47 ` Andy Shevchenko [this message]
2022-01-20 5:34 ` Axe Yang
2022-01-20 13:56 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yehq7L36yfJ8D/j2@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=adrian.hunter@intel.com \
--cc=andrew@aj.id.au \
--cc=angelogioacchino.delregno@collabora.com \
--cc=axe.yang@mediatek.com \
--cc=chaotian.jing@mediatek.com \
--cc=dev@lynxeye.de \
--cc=devicetree@vger.kernel.org \
--cc=ebiggers@google.com \
--cc=huyue2@yulong.com \
--cc=kwmad.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=satyat@google.com \
--cc=swboyd@chromium.org \
--cc=tiantao6@hisilicon.com \
--cc=ulf.hansson@linaro.org \
--cc=wsa+renesas@sang-engineering.com \
--cc=yong.mao@mediatek.com \
--cc=yoshihiro.shimoda.uh@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).