From patchwork Wed Aug 5 08:36:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 11701551 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 3221E138C for ; Wed, 5 Aug 2020 08:38:31 +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 118AF21744 for ; Wed, 5 Aug 2020 08:38:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oYbbYFaj"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="XJ96M3oH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 118AF21744 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=5If+VOV8JkH1GKjp1XGubAXU/jyDRgjFpyOXf7XfMxo=; b=oYbbYFajVMWYbc1FXK6qjM2LZp 2hDm7KhnfyEv12qE+80QYt3W4MDagl2veImGsJN48DsrA/5UZPL6YdqfcxpOs6V6zODHxcw3EMJ3E sQiwjwWAtUXsdL3L7PnfUXvuUm9qiTui9mhlIZayq1WbR9F9iUIt5ZSs5Af0glZSqdiLcQTB3J43b tb6w0pT4p6sm022lesjw89L2YjKbJSyN+8jspRMTVHxI10tABNQ4Qht6mYRDeiXvtyylgC3dxK+tc 8zs6H/3Yh58c+ycxsgE/ioxJ3/ugiEJhNtdRxc7Fz7UZDc6FvDQLXhdrAKQAlJsqqy9cgpktrSc6f yx+PZZSg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3Euz-0000kV-K1; Wed, 05 Aug 2020 08:37:01 +0000 Received: from esa2.microchip.iphmx.com ([68.232.149.84]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3Euv-0000it-Cc for linux-arm-kernel@lists.infradead.org; Wed, 05 Aug 2020 08:36:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1596616617; x=1628152617; h=from:to:cc:subject:date:message-id:mime-version; bh=LfYO9g+FGWyDgQ8j8fkTqXUVuxUq9UB8VMpu2RT1Ofw=; b=XJ96M3oHfWBTuUenPbgDSF3sRVbe4xpZ0IV0ohhwgtXdvKDv4LdIroSJ /ZOMegjqlQOqdosUZQPl0AeJYwX0wPOQQ9YKPkroUqwdDOG13v99iPMNn 5vjdFyNNbXkV9bWra+nYsFa1ExnFu+k3wRqp4t/MA/UMPQvZZSkjXUPr0 JaPxWjjtmKjKAYwgwywMbqaIbcnSjxDPaN3k/0+ITVCoJ3LajEYrrVtdp 4hfunvmkq8F2wDqXo8fkjtv8dq4pDqbUwt/3Oj9GLcj4ck+MRpiWqxQAK 9yV03SjWeEQ7RLOKMPg9Ru/cClDmTFKKYieT/4UDXMm0kGIBPOPsZNXGc A==; IronPort-SDR: BZL2Dno/Vjfcv7QsqHVjuwisQAhByW+Qyr9Ato6QtAo+OGPvvz2k5RCTjfMB+VYjQlgK6Zp9jc sItWqCjYHMFmw+Dh0+fdm/AdrXg/WUfR03+Qq0nfeD7l2EL7zVZ3sPFk11To/QTrpV+RKj9g/a a+Lw8lqDZ/JKKkaUtQOyQ1G1qHeyD912ZVkTq0pahZf3tCezJsd3kPhMIsQPPVO/sQwbsr9ST8 r5/veCPTGZJ3i7URI1Ewp0JJZvUjpI0+G7RwSlDloUVVhlxi/uuC5UJ3kflMkpn4eHbQpNrBkv W2M= X-IronPort-AV: E=Sophos;i="5.75,436,1589266800"; d="scan'208";a="84485775" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 05 Aug 2020 01:36:55 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Wed, 5 Aug 2020 01:36:53 -0700 Received: from m18063-ThinkPad-T460p.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Wed, 5 Aug 2020 01:36:51 -0700 From: Claudiu Beznea To: , , Subject: [PATCH v3 0/3] AT91 PM improvements Date: Wed, 5 Aug 2020 11:36:47 +0300 Message-ID: <1596616610-15460-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-20200805_043657_670935_9ACD5605 X-CRM114-Status: GOOD ( 12.14 ) 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.149.84 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [68.232.149.84 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 v3: - force STANDBY and ULP0 modes for rm9200 and at91sam9 to avoid looping over all available modes and thus preserving booting time - keep static in "static const int modes[] __initconst" in *_pm_init() functions to avoid compilation error "error: section attribute cannot be specified for local variables const int modes[] __initconst = {" - remove sama5_pm() introduced in v2 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 | 90 ++++++++++++++++++++++++++++++++++++++--- arch/arm/mach-at91/pm.h | 5 ++- arch/arm/mach-at91/pm_suspend.S | 41 +++++++++++++++++-- 3 files changed, 125 insertions(+), 11 deletions(-)