Received: by 10.192.165.148 with SMTP id m20csp2045059imm; Thu, 3 May 2018 09:27:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoaV8yjegp7PCuxe6R++c+yZbAH0+ZWqXm3yImM/VxP9MjAtWtq+1F0NSplvsOZAiLuvqpZ X-Received: by 2002:a17:902:8e8b:: with SMTP id bg11-v6mr21384554plb.95.1525364845736; Thu, 03 May 2018 09:27:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525364845; cv=none; d=google.com; s=arc-20160816; b=hb9EQr7KusTi/2NJVkTRUTivcdhAeBtfaUk3ucSk0WrIgMAHWXFGnWPU6retH4STqr 2Fwgr8pBmrgJMg2ceFOkAMsZUD0AvxkhlOYSSTFmaPiy7YBjwGgEcgAdBKynFw+1Zf3z rXtWxeGSUdavngTydh6NY5nRsXVHIx8iNKVgvag6OPuuZxF+kqVUbq4MyI4M79BqIArJ 6PeAeP4j8SBEnDOzGXZXoaPJmqb+5HLIXNLNuJqdfH4Zsg5tRTBpjzpSE25+7/NtD+5c h3S+83UiAvNk0C6X2CkgfrmnU7Y7SMUcaJuWvGN+9cxoovMZexsaVNUxtJXt9TKlB2En cTXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=yafTqifYRndmdenQW3QnPrwJTj+PVaLC8v6q2SfZJbQ=; b=HhrdtgGS8xG20gjzr2gI/ozxorw3XHud0nAL1Lk1QnPwKf1lFIHEIKEVE0FxSItK21 K5SCE+cIFgzUKF7dG/uKdW4NoQ0c5+knsg59oOk3EH62tzrEMskIe848zNEHSMSf6Xys SZ5hzAxRXDKBowBMtpKZG844cSHq1VzhY9xAa4TylonJQk2r5ZjvGn3pkAFKUCnlPLXt 0s4wvA5KOeKlcvM2+D/n+2O0RZRYR+oQZVzed135AMPeddxsWmSRT2+SmZnHEV4NZV5U v6YeO9S8QWijmQlEIsXhjD/vGesd/v/qeuQRDKPbdOLFKynk4SAVCkDwvYF0pIfN16gY Uf9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FRGkwi6k; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w19-v6si13907940plp.538.2018.05.03.09.27.11; Thu, 03 May 2018 09:27:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FRGkwi6k; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751519AbeECQ0z (ORCPT + 99 others); Thu, 3 May 2018 12:26:55 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:18533 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751141AbeECQ0x (ORCPT ); Thu, 3 May 2018 12:26:53 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w43GQmZM013634; Thu, 3 May 2018 11:26:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1525364808; bh=yafTqifYRndmdenQW3QnPrwJTj+PVaLC8v6q2SfZJbQ=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=FRGkwi6kNuOHBC1Ulj6ERJpyFdkfGb1a7u3SOajWUIkWirB3OZgxRZ064Yl1I3qe/ 3JIqAdwN65YbAKvptYfH3P/S/XBSxtExqKSBriXbwtcg/MKaXOhjpfsqvgvpi1Ro3c rk+u6PJ/j4u5TaAwwPrdjTgX+Ih0ZjkKriNeTlOo= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w43GQm4B013542; Thu, 3 May 2018 11:26:48 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 3 May 2018 11:26:48 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Thu, 3 May 2018 11:26:48 -0500 Received: from [128.247.59.147] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w43GQmk7027556; Thu, 3 May 2018 11:26:48 -0500 Subject: Re: [PATCH 1/2] i2c: sprd: Prevent i2c accesses after suspend is called To: Baolin Wang , Wolfram Sang CC: Mark Brown , , LKML References: <99031524fa147e72451d26f54b24f36093c0d3fa.1523255712.git.baolin.wang@linaro.org> <20180427121417.auv4ppryegkprv32@ninjato> <20180502052336.i5f4yv2ho3za7qa7@tetsubishi> From: Grygorii Strashko Message-ID: <3485f73f-e356-6db0-89fc-d51bf8bdab71@ti.com> Date: Thu, 3 May 2018 11:26:48 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/02/2018 12:48 AM, Baolin Wang wrote: > On 2 May 2018 at 13:23, Wolfram Sang wrote: >> >>>> We should maybe handle this in the core somewhen, though. Or? >>> >>> Thanks. Yes, It will more helpful if we can handle this in the i2c core. >> >> To understand the issue better: which kind of devices in your system >> still send I2C transfers when the system is going to suspend? Do you >> know? > > Now we found the touch screen device will trigger I2C transfers when > the system is going to suspend. > And you have to fix it (touch screen) - not your i2c driver. Otherwise, you can get situation when set of I2C transfers (executed from some kthread/work/threaded_irq/..) will be just interrupted in the middle - usual behavior after this is (I2C timeout) [and/or not-functional I2C client device [and/or I2C bus stuck (worst case)]. In case, somebody is trying to access I2C after .suspend_noirq() stage I2C bus driver should produce big fat warning and, most probably, abort suspend. Above, in general, can be part of I2C core functionality. -- regards, -grygorii