From patchwork Tue Jun 20 09:08:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinbo Zhu X-Patchwork-Id: 11021 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3539264vqr; Tue, 20 Jun 2023 02:35:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ676jmZaQwiSzk2qjU39xCHJFMnu/MUve+pfFQ7+NKW2c0876gHbST/RIYoS1FQRJjhX9jn X-Received: by 2002:aa7:88cf:0:b0:666:ac6f:e8fd with SMTP id k15-20020aa788cf000000b00666ac6fe8fdmr9024956pff.1.1687253750928; Tue, 20 Jun 2023 02:35:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687253750; cv=none; d=google.com; s=arc-20160816; b=Lnq0WBdsD3Xxj089XvGICwMNKCmLQ9KXf3PCSK4EMVjQHX09+1WzRFYbygdQEgQLHI ZiixQYMLOSVe4LO6Kmdtx4yRysHmRwS89vWXAQXjDx+ICN4a72Dq6Mgf10qPBpx8FYLs UILgBC3i8G41Oo3a5fiBIg4f9JqhrSwKN3o3gQggfBvfNriW0pw1Rp2I8SrbDLhgwVJn +JJC9nTY5lAICWMHocr9jL3ChVTK/GY1g80/P1cHaxSG6qrkw0UxG3AlYPRT2kBfB9UB fYRei2Smmy8v++upTah12IEgjMfQTX2GUjPKN+vvrU3ZVFeLp5wb5hpD5hVnH3F+psrK A3eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=rwv5n9/kUC3yH5/l/2ISunwOviEJ686S0qKAMr4x+ck=; b=w5g/sikCyGP9E4utMuApbgWlXFodT5La3OEMDZMZPTari5eH1EYLXzBDSBvFjAZBQk hm/vkjZDmQfHlLZsSBEIneqpE5xxnOpnKlLVveR3u7QQgxJKQV3AKOpyKmMveSZ2Y/zD 0MxsDXL88/cnlUd9P0Trg+u+Oo9g1fsrsPcr9MWTYG8M/zkmJoM9prHAI6Pyv3qUNc5Y mG1Q6we7HCYlvv9UCi0q9RNDzaCuETK6eWKcd1OHAyku8fFN2tFuvCZS2XYv2sGn82P8 yeC0c7JcgAqpfOCjkZaEvs0UYjtnxzXb0+hnU+tgq+PXdnqYS+iQkKYWe/Bnpp8ponf4 2ZrA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a656944000000b0051b90567f99si1369471pgq.690.2023.06.20.02.35.36; Tue, 20 Jun 2023 02:35:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232108AbjFTJI3 (ORCPT + 99 others); Tue, 20 Jun 2023 05:08:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230037AbjFTJIW (ORCPT ); Tue, 20 Jun 2023 05:08:22 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E908AC2; Tue, 20 Jun 2023 02:08:19 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.35]) by gateway (Coremail) with SMTP id _____8Cxd+mCbJFkkSMHAA--.12734S3; Tue, 20 Jun 2023 17:08:18 +0800 (CST) Received: from user-pc.202.106.0.20 (unknown [10.20.42.35]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxTMp8bJFkG30hAA--.19516S2; Tue, 20 Jun 2023 17:08:16 +0800 (CST) From: Yinbo Zhu To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Arnd Bergmann , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Liu Yun Cc: Jianmin Lv , wanghongliang@loongson.cn, Liu Peibao , loongson-kernel@lists.loongnix.cn, Yinbo Zhu Subject: [PATCH v4 0/2] soc: loongson2_pm: add power management support Date: Tue, 20 Jun 2023 17:08:09 +0800 Message-Id: <20230620090811.721-1-zhuyinbo@loongson.cn> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8BxTMp8bJFkG30hAA--.19516S2 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769213789062623478?= X-GMAIL-MSGID: =?utf-8?q?1769213789062623478?= Loongson-2 platform support Power Management Controller (ACPI) and this series patch was to add PM driver that base on dts and PM binding support. Change in v4: 1. The patch "[PATCH v3 1/3] loongarch: export some arch-specific pm interfaces" had been merged into linux-next tree thus this v4 series patch need drop it and need depend on it and it's patch link was: https://lore.kernel.org/all/20230615091757.24686-2-zhuyinbo@loongson.cn/ 2. Remove the pmc label in dt-binding patch. 3. Add the Co-developed-by for driver patch. 4. Simplify the loongson2_suspend_valid_state that "return (state == PM_SUSPEND_MEM)". 5. Use Using loongson2_pm_irq_enable() to replace. loongson2_power_button_irq_enable(). 6. Remove the "oneOf" in dt-bindings patch. 7. Replace "suspend-address" that use "loongson,suspend-address". 8. Use u64 type that for "loongson,suspend-address". 9. Rename "pm" to "power-mangement" in dt-bindings patch. 10. Add the reivewed-by for dt-bindings patch. Change in v3: 1. Reword the [1/3] patch commit log and title. 2. Use the old naming for suspend interface for the [1/3] and [3/3] patch. 3. Combine some small function in the driver patch. 4. Rename 'pwrbt' to 'button' in the driver patch. 5. Use the specific compatible in yaml file. Change in v2: 1. Fixup the "suspend-address" description. 2. Remove the "return -EINVAL" in PM driver probe when firmware no configure "suspend-address" property in dts in oder to other PM state to work. Yinbo Zhu (2): soc: dt-bindings: add loongson-2 pm soc: loongson2_pm: add power management support .../soc/loongson/loongson,ls2k-pmc.yaml | 52 +++++ MAINTAINERS | 7 + drivers/soc/loongson/Kconfig | 10 + drivers/soc/loongson/Makefile | 1 + drivers/soc/loongson/loongson2_pm.c | 215 ++++++++++++++++++ 5 files changed, 285 insertions(+)