Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4313336imu; Tue, 18 Dec 2018 12:34:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/VBrNXZsABN2eYWZi7S254Wj02k/MV3Wpsrhw1nkt/liRHqgk4NEm+7QJDMknVPHQG1T0rE X-Received: by 2002:a17:902:346:: with SMTP id 64mr18276193pld.337.1545165280989; Tue, 18 Dec 2018 12:34:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545165280; cv=none; d=google.com; s=arc-20160816; b=Q/DIUb0JULkU02lnpylgxFV3qNTspkeIS+8OXSChpahWqdfqFLc9iFCDO0ktMJR0qe rSO/E5728UzVja+jrw7v7EKA9IrL+lNWquXCLFZ+NJdao7KGSOL7/1UwJQ7kYzbshmN9 5aZLTQDVnncdWg3Cg/jyInpvfBtcU0w3ScGoRViB+OMKyZihvf6HfW4y4WcJhEwSCdrP 0umKrKM0ccUnTP6tI5DpX54GmKC5CdVs23pcuX53jBRf5iC74gyKXpyV38XmzV+01fd5 LHxNQ6DvhUWplZRWYIDRSoRz5nkH1SvXO3Nbkd+m9fzb8xr3jHtRv0qRAOV+kLLEZjFI xKvg== 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; bh=4RDmPB1mKl1BlT0Rw09qTRz37UdOvnp6q47gdCG4GsE=; b=K9r+85wBBY3jenVTKfkQKBHldIFcPgD83sEjXpWDtk0pKSXl6NWipnlQzBds+NjGMa tLSzS6s1DjAorSEI2esnpdNrQY1Z0fBBBuuGGhOz2Gzjo57NFgjqLOo+tz9eBK3tSHaw cf+CP5cnt1ryeltKPAOvM2/zdLfP267EihxyG+ErkgVRKcUUZAJYIu2g9YGicxOYHTba 0CgksW0rXGP8BsNrGpIWOtfwDAQpUVvrLvwvjqndoQ9gB0AreFfKc87WX+LGKMSJC5HR TyWQ+yvQJwtERpNu2k0Xzn29LWsO2rZtnyFI63+mTaY9Csidw4n2ndxA25NHBMI5LKPI GLJw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x74si15198726pfe.23.2018.12.18.12.34.25; Tue, 18 Dec 2018 12:34:40 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726928AbeLRUR3 (ORCPT + 99 others); Tue, 18 Dec 2018 15:17:29 -0500 Received: from sauhun.de ([88.99.104.3]:48914 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726422AbeLRUR3 (ORCPT ); Tue, 18 Dec 2018 15:17:29 -0500 Received: from localhost (p54B3362C.dip0.t-ipconnect.de [84.179.54.44]) by pokefinder.org (Postfix) with ESMTPSA id EBF762E3542; Tue, 18 Dec 2018 21:17:25 +0100 (CET) Date: Tue, 18 Dec 2018 21:17:25 +0100 From: Wolfram Sang To: Hans de Goede Cc: Wolfram Sang , linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: Re: [RFC/RFT 00/10] i2c: move handling of suspended adapters to the core Message-ID: <20181218201725.2uqfmsethlkasdvc@ninjato> References: <20181210210310.12677-1-wsa+renesas@sang-engineering.com> <2094a0d4-733f-7f74-abd2-bdb28edd0f80@redhat.com> <20181211234102.GA6701@kunai> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xjz6c4seersbpqak" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --xjz6c4seersbpqak Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hans, all, > > ... this. I don't know what these flags do (and reading SMART in there > > gives me more a 'uh-oh' feeling) >=20 > On x86 the lines between runtime suspend and system-suspend are blurring > with technologies like "connected standby" and in general devices moving > to suspend2idle as system-suspend state, I guess this also applies to > modern smartphone platforms but I'm not following those closely. I'd guess so, too. I am not aware of any existing mechanism for that at the moment, though. If somebody does, please enlighten us. > The "SMART" bit is really not all that smart, SMART_PREPARE means that > the drivers pm prepare callback will return positive non 0 (e.g. 1) to > indicate that the device may not be kept in its runtime suspended > state when transitioning to system-suspend, otoh when the prepare > callback returns 0 and the SMART_PREPARE flag is set then *all* suspend/ > resume handling can be skipped during a system suspend. Thanks for the detailed explanation! Much appreciated. > > Looking at the open coded version you did for the designware driver, I > > wonder now if it is better to just leave it at driver level? Need to > > sleep over it, though. >=20 > I myself was thinking in the same direction (leave the entire suspended > check at the driver level). So, I was giving it some more thoughts, and my feeling is to still apply this series with the review comments addressed. Plus, clearly mark the new 'is_suspended' flag and the helper function as *optional* to allow for driver specific solutions as well. The then-to-be-added documentation would state that it is mostly useful for seperated system suspend and runtime suspend. For more complex situations, custom solutions are accepted, too. Which means your patch for designware should be added to the series. My take is there are enough drivers out there already which can benefit =66rom this new helper. If it turns out to be useless somewhen in the future, we can still remove it. What do you (and all others, of course) think? Thanks, Wolfram --xjz6c4seersbpqak Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlwZVdUACgkQFA3kzBSg KbZgCg/+Mi5R4bOlSvy+L7fIs79nM05v0QMNCbEAXOZ3EmZKkt9sHHiEeGzFdzKY Iiawm2BGLUW+sVrCoxsnav0k+hSl+5TNlKd1C72V3inzemIbkEQTOiVbDPmp7fTV 0UE5WO6CUfZHirCk3XnA8xNSn8YxfHMKUOq2GuMUZEQcXyIk0mwlO84WPkWXjLTu pHNovX+74FM6iGL3IId6KQI6773u79o8d4OA5R3pCOzPD1O7OtWAJjcP2oyD/Ge7 +45+F1eIH5GupW0zn+ByR4tU2XiDFw7uUX/6WYvPPmqPbpz/6l5Ujs1pGC9nYyPx S8TuIAiTU8CEDVBLF1IN2Kh6+TEo0iwXpKL821lCL4lwb0ahTq/NjcyqZR0yeyYK 3bCaupT4sScf/LACYeHLPCSD3gNzK5WnaddFWnGB8YqAmQeqG1bDB+5wYxV5+FjB V8YiuuLm+kwF4jAMZITO+iDJIHeZ5HF62JeCE0lFCf21AqlWS2KoYfcJgjln3WHU Lk2CFEQidCTk2Vjb2U1AHBjGiAyzhle/fop8L/gMmXoCv9J+b5Jz4bIgJD+76d/A apkIbW9HRg90t+WdzecpdU+R9qJMqeyxeKCTRga7PPO+buBJszke+8ozXvtcN+Dw l3nKZh+uXk+nhF1T1mUW9QJ88NuCSX0SOxthrlS85oWRoiko0qk= =SIgX -----END PGP SIGNATURE----- --xjz6c4seersbpqak--