From: Chuanjia Liu <Chuanjia.Liu@mediatek.com>
To: Sean Wang <sean.wang@kernel.org>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Zhiyong Tao (陶志勇)" <Zhiyong.Tao@mediatek.com>,
"Eddie Huang (黃智傑)" <eddie.huang@mediatek.com>,
"Hailong Fan (范海龙)" <Hailong.Fan@mediatek.com>,
"Youlin Pei (裴友林)" <youlin.pei@mediatek.com>
Subject: Re: [PATCH v2] pinctrl:mediatek:add judgment conditions
Date: Tue, 25 Dec 2018 11:40:34 +0800 [thread overview]
Message-ID: <1545709234.17628.1.camel@mhfsdcap03> (raw)
In-Reply-To: <CAGp9Lzoo6bw-3Hr56rgbL6EhrRvXX2y5pajaOo13c5MV9FsO7Q@mail.gmail.com>
On Sun, 2018-12-23 at 02:50 +0800, Sean Wang wrote:
> On Mon, Dec 17, 2018 at 6:32 PM <chuanjia.liu@mediatek.com> wrote:
> >
>
> I thought the subject still is much general, it should be further
> improved with something like "add EINT support to virtual GPIOs" and
> should say more about what virtual GPIOs means by MTKers in the patch
> description because "virtual" is a usual term used throughout the
> kernel and that would easily cause others to fail to interpret
> correctly.
>
Thank you for your advice,I will modify subject and description.
> > From: Chuanjia Liu <Chuanjia.Liu@mediatek.com>
> >
> > This patch avoid return err when virtual gpio set SMT.
> >
> > Signed-off-by: Chuanjia Liu <Chuanjia.Liu@mediatek.com>
> > ---
> > change note:
> > v2 : 1. delete virtual gpio number
> > 2. add judgment conditions
> > ---
> > drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> > index 4a9e0d4c2bbc..a576e417744a 100644
> > --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> > +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> > @@ -290,7 +290,11 @@ static int mtk_xt_set_gpio_as_eint(void *data, unsigned long eint_n)
> > return err;
> >
> > err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SMT, MTK_ENABLE);
> > - if (err)
> > +
> > + /* SMT doesn't support virtual GPIO, add err != -ENOTSUPP is used for
> > + * avoid return err when virtual gpio set SMT.
> > + */
>
> I'd prefer to the comments as the below
>
> /*
> SMT is supposed to be supported by every real GPIO and doesn't support
> virtual GPIOs, so the extra condition err != -ENOTSUPP is just for
> adding EINT support to these virtual GPIOs. It should add an extra
> flag in the pin descriptor when more pins with distinctive
> characteristic come out.
> */
>
Thank you for your advice,I will modify comments.
> > + if (err && err != -ENOTSUPP)
> > return err;
> >
> > return 0;
> > --
> > 2.19.1
> >
prev parent reply other threads:[~2018-12-25 3:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 2:31 [PATCH v2] pinctrl:mediatek:add judgment conditions chuanjia.liu
2018-12-22 18:50 ` Sean Wang
2018-12-25 3:40 ` Chuanjia Liu [this message]
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=1545709234.17628.1.camel@mhfsdcap03 \
--to=chuanjia.liu@mediatek.com \
--cc=Hailong.Fan@mediatek.com \
--cc=Zhiyong.Tao@mediatek.com \
--cc=eddie.huang@mediatek.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=sean.wang@kernel.org \
--cc=youlin.pei@mediatek.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).