lkml.org 
[lkml]   [2010]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] gpio: sx150x: fix error code value
>   	err = sx150x_i2c_read(chip->client, reg,&data);
> if (err>= 0)
> - err = (data& mask) != 0 ? 1 : 0;
> + err = (data& mask) != 0 ? -EIO : 0;
>

This doesn't work. The IO pins are gpio data pins, which are used as 0
or 1 data values (see sx150x_gpio_get). Returning -EIO whenever an
attempt is made to gpio_get_value on a non-zero gpio line will break things.

--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


\
 
 \ /
  Last update: 2010-09-13 18:25    [from the cache]
©2003-2011 Jasper Spaans