Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp537922rdb; Thu, 15 Feb 2024 07:42:36 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXNoNDL25ge2K/tw0zoN0tX+9zZTb6Mrhd3MpTzP0e4jQpSjRuI30wVE2MAQYa9+OYa8q007LViaMBhaGkOkAPLef+KdJ8CW3AcxSnA3g== X-Google-Smtp-Source: AGHT+IFdtF9+pyyugT3waBBSkYashljU13l033zPJa4xq5WsYgMNwfYrckOc2O0YwCYQNpjEbpwb X-Received: by 2002:a05:6402:38c:b0:561:f4bc:606 with SMTP id o12-20020a056402038c00b00561f4bc0606mr1972186edv.0.1708011756121; Thu, 15 Feb 2024 07:42:36 -0800 (PST) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a12-20020a50c30c000000b00563cca14370si188408edb.561.2024.02.15.07.42.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 07:42:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67192-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-67192-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67192-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 996101F2CC48 for ; Thu, 15 Feb 2024 15:34:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A27751369B2; Thu, 15 Feb 2024 15:30:58 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E9E8136995; Thu, 15 Feb 2024 15:30:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708011058; cv=none; b=nw8FN7YBtnPoI4BNWgDecZEA1N3TBryJ0LnKrnd9nIxgCrFMNQciKf+WaptbeL3jAuLAJfSh/1yzVwQZ8b0NBScJUiD3+6G6l3c1WCIOiKgT5Ahbv6NdIelCvEnrWFbdrgVSeQaF2GA5xnyHw7DT9O746NZsAKYLdm9YTLkvVGM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708011058; c=relaxed/simple; bh=B0r36ErVVXrTrtr7W/g+NKVHw+xBL+tNCmApTVuv35A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZIf1jHJKbRXij+w/SF3xU3zYB5RK7En4+i+4cs65QG/bRVR3pOR0wHhxs0vblOQK0B9s7ov4TvMGZP7y3erJE1zWzJ10SKuAV0NOjNTjhxVMw558iUJgNRQZI43zo3eIi9KxIWib+/qhguiKlIod2p/8zJU17wzgJfL10/YrSLg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=fail smtp.mailfrom=kernel.org; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=kernel.org X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="2229489" X-IronPort-AV: E=Sophos;i="6.06,162,1705392000"; d="scan'208";a="2229489" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2024 07:30:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="912180958" X-IronPort-AV: E=Sophos;i="6.06,162,1705392000"; d="scan'208";a="912180958" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2024 07:30:49 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1radhF-00000004pR2-0Whi; Thu, 15 Feb 2024 17:30:45 +0200 Date: Thu, 15 Feb 2024 17:30:44 +0200 From: Andy Shevchenko To: Thomas Richard Cc: Linus Walleij , Bartosz Golaszewski , Tony Lindgren , Haojian Zhuang , Vignesh R , Aaro Koskinen , Janusz Krzysztofik , Andi Shyti , Peter Rosin , Vinod Koul , Kishon Vijay Abraham I , Philipp Zabel , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-phy@lists.infradead.org, linux-pci@vger.kernel.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com Subject: Re: [PATCH v3 04/18] i2c: omap: wakeup the controller during suspend() callback Message-ID: References: <20240102-j7200-pcie-s2r-v3-0-5c2e4a3fac1f@bootlin.com> <20240102-j7200-pcie-s2r-v3-4-5c2e4a3fac1f@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240102-j7200-pcie-s2r-v3-4-5c2e4a3fac1f@bootlin.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Thu, Feb 15, 2024 at 04:17:49PM +0100, Thomas Richard wrote: > A device may need the controller up during suspend_noirq() or > resume_noirq(). > But if the controller is autosuspended, there is no way to wakeup it during > suspend_noirq() or resume_noirq() because runtime pm is disabled at this > time. > > The suspend() callback wakes up the controller, so it is available until > its suspend_noirq() callback (pm_runtime_force_suspend()). > During the resume, it's restored by resume_noirq() callback > (pm_runtime_force_resume()). Then resume() callback enables autosuspend. > > So the controller is up during a little time slot in suspend and resume > sequences even if it's not used. .. > + /* > + * If the controller is autosuspended, there is no way to wakeup it once > + * runtime pm is disabled (in suspend_late()). > + * But a device may need the controller up during suspend_noirq() or > + * resume_noirq(). > + * Wakeup the controller while runtime pm is enabled, so it is available until > + * its suspend_noirq(), and from resume_noirq(). > + */ It's a bit random line lengths... Can you repack this to be more condensed? -- With Best Regards, Andy Shevchenko