Hi Linus, On Tue, Aug 20, 2019 at 12:44 PM Linus Walleij <linus.walleij@xxxxxxxxxx> 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@xxxxxxxxxxx> > Cc: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx> > --- > 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@xxxxxxxxxxxxxx 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