linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Axe Yang <axe.yang@mediatek.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.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: Thu, 20 Jan 2022 13:34:08 +0800	[thread overview]
Message-ID: <0b6ef0ce05bb92cd458043be2441101e20166242.camel@mediatek.com> (raw)
In-Reply-To: <Yehq7L36yfJ8D/j2@smile.fi.intel.com>

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 <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?
> 

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 <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);
> 	...

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



  reply	other threads:[~2022-01-20  5:34 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
2022-01-20  5:34     ` Axe Yang [this message]
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=0b6ef0ce05bb92cd458043be2441101e20166242.camel@mediatek.com \
    --to=axe.yang@mediatek.com \
    --cc=adrian.hunter@intel.com \
    --cc=andrew@aj.id.au \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=angelogioacchino.delregno@collabora.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).