Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756254Ab2BAM3b (ORCPT ); Wed, 1 Feb 2012 07:29:31 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:62643 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754258Ab2BAM3a (ORCPT ); Wed, 1 Feb 2012 07:29:30 -0500 MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 1 Feb 2012 13:29:29 +0100 Message-ID: Subject: Re: Handling like events in 's_power' implementation when we have a GPIO controlling the sensor CE From: Linus Walleij To: Bhupesh SHARMA Cc: Guennadi Liakhovetski , "linux-media@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Rabin VINCENT , Linus WALLEIJ , Ben Dooks Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1112 Lines: 31 On Wed, Feb 1, 2012 at 6:01 AM, Bhupesh SHARMA 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 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/