On Fri, Oct 26, 2018 at 9:57 PM Fabrizio Castro <fabrizio.castro@xxxxxxxxxxxxxx> wrote: > There are cases when the bootloader configures a pin to work > as a function rather than GPIO, and other cases when the pin > is configured as a function at POR. > This commit makes sure the pin is configured as a GPIO the > moment we need it to work as an interrupt. > > Signed-off-by: Fabrizio Castro <fabrizio.castro@xxxxxxxxxxxxxx> (...) > + err = gc->request(gc, hwirq); This is done in some drivers when what you want is exactly the work carried out by that callback. But can't you just call gpio_rcar_request() directly in this case so it is clear that the driver is meddling with the internal state of the hardware and not really intending to loop out into the external API or external callbacks? You're not on one of these platforms that prefer setting up the pin as GPIO using a pin control hog in the device tree? Sadly there is sometimes more than one way to do things around here :/ Geert will know what is best. Yours, Linus Walleij