From patchwork Tue Aug 4 11:07:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 11700261 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6E16914B7 for ; Tue, 4 Aug 2020 11:09:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5AF08206DA for ; Tue, 4 Aug 2020 11:09:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Db/nsib8"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="LvQYgeiz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5AF08206DA Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=h9/XE56hLCr2jzcagmIjpuAyikGROjnVHnZGXnhHyHo=; b=Db/nsib8vc2qfGcGCVXVNQ33J3 XC9Vuf+Xlr2qryz+yAkXbU696RiKwWbvNDUP4fXQFuxmi1IZ5Jj+VqotDC3ldBVd8HCSoDJYAbB79 Kav1+Grn8nX7st4gIvMmtokLDzf1uALq7lPJBWsI9Yyo/HaQtLuLtOpXWYrXeoe66ieZcKnQTc1S/ 3vUSRoiHCbCrx/IGO1091BZdEkvWVC0zfdady8nI4PH7I6PqpGz/rDow+HSHj/6anOVNuvAJBm9Mu TL2+9fha5dLUM0ciMI7l7alWM1i2yX/u/y1jTXq7umDJ2xxVOmQ/jDFaiLGthAHFwzmPBTb+82mJU i1WbUmqA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2unN-0003wH-9O; Tue, 04 Aug 2020 11:07:49 +0000 Received: from esa1.microchip.iphmx.com ([68.232.147.91]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2unK-0003vH-J5 for linux-arm-kernel@lists.infradead.org; Tue, 04 Aug 2020 11:07:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1596539266; x=1628075266; h=from:to:cc:subject:date:message-id:mime-version; bh=YtPmNSzbbPBoaWL3cjrf0tY68ii9T+o40iaT31QMEek=; b=LvQYgeizKA+2F20pIwsTv9GlF062FKQExLLiP/ptiwqdJieIV6Olpifr cWunth9xpvf+xbfA2i60yL578urbppuYn8651NptHQjzoCRxsgBwnvK5/ lZDJDjAVkOVJybTmiDbgykW3PytgUiv/fgD21nlJJspWS2neq9hAVHmJt EuIewdTSPwg6PalRsaehIevwdLuU0fP3IRUnvudhw2rhGqe7Ef1iY4f47 hObYlNTYfTvHvhzhIIT2HY+4RC0oA3l1vWfY1pGVHkgK0iHo7TUl0OYCy cfHKjhwMfhXwWCk9vqMu6HpkV6I317p7AAQqLuRrTsiPEWCe4IaxiwriJ w==; IronPort-SDR: ACpT0KWn+jHP0gpRWqL89XvoRrasTUHibOYUfOXG/rWYHk5gGMB4Cb1hKX3mqyVRvfygXj5yuJ A9eothsGg+4S+2+2OIpLXZIn25c1Ah3d0e5GCCM9C2xAVz7qwohSiYBWioysUJxh4SgrRcemnM W2BJirjPiB6sAs9v49dnoqtsaEMO0FVfNzsg1UI76b+sIFZ+xNim7fWUZoq9q5ifvnB46GwyLj EQ6EVZMJd5axMycJxFOCJVE3EMHG1RY7r52XpBRo9YNjBDziOgiylPBHWywBVOxYWKyyAthfBH EYw= X-IronPort-AV: E=Sophos;i="5.75,433,1589266800"; d="scan'208";a="90374050" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Aug 2020 04:07:43 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Tue, 4 Aug 2020 04:07:40 -0700 Received: from m18063-ThinkPad-T460p.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Tue, 4 Aug 2020 04:07:38 -0700 From: Claudiu Beznea To: , , , Subject: [PATCH v2 0/3] AT91 PM improvements Date: Tue, 4 Aug 2020 14:07:35 +0300 Message-ID: <1596539258-20719-1-git-send-email-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200804_070746_832209_40A55DB2 X-CRM114-Status: GOOD ( 10.55 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [68.232.147.91 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [68.232.147.91 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hi, This series adds ULP0 fast mode intended to reduce the suspend/resume time in the detriment of power consumption (patch 1/3). Along with this patch 2/3 adds code to avoid requesting a PM mode not available on platforms not supporting it. Patch 3/3 decrements a device_node refcount after its usage. Thank you, Claudiu Beznea Changes in v2: - in patch 2/3: - move per SoC supported mode arrays in *_pm_init() functions. - use 2 booleans in at91_pm_modes_validate() for modes validation - continue to use array of supported modes in at91rm9200_pm_init() and at91sam9_pm_init() instead of forcing soc_pm.data.standby_mode = AT91_PM_STANDBY and soc_pm.data.suspend_mode = AT91_PM_ULP0 to breaking the user configuration (it might request ulp0 as standby mode or vice versa) Claudiu Beznea (3): ARM: at91: pm: add support for ULP0 fast wakeup ARM: at91: pm: add per soc validation of pm modes ARM: at91: pm: of_node_put() after its usage arch/arm/mach-at91/pm.c | 93 ++++++++++++++++++++++++++++++++++++++--- arch/arm/mach-at91/pm.h | 5 ++- arch/arm/mach-at91/pm_suspend.S | 41 ++++++++++++++++-- 3 files changed, 127 insertions(+), 12 deletions(-)