Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp490780lqt; Fri, 19 Apr 2024 01:47:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVgIe58AR0bSE2QNlh0WTXErYZBVVA5ugbVbBe3JtPCGBkySu1NJXlNABtpqDACKtQulCs/VagcP3VGX7HDxhj0hYhh0qmnYlS/HcQ7vw== X-Google-Smtp-Source: AGHT+IEm9H0LZ9RRMO1mRHY2MRs6/osl08Esj/vX5ahsvlPZGK6vIH6vg0c0blbikDqs1sTSr83h X-Received: by 2002:a17:906:4545:b0:a55:61cd:67ea with SMTP id s5-20020a170906454500b00a5561cd67eamr873120ejq.45.1713516439687; Fri, 19 Apr 2024 01:47:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713516439; cv=pass; d=google.com; s=arc-20160816; b=D/9Gm8ztG2pL8mgpArk3kS0fTqQ06VsBUTey3vz3SEcgWypuUI5GBicdLpd6MQCyku mdPBxoH79ZlSuOYD93fmmkvlRhoB57YC6HFIPpv+9EGr+3VH48MhvDzu/zX3MVJHkD8Z 0kUIfutFNdTxPYOPymAoNuE0ocaqNwDv7OSyG1IBzJnNA/z9NLxnyIR+SfGEGKlbw1yH GgJChgvMGEEmeBE7vO+t25IZZlltMo+T4jGuE9aPbQG3JyMzMzC+AJohKO+fg+Nqy1vS QNMeKxiDeSol2CTslp3fnSVbR6L0mV+tc31kB0hQ7iruXCJ3usH8NtjddyJ2bi0VrdHm n+lA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=aWY3bTgpkNl6louUewQBlAYbovmKVHGG3AVGYFW0vDg=; fh=Qf+IKu6qTT+spTJKLG9DBPUkd9qlitARDPWC9UjpgJA=; b=JEXasJkRncEQqvlwkbgGyu0QDpQbVcNVuO5/xLs790HcdafmTupiIn1SFj0SIBE0gA JJPUdwxfwW/5+ZnpF3K+7rM/vMLLeVma882DpHrbB69TlZ6Rrk2C9GPQ/xYXdq9x02lo 25BTzWVi5N24dmOyBBCyArQB0yT5kITht8LpCAMZxXyJtKFuPr1POa+DNegXMVDXBUHR I/orhK4YTXROH0G30ORh1rbvLxxHwMq7sNcEmjGRJn/S8eSDlNZJWhJk8zonqZGGp6Xd tO46u4t7a/qLsA1nKHlKT3W48M0MJwHhXoWlLyIUVTEiGnmQx8tC6T00uAK410VZfkQ8 UYPA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XNRP7gv4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-151187-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151187-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lv26-20020a170906bc9a00b00a474f747ee9si1848198ejb.740.2024.04.19.01.47.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 01:47:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151187-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XNRP7gv4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-151187-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151187-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 61C881F2282D for ; Fri, 19 Apr 2024 08:47:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9150A7440B; Fri, 19 Apr 2024 08:47:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XNRP7gv4" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A68871E4BE; Fri, 19 Apr 2024 08:47:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713516428; cv=none; b=lRNX/MI8uvKQVWy8NoHc0dgzeIzosyJLdqzs0kipVIwVLI5tXPbGAPXevJTfn2IWrkBVvSuTcVPputBzAImLd45braCKqsRUvHPRYYhut3EHd7FQ22Za8HWoFN3pW+JleyCCS5J6koVbzUccgqNrZvIi+JEf6DHjNq3qjaixM8Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713516428; c=relaxed/simple; bh=JMeqt/5R/X4ObeTie5ZZL2cEEJlLOQITn5aJcjiO5xA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hr+hRNFETC/8IL6IEYvlUb+GHwKogAzdFT98d4S7ozlHC6VfpwG9DCGgD29kTJMi4ueV9MG0vPXyqnzzuKYfUrPaUvERpnHBCeOzOQ/r6Jpm6QxPee60mDb80N4GTUs0pzH4CWuhdDaGb7kEVYdvGM4s5m+9WFZU+KwB0DfkT1w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XNRP7gv4; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E7B3C072AA; Fri, 19 Apr 2024 08:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713516428; bh=JMeqt/5R/X4ObeTie5ZZL2cEEJlLOQITn5aJcjiO5xA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XNRP7gv4zpvIDLVA6xhX7CxYZWDeV+CQJyPorxrIuZsEvZ2b6d8UOWD1aPQUwe1jR hwyjW4qE3KT8wa+MDpguSeQr+XGI/Xf/51zvT7mXKyUmjlngFcKJgZDoEYGpRtX1wR PcreBNXDbbY7k/AZysJfwNWKY8ZBcWbveoTnTXCMYpd3Ck3PidHWtELXSakSWR4qui JYaXXEZq3I0sROMMP+SCMyixZBjKZXwVkiwo+XaLddiuWFunYl/lyMGmTnV2VSW7UH moyB6IielIcUXx1jOkPTzueokbZN77sRvvjdr1ttXYM5+mF6yDzGQHmq0j9VT4Xhdg B8f97vxlGOP7g== Date: Fri, 19 Apr 2024 10:47:03 +0200 From: Andi Shyti To: Thomas Richard Cc: Linus Walleij , Bartosz Golaszewski , Tony Lindgren , Aaro Koskinen , Janusz Krzysztofik , Vignesh R , Peter Rosin , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Siddharth Vadapalli , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com, Wolfram Sang Subject: Re: [PATCH v5 02/11] i2c: omap: wakeup the controller during suspend() callback Message-ID: References: <20240102-j7200-pcie-s2r-v5-0-4b8c46711ded@bootlin.com> <20240102-j7200-pcie-s2r-v5-2-4b8c46711ded@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-v5-2-4b8c46711ded@bootlin.com> Hi Thomas, > +static int omap_i2c_suspend(struct device *dev) > +{ > + /* > + * 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(). > + */ > + return pm_runtime_resume_and_get(dev); > +} > + > +static int omap_i2c_resume(struct device *dev) > +{ > + pm_runtime_mark_last_busy(dev); > + pm_runtime_put_autosuspend(dev); > + > + return 0; > +} > + > static const struct dev_pm_ops omap_i2c_pm_ops = { > SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, > pm_runtime_force_resume) > + SET_SYSTEM_SLEEP_PM_OPS(omap_i2c_suspend, omap_i2c_resume) If you don't have CONFIG_PM_SLEEP, though, this doesn't compile. Andi