Re: [PATCH RFT 1/5] gpiolib: provide generic request/free implementations

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

 



On Sun, Sep 13, 2015 at 3:21 PM, Jonas Gorski <jogo@xxxxxxxxxxx> wrote:

> Provide generic request/free implementations that pinctrl aware gpio
> drivers can use instead of open coding if they use a 1:1 pin to gpio
> signal mapping.
>
> Signed-off-by: Jonas Gorski <jogo@xxxxxxxxxxx>

Hm. Is this really generic? Well I guess of more and more
SoC's get pin controllers in front of their GPIOs then yes. But
for an off-chip GPIO expander this is not really "generic".

> +/**
> + * gpiochip_generic_request() - request the gpio function for a pin
> + * @chip: the gpiochip owning the GPIO
> + * @gpio: the GPIO signal to request for GPIO function
> + */
> +int gpiochip_generic_request(struct gpio_chip *chip, unsigned gpio)

Second argument should be named "offset", "gpio" is ambigous
someone could think it's the global GPIO number.

Please collect the various ACKs and I will apply the patch series.

I have another comment which will be more of a discussion and
possible further improvement.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux