Re: [PATCH 1/2] i2c-mux-gpio: test if the gpio can sleep

2013-10-10 Thread Lars-Peter Clausen
On 10/10/2013 09:43 PM, Wolfram Sang wrote: 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 &

Re: [PATCH 1/2] i2c-mux-gpio: test if the gpio can sleep

2013-10-10 Thread Wolfram Sang
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 j

Re: [PATCH 1/2] i2c-mux-gpio: test if the gpio can sleep

2013-10-10 Thread Ionut Nicu
On 10.10.2013 10:46, ext Lars-Peter Clausen wrote: > On 10/10/2013 10:39 AM, Ionut Nicu wrote: >> Some gpio chips may have get/set operations that >> can sleep. For this type of chips we must use the >> _cansleep() version of gpio_set_value. >> >> Signed-off-by: Ionut Nicu >> --- >> drivers/i2c/m

Re: [PATCH 1/2] i2c-mux-gpio: test if the gpio can sleep

2013-10-10 Thread Wolfram Sang
On Thu, Oct 10, 2013 at 10:39:32AM +0200, Ionut Nicu wrote: > Some gpio chips may have get/set operations that > can sleep. For this type of chips we must use the > _cansleep() version of gpio_set_value. > > Signed-off-by: Ionut Nicu > --- > drivers/i2c/muxes/i2c-mux-gpio.c | 11 --- >

Re: [PATCH 1/2] i2c-mux-gpio: test if the gpio can sleep

2013-10-10 Thread Lars-Peter Clausen
On 10/10/2013 10:39 AM, Ionut Nicu wrote: > Some gpio chips may have get/set operations that > can sleep. For this type of chips we must use the > _cansleep() version of gpio_set_value. > > Signed-off-by: Ionut Nicu > --- > drivers/i2c/muxes/i2c-mux-gpio.c | 11 --- > 1 files changed,

[PATCH 1/2] i2c-mux-gpio: test if the gpio can sleep

2013-10-10 Thread Ionut Nicu
Some gpio chips may have get/set operations that can sleep. For this type of chips we must use the _cansleep() version of gpio_set_value. Signed-off-by: Ionut Nicu --- drivers/i2c/muxes/i2c-mux-gpio.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/