[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdbB2ALMeBZfba7rz+NyNC-z-XfT4wuHLGgxMJ+iFYwomg@mail.gmail.com>
Date: Wed, 1 Feb 2012 13:29:29 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Bhupesh SHARMA <bhupesh.sharma@...com>
Cc: Guennadi Liakhovetski <g.liakhovetski@....de>,
"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Rabin VINCENT <rabin.vincent@...ricsson.com>,
Linus WALLEIJ <linus.walleij@...ricsson.com>,
Ben Dooks <ben-linux@...ff.org>
Subject: Re: Handling <Ctrl-c> like events in 's_power' implementation when we
have a GPIO controlling the sensor CE
On Wed, Feb 1, 2012 at 6:01 AM, Bhupesh SHARMA <bhupesh.sharma@...com> wrote:
> Our board has a I2C controlled camera sensor whose Chip Enable (CE)
> pin is driven via a GPIO. This GPIO is made available by a I2C-to-GPIO
> expander chip (STMPE801, see user manual [1])
(...)
> the I2C controller driver
> (we use the standard SYNOPSYS designware device driver present in mainline,
> see [3]) returns -ERESTARTSYS in response to the write command we had requested
> for putting the sensor to power-off state (as it has received the <ctrl-c> kill
> signal).
So what happens if you go into the I2C driver and replace all things
that look like this:
ret = wait_for_completion_interruptible_timeout(&dev->cmd_complete, HZ);
With this:
ret = wait_for_completion_timeout(&dev->cmd_complete, HZ);
(Non-interruptible.)
This is usually the problem.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists