Re: [RFC] gpio: rcar: Request GPIO before enabling interrupt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux