lkml.org 
[lkml]   [2013]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] i2c-mux-gpio: test if the gpio can sleep
On Thu, Oct 10, 2013 at 10:46:41AM +0200, Lars-Peter Clausen wrote:

> > + if (gpio_cansleep(gpio))
> > + gpio_set_value_cansleep(gpio, val & (1 << i));
> > + else
> > + gpio_set_value(gpio, val & (1 << i));
>
> The proper way to do this is just always use the _cansleep() version.
> gpio_set_value() only works for chips which do not sleep,
> gpio_set_value_cansleep() works for both those who do sleep and those who do
> not.

To the gpio-list: Has it been considered to have sth. like
gpio_set_value and gpio_set_value_nosleep? I'd think it makes more sense
to have the specific function have the specific name.

Regards,

Wolfram

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-10-10 22:41    [W:0.070 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site