Re: [PATCH v2] gpio: clamp returned values to the boolean range

2014-03-14 Thread Linus Walleij
On Tue, Mar 11, 2014 at 7:52 AM, Alexandre Courbot wrote: > This patch makes the internal _gpiod_get_raw_value() function return a > bool, effectively clamping the GPIO value to the boolean range no > matter what the driver does. This looks good, patch applied! Yours, Linus Walleij -- To unsubs

[PATCH v2] gpio: clamp returned values to the boolean range

2014-03-10 Thread Alexandre Courbot
Nothing prevents GPIO drivers from returning values outside the boolean range, and as it turns out a few drivers are actually doing so. These values were passed as-is to unsuspecting consumers and created confusion. This patch makes the internal _gpiod_get_raw_value() function return a bool, effec