Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756864AbaGVVUr (ORCPT ); Tue, 22 Jul 2014 17:20:47 -0400 Received: from gw-1.arm.linux.org.uk ([78.32.30.217]:48855 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754861AbaGVVUq (ORCPT ); Tue, 22 Jul 2014 17:20:46 -0400 Date: Tue, 22 Jul 2014 22:20:36 +0100 From: Russell King - ARM Linux To: Grygorii Strashko Cc: Bastian Hecht , linux-i2c@vger.kernel.org, "Menon, Nishanth" , Linux-SH , Wolfram Sang , Tomoya MORINAGA , open list , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 1/5] i2c: Don't start transfers when suspended Message-ID: <20140722212036.GL21766@n2100.arm.linux.org.uk> References: <1405608520-5644-1-git-send-email-hechtb@gmail.com> <53CEB196.9060903@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53CEB196.9060903@ti.com> User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 22, 2014 at 09:46:46PM +0300, Grygorii Strashko wrote: > I'm not sure, this optimization is safe ( > Because, in many cases the access to PMIC IC needs to be allowed till late > stages of suspending (at least till suspend_noirq stage or even later). > For example, on some OMAP SoC Voltage management code need to use services > provided by PMIC IC, which is connected to I2C. This is definitely not safe. I worked on a PXA platform a while back where the only way to tell the thing to "sleep" was to send an I2C message to a microcontroller asking it to remove power. Plus, as you say, you may also have PMICs that you need to talk to in order to shut power off to various peripherals (and maybe even the CPU itself) during the suspend process. I2C is one of those cases where devices attached to the I2C bus are themselves responsible for doing their own suspend shutdown at the appropriate time; it's not the responsibility of the I2C core to know this kind of system/driver dependent detail. -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. -- 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/