* [PATCH] pinctrl: rza2: Include the appropriate headers
@ 2019-08-20 10:42 Linus Walleij
2019-08-20 11:05 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2019-08-20 10:42 UTC (permalink / raw)
To: linux-gpio; +Cc: Linus Walleij, Chris Brandt, Geert Uytterhoeven
This driver is implementing a GPIO driver so include
<linux/gpio/driver.h> and not the legacy API <linux/gpio.h>.
When testing it turns out it also relies on implicit
inclusion of <linux/io.h> (readw etc) so make sure to
include that as well.
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Geert: assuming you will pick this up if you're happy
with it.
---
drivers/pinctrl/pinctrl-rza2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-rza2.c b/drivers/pinctrl/pinctrl-rza2.c
index 5b951c7422cc..a39e1c35724e 100644
--- a/drivers/pinctrl/pinctrl-rza2.c
+++ b/drivers/pinctrl/pinctrl-rza2.c
@@ -11,7 +11,8 @@
*/
#include <linux/bitops.h>
-#include <linux/gpio.h>
+#include <linux/gpio/driver.h>
+#include <linux/io.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/pinctrl/pinmux.h>
--
2.21.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: rza2: Include the appropriate headers
2019-08-20 10:42 [PATCH] pinctrl: rza2: Include the appropriate headers Linus Walleij
@ 2019-08-20 11:05 ` Geert Uytterhoeven
2019-08-20 13:22 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2019-08-20 11:05 UTC (permalink / raw)
To: Linus Walleij; +Cc: open list:GPIO SUBSYSTEM, Chris Brandt, Geert Uytterhoeven
Hi Linus,
On Tue, Aug 20, 2019 at 12:44 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> This driver is implementing a GPIO driver so include
> <linux/gpio/driver.h> and not the legacy API <linux/gpio.h>.
> When testing it turns out it also relies on implicit
> inclusion of <linux/io.h> (readw etc) so make sure to
> include that as well.
>
> Cc: Chris Brandt <chris.brandt@renesas.com>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> Geert: assuming you will pick this up if you're happy
> with it.
Unfortunately shmobile_defconfig is not happy with it:
drivers/pinctrl/pinctrl-rza2.c: In function ‘rza2_pin_to_gpio’:
drivers/pinctrl/pinctrl-rza2.c:119:13: error: ‘GPIOF_DIR_IN’
undeclared (first use in this function); did you mean ‘_IOC_DIRBITS’?
drivers/pinctrl/pinctrl-rza2.c:119:13: note: each undeclared
identifier is reported only once for each function it appears in
drivers/pinctrl/pinctrl-rza2.c: In function ‘rza2_chip_get_direction’:
drivers/pinctrl/pinctrl-rza2.c:138:10: error: ‘GPIOF_DIR_OUT’
undeclared (first use in this function); did you mean ‘IOC_INOUT’?
drivers/pinctrl/pinctrl-rza2.c:141:10: error: ‘GPIOF_DIR_IN’
undeclared (first use in this function); did you mean ‘GPIOF_DIR_OUT’?
drivers/pinctrl/pinctrl-rza2.c: In function ‘rza2_chip_direction_input’:
drivers/pinctrl/pinctrl-rza2.c:157:39: error: ‘GPIOF_DIR_IN’
undeclared (first use in this function); did you mean ‘_IOC_DIRBITS’?
drivers/pinctrl/pinctrl-rza2.c: In function ‘rza2_chip_direction_output’:
drivers/pinctrl/pinctrl-rza2.c:195:39: error: ‘GPIOF_DIR_OUT’
undeclared (first use in this function); did you mean ‘IOC_INOUT’?
Are there prerequisites? It even fails on gpio/for-next.
> --- a/drivers/pinctrl/pinctrl-rza2.c
> +++ b/drivers/pinctrl/pinctrl-rza2.c
> @@ -11,7 +11,8 @@
> */
>
> #include <linux/bitops.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/driver.h>
> +#include <linux/io.h>
> #include <linux/module.h>
> #include <linux/of_device.h>
> #include <linux/pinctrl/pinmux.h>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: rza2: Include the appropriate headers
2019-08-20 11:05 ` Geert Uytterhoeven
@ 2019-08-20 13:22 ` Linus Walleij
0 siblings, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2019-08-20 13:22 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: open list:GPIO SUBSYSTEM, Chris Brandt, Geert Uytterhoeven
On Tue, Aug 20, 2019 at 1:05 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Tue, Aug 20, 2019 at 12:44 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> > This driver is implementing a GPIO driver so include
> > <linux/gpio/driver.h> and not the legacy API <linux/gpio.h>.
> > When testing it turns out it also relies on implicit
> > inclusion of <linux/io.h> (readw etc) so make sure to
> > include that as well.
> >
> > Cc: Chris Brandt <chris.brandt@renesas.com>
> > Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > ---
> > Geert: assuming you will pick this up if you're happy
> > with it.
>
> Unfortunately shmobile_defconfig is not happy with it:
>
> drivers/pinctrl/pinctrl-rza2.c: In function ‘rza2_pin_to_gpio’:
> drivers/pinctrl/pinctrl-rza2.c:119:13: error: ‘GPIOF_DIR_IN’
Oh drivers should not use these defines.
OK I spin a v2 fixing that too, no problem.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-20 13:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-20 10:42 [PATCH] pinctrl: rza2: Include the appropriate headers Linus Walleij
2019-08-20 11:05 ` Geert Uytterhoeven
2019-08-20 13:22 ` Linus Walleij
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.