From: Alexandre Torgue <alexandre.torgue@st.com> To: Linus Walleij <linus.walleij@linaro.org> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>, Patrice Chotard <patrice.chotard@st.com>, Paul Gortmaker <paul.gortmaker@windriver.com>, Rob Herring <robh+dt@kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org> Subject: Re: [PATCH 3/4] pinctrl: stm32: Implement .get_direction gpio_chip callback Date: Mon, 24 Apr 2017 18:07:51 +0200 [thread overview] Message-ID: <a2ef1742-e455-69a9-ffd5-3a3cdf9ca7d6@st.com> (raw) In-Reply-To: <CACRpkdZG-yxMCzBqP2s37QThP7tgWKgd3pVgZGgceB+ihZs3nw@mail.gmail.com> Hi Linus, On 04/24/2017 02:37 PM, Linus Walleij wrote: > On Fri, Apr 7, 2017 at 5:10 PM, Alexandre TORGUE > <alexandre.torgue@st.com> wrote: > >> Add .get_direction() gpiochip callback in STM32 pinctrl driver. >> >> Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com> > > (...) >> +#include <linux/gpio.h> > > No this is wrong, drivers should never include this file. > It is a deprecated consumer header. > >> + if ((alt == 0) && (mode == 0)) >> + ret = GPIOF_DIR_IN; >> + else if ((alt == 0) && (mode == 1)) >> + ret = GPIOF_DIR_OUT; > > Just return 0 or 1, that is the driver-internal API. Ok. I will fix it in V2. Thanks Alex > > Yours, > Linus Walleij >
WARNING: multiple messages have this Message-ID (diff)
From: alexandre.torgue@st.com (Alexandre Torgue) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/4] pinctrl: stm32: Implement .get_direction gpio_chip callback Date: Mon, 24 Apr 2017 18:07:51 +0200 [thread overview] Message-ID: <a2ef1742-e455-69a9-ffd5-3a3cdf9ca7d6@st.com> (raw) In-Reply-To: <CACRpkdZG-yxMCzBqP2s37QThP7tgWKgd3pVgZGgceB+ihZs3nw@mail.gmail.com> Hi Linus, On 04/24/2017 02:37 PM, Linus Walleij wrote: > On Fri, Apr 7, 2017 at 5:10 PM, Alexandre TORGUE > <alexandre.torgue@st.com> wrote: > >> Add .get_direction() gpiochip callback in STM32 pinctrl driver. >> >> Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com> > > (...) >> +#include <linux/gpio.h> > > No this is wrong, drivers should never include this file. > It is a deprecated consumer header. > >> + if ((alt == 0) && (mode == 0)) >> + ret = GPIOF_DIR_IN; >> + else if ((alt == 0) && (mode == 1)) >> + ret = GPIOF_DIR_OUT; > > Just return 0 or 1, that is the driver-internal API. Ok. I will fix it in V2. Thanks Alex > > Yours, > Linus Walleij >
next prev parent reply other threads:[~2017-04-24 16:08 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-04-07 15:10 [PATCH 0/4] Add fixes to STM32 pintrl Alexandre TORGUE 2017-04-07 15:10 ` Alexandre TORGUE 2017-04-07 15:10 ` Alexandre TORGUE 2017-04-07 15:10 ` [PATCH 2/4] pinctrl: stm32: replace device_initcall() with arch_initcall() Alexandre TORGUE 2017-04-07 15:10 ` Alexandre TORGUE 2017-04-07 15:10 ` Alexandre TORGUE 2017-04-24 12:22 ` Linus Walleij 2017-04-24 12:22 ` Linus Walleij 2017-04-24 12:22 ` Linus Walleij [not found] ` <1491577811-26989-1-git-send-email-alexandre.torgue-qxv4g6HH51o@public.gmane.org> 2017-04-07 15:10 ` [PATCH 1/4] pinctrl: stm32: set pin to gpio input when used as interrupt Alexandre TORGUE 2017-04-07 15:10 ` Alexandre TORGUE 2017-04-07 15:10 ` Alexandre TORGUE 2017-04-24 12:36 ` Linus Walleij 2017-04-24 12:36 ` Linus Walleij 2017-04-24 12:36 ` Linus Walleij 2017-04-24 16:40 ` Alexandre Torgue 2017-04-24 16:40 ` Alexandre Torgue 2017-04-24 16:40 ` Alexandre Torgue 2017-04-07 15:10 ` [PATCH 3/4] pinctrl: stm32: Implement .get_direction gpio_chip callback Alexandre TORGUE 2017-04-07 15:10 ` Alexandre TORGUE 2017-04-07 15:10 ` Alexandre TORGUE 2017-04-24 12:37 ` Linus Walleij 2017-04-24 12:37 ` Linus Walleij 2017-04-24 12:37 ` Linus Walleij 2017-04-24 16:07 ` Alexandre Torgue [this message] 2017-04-24 16:07 ` Alexandre Torgue 2017-04-24 16:07 ` Alexandre Torgue 2017-04-07 15:10 ` [PATCH 4/4] ARM: dts: stm32: Set gpio controller also as interrupt controller Alexandre TORGUE 2017-04-07 15:10 ` Alexandre TORGUE 2017-04-07 15:10 ` Alexandre TORGUE [not found] ` <1491577811-26989-5-git-send-email-alexandre.torgue-qxv4g6HH51o@public.gmane.org> 2017-04-24 12:38 ` Linus Walleij 2017-04-24 12:38 ` Linus Walleij 2017-04-24 12:38 ` Linus Walleij
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=a2ef1742-e455-69a9-ffd5-3a3cdf9ca7d6@st.com \ --to=alexandre.torgue@st.com \ --cc=devicetree@vger.kernel.org \ --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=mcoquelin.stm32@gmail.com \ --cc=patrice.chotard@st.com \ --cc=paul.gortmaker@windriver.com \ --cc=robh+dt@kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.