From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41A3DC07E8F for ; Mon, 22 Apr 2024 09:40:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gWrhGZyoADMFuykgXkHf0xHyMGkSeZS/mh0D7CPyVzc=; b=uMM8yzXSQ3aBOU fYkj1WpCCA9OH2MFIGMrehOTK2jyd5o+iU+G2nwlPqtOIxt2pthEaOUXWV3uVC0CnAKXDi0wV5UmO 9qR/Q0i8qHGBhWwk19eyf57u2Z0R6JgjU/rV85rppmVrRsNqn7fGlQ8MaA62xWfy6nC1RB7NSFX/K Ja/I+0LDO264zrcwRaNO/AItgeD/uIh1Ojs/P3GoAGRk0banoRpkPyGAr8e7mLThYO1mbsiIwXuvD 8OSg8k5lrnTS2YOOnM/i+El3BVhUd8d8ZqzeKwsWAYzn6pbNz8jIpf0+1WIkS47zyg7GbczLeU6TP dl+UhjYn4ud7+3dEAeMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ryq9k-0000000Cwpz-2V5g; Mon, 22 Apr 2024 09:40:12 +0000 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ryq9h-0000000Cwme-2YDf for linux-arm-kernel@lists.infradead.org; Mon, 22 Apr 2024 09:40:11 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 7ADA6240007; Mon, 22 Apr 2024 09:40:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1713778803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RwTZz+QOuJFhVcfuZG7WHposSII0qZDyi7L1Xxt7bUA=; b=S+pNIIbddjv1f/2u29qA50eSn2u78IHQoN/yeXQn9kXAkAxKzudzCKTzUBwh806OYKshiC XGYhR4UsoJ0QlB3O0AUh1LU1fBv9Y3UF6JuutBlAfd/g6+gu+4UwRgFn2ib0YSsJgcmyCG /lnMkpE8r8xkMCye4NTD0jiU49Wjlf3MFmEcL3mVdAcR5gD9sJcM5/uqBb+tdlL8wkj/Yx ro+vEj/ipMhhHRpGzc+o8gn5YOKRaRb41slSwYMfQVbvK/vhNFZcNmVT9JwX0RLnisKXtu 0FAMl2TB1Pr0wTlhu5nFkiJpL2ffcyqpdkWVLP3IVvuD6KXXm8p33rFygEY6VQ== Message-ID: Date: Mon, 22 Apr 2024 11:40:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 02/11] i2c: omap: wakeup the controller during suspend() callback To: Andi Shyti Cc: Linus Walleij , Bartosz Golaszewski , Tony Lindgren , Aaro Koskinen , Janusz Krzysztofik , Vignesh R , Peter Rosin , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_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 References: <20240102-j7200-pcie-s2r-v5-0-4b8c46711ded@bootlin.com> <20240102-j7200-pcie-s2r-v5-2-4b8c46711ded@bootlin.com> Content-Language: en-US From: Thomas Richard In-Reply-To: X-GND-Sasl: thomas.richard@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240422_024009_967974_A86BB20F X-CRM114-Status: GOOD ( 12.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 4/19/24 10:47, Andi Shyti wrote: > 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. Hello Andi, Yes indeed, the __maybe_unused attribute is missing for omap_i2c_suspend() and omap_i2c_resume(). -- Thomas Richard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel