Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2142346lqt; Mon, 22 Apr 2024 02:40:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXthxNWxYhFo91CblJ3MvVU3r6o6F4OGBe8GE8lC3yI5mizJt+JVn3HUCsz62KdHfPK7O45AQakJRmeGOnjNQf8tYCZP9TVSLgI8d3FoQ== X-Google-Smtp-Source: AGHT+IHdt6Hk1v//LOrhUaUMJFHcH0m+mjebVU5pg8fKEUMexq4FaAV5SXMnrSK0CrTOVCv77rhn X-Received: by 2002:a05:6512:398b:b0:51b:18f7:6a9e with SMTP id j11-20020a056512398b00b0051b18f76a9emr2893798lfu.45.1713778843954; Mon, 22 Apr 2024 02:40:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713778843; cv=pass; d=google.com; s=arc-20160816; b=E+pkUjSkGgoHUCctTnRdVc+gVlmRbGjxvf1yPeRVvgu3zSNG4+CJkul1pn7QDHYfzh lLLqf8WYMUSaJZ+BxV7U1cLJsqsEYhMvBNhFDdBWMlp4/EPfLC15GR59dbueoEPvXBsu QD5UmfjbrDaSPJRaEH7tFLJoNlBg7iXp49lRqLhY1aS42tDGIG88MRQ4I5HoGXU4FIsS XQexs0qkLovktZl2e7rmjpS3R640qMtm77DS95Meoiko3qoCx7tFSAMSfyNN82UZIDQQ xkRCcVUhhzoyLnIh0jaPQxZCGsag5fijxNLwxyQjL+/tEW+dKaWjh696o7GPZxprMZ/9 GsvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=RwTZz+QOuJFhVcfuZG7WHposSII0qZDyi7L1Xxt7bUA=; fh=MnQ7qfm+c9wet7fHkIDZxSqPHTZEgAFWu7DJs2f6dpw=; b=f5ihVlfTN0UoH6xrVPI6duWh5mkhi9skJ3yLHkEI8QxV49hX2G3fe+0VG0OPJk2Q2O HkFlo/ecU+KU+bmhNpzbLiehiQUCXbjjdOiCWv3Za8EKE9xLglTDZxmWmOF1Ton8OgFh bD7MEO9zOmfnlMbPbVDTBYhpWrHztrvAyTJ5Z3dJzjrNC1nYWvKK5vftss76LeaEcLmX pFZ6AlQ4axkgqjpSaHvV4SwShbAL/MBpGBV5saGi/0SRuJasvJf7taA7inPlXecLAIZk hqr2bCAIbgOCOhwyPz6n1KidbBR1xB3zkhVuuwQX4R/s38izGgMADv4pKKSA+tGzloJd /HnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=S+pNIIbd; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-153101-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153101-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id o6-20020aa7c506000000b0056e090436ddsi5324481edq.90.2024.04.22.02.40.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 02:40:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153101-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=S+pNIIbd; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-153101-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153101-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com 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 AAE081F2191D for ; Mon, 22 Apr 2024 09:40:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E96361386A1; Mon, 22 Apr 2024 09:40:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="S+pNIIbd" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 539BD64A98; Mon, 22 Apr 2024 09:40:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713778814; cv=none; b=POy5crvRabNoKCrkc1Voha1pYx2eJWvn/hjsu/eS8IQFSjoaIWvzMxeUBnliVGBgeGlAF0jBpWC+A0pgBztybxLv7NwA5+SxcUQyDNN+Sp71yvA788vdLMb9U79tusNgyQjM2bmYY11GXe8Gvf6bw5nXHsqhJiKrCs/YQID+J2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713778814; c=relaxed/simple; bh=GlLSRRIiVc809HVRdBjHwu3wV54d3OJygCGFqUwLYpw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Lhf4dilDdl2lEDfzjGz3f32hS5CI1skF5NB8zAcrA0VkrD8dGZ98S0DWNPIanYXIxjU2tCq7Kl2681f20HD6y2yt+2TXk7PGr6TGmgA9cZNDz4jqNy+YGMFB1t7u21IagwpkNFHrDtO2S+9UV8xMpSrsEbETU6vEdGTmb1zp8Hk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=S+pNIIbd; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-GND-Sasl: thomas.richard@bootlin.com 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