Received: by 10.192.165.148 with SMTP id m20csp704698imm; Fri, 4 May 2018 18:56:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoVgzh1Q3noSp9gIJPo++IAFHUZY/K5TpNs/jdrq10i5AahBU8Ge4hbjxxShsjfEIm9UetW X-Received: by 2002:a17:902:2805:: with SMTP id e5-v6mr30291811plb.55.1525485364558; Fri, 04 May 2018 18:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525485364; cv=none; d=google.com; s=arc-20160816; b=FgJg5H2BsPIHn3Dh+0qOdBjug/0ZJzFTchSTMVOluyyoM47Kr7nfPzAJnDNew0Ig+G FZIWNHDqwNz5n1Zn9QkbjZkOUlI5meMIUZ6jEY9l0RpSCqTfVfvdYvP/XaJOslbJ5gGi Q2nnmRraHQFuVOnAmAhYVhBdwwkab9FZFA09OkJ13WwW2VwYnD5efI3gp7/+jfQ+puan 835tJWsYrh8xpMLPRiH8ZMpmHgWWeIHAOFVGQ2LcFLClwD5orWwFXIyLJIz9Ux+LHYsP mKThDQ4FVJSID2XXKKCfvH4q6SLF97jUVLjnRw+mFNswDU9PeAFWIqPbEPLhn+TWrtvl 7KrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=tKsKKLasmk3A+V9KywYcDb+2MhlItzmUEJc21iMFhqs=; b=vZi2sfqqBK+/szwofkE842Ypvmy+qFWLxuUQ3HQd535ABDkONcmJ8MXwCy6xI0DBy7 4ib0gCkrzY+1nH1x85cbqcGc+43PYo3rHkdd3gAE7e2cCeUQ7gQw1eroiLdl7YnHw0sZ cNnHCXSgsbRtryeCEvt5lxw44mSrbRqdTPZwCfHeAyiqde8tkmpai1Nyv1X+CWNYV3rH p+gHp2+ruOukf3E0LoLfWZiZ0GOf8A2r75PBzhpe9JEIEXod4G3Zp6P3QRgCH4ku/abK 3jzMLVqtXuuC7vN4R+eGlf/PS4lyZ9bx8/s4+Hy7kmsFkR+i1KN4Qce3adtXLm4KFTR5 bRwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=JtY0QzRM; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o9-v6si8165690pgn.199.2018.05.04.18.55.50; Fri, 04 May 2018 18:56:04 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=JtY0QzRM; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751952AbeEEBzF (ORCPT + 99 others); Fri, 4 May 2018 21:55:05 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:54696 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751736AbeEEBzD (ORCPT ); Fri, 4 May 2018 21:55:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=tKsKKLasmk3A+V9KywYcDb+2MhlItzmUEJc21iMFhqs=; b=JtY0QzRMiYCsebQ08kJrlhAc4 pHQon3LUfqxbaUyixBwL0JKxtyvKqDX1XNFifg1tezAuOHLyueooeHZ9pNMDMOGGIeZ742A5ZHZoS c3rgsPuw7kK6SKVgov6oQdm8aM8YED3s8K8wOuUYQVdjgidOBInXzRDzfvFBvLfqKZG0o=; Received: from [211.55.52.15] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fEmPd-0006X5-0n; Sat, 05 May 2018 01:55:01 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 1A23044007A; Sat, 5 May 2018 02:54:58 +0100 (BST) Date: Sat, 5 May 2018 10:54:58 +0900 From: Mark Brown To: Wolfram Sang Cc: Grygorii Strashko , Baolin Wang , linux-i2c@vger.kernel.org, LKML Subject: Re: I2C PM overhaul needed? (Re: [PATCH 1/2] i2c: sprd: Prevent i2c accesses after suspend is called) Message-ID: <20180505015458.GM13402@sirena.org.uk> References: <99031524fa147e72451d26f54b24f36093c0d3fa.1523255712.git.baolin.wang@linaro.org> <20180427121417.auv4ppryegkprv32@ninjato> <20180502052336.i5f4yv2ho3za7qa7@tetsubishi> <3485f73f-e356-6db0-89fc-d51bf8bdab71@ti.com> <20180504122447.u3xgrkperxz5dpcz@ninjato> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Xb8pJpF45Qg/t7GZ" Content-Disposition: inline In-Reply-To: <20180504122447.u3xgrkperxz5dpcz@ninjato> X-Cookie: Advancement in position. User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Xb8pJpF45Qg/t7GZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, May 04, 2018 at 02:24:47PM +0200, Wolfram Sang wrote: > To handle that, I imagined an additional adapter callback like > 'master_xfer_irqless' to be used for such special I2C messages. These > kind of special messages could be tagged with a new I2C_M_something > flag. > And maybe this could be used here, too? Introduce this flag for very > late/early messages. If they have it, messages are even sent in > suspend_noirq() phase with the master_xfer_irqless() callback, otherwise > we will have the WARNing printed out. It feels like it'd be more elegant to have the core select the irqless function automatically if called after interrupts have been disabled - otherwise we end up with the need to special case through other layers of the stack like regmap as well which seems like it'd be error prone. OTOH it does mean we might not notice things happening later than they should so it's not 100% clear... --Xb8pJpF45Qg/t7GZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlrtDvEACgkQJNaLcl1U h9AVzwf9HXeIb5jst5K9BIC9uAe0uVBSWC4Whk8+Msy2998H1IYDuWsKc+bQN7ad ZtJgocc06oHrltwR+gKBzbhCaIDfan6jbdl4HaevTOQBzqfMRpRG/UJN5SVkY7ky GV3lR9Dr6rbhPuyDuR1iYgsXMBDRr6a5oixAWwdo+xXdVbSqt7s6XtVIsV7AyR5t vjQPDDu9O29Z19uU2eiDAOMe4fjfqu5OnWshJSHNarTiuIvi0KDl6gZIoBNvDY+f WY+iCZX/OB+/gile7FNjf0Syl5lT9PaUU0Eq8AD0LKb0Q8em0P5Ce7Q43zPKoM0E JJCDupBjKy9yULYv/5nDI/GspFu8ug== =kOM9 -----END PGP SIGNATURE----- --Xb8pJpF45Qg/t7GZ--