Re: [PATCH 00/54] GPIO: clamp return values from drivers

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

 



On Tue, Dec 22, 2015 at 4:06 PM, Vladimir Zapolskiy
<vladimir_zapolskiy@xxxxxxxxxx> wrote:

> From a19047b2131f73cdf494abd44d76de6f57ca81ff Mon Sep 17 00:00:00 2001
> From: Vladimir Zapolskiy <vladimir_zapolskiy@xxxxxxxxxx>
> Date: Tue, 22 Dec 2015 16:37:28 +0200
> Subject: [PATCH] gpio: update gpiochip .get() callback description
>
> Since gpiochip .get() callback may return a negative error value, it
> strictly limits the range of possible non-error returned values to
> a subset of [30:0] bitmask, however on practice on success all
> gpiochip drivers return either 0 for low signal or 1 for high signal,
> this is assured by "gpio: *: Be sure to clamp return value" series of
> changes. To avoid any confusion, misinterpretation and potential
> errors while developing gpiochip drivers in future convert this
> implicit assumption to a mandatory rule.
>
> For output signals with unknown output signal state gpiochip drivers
> should return a negative error instead of 0.
>
> Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@xxxxxxxxxx>

Patch applied!

Merry Christmas,
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