From patchwork Thu Sep 28 12:32:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 727392 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 220F938DE1 for ; Thu, 28 Sep 2023 12:32:57 +0000 (UTC) Received: from mail11.truemail.it (mail11.truemail.it [IPv6:2001:4b7e:0:8::81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7749E19B for ; Thu, 28 Sep 2023 05:32:55 -0700 (PDT) Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 87420211ED; Thu, 28 Sep 2023 14:32:47 +0200 (CEST) From: Francesco Dolcini To: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Francesco Dolcini , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 0/4] power: reset: gpio-poweroff: use sys-off handler API Date: Thu, 28 Sep 2023 14:32:00 +0200 Message-Id: <20230928123204.20345-1-francesco@dolcini.it> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: Francesco Dolcini Use the new sys-off handler API for gpio-poweroff. This allows us to have more than one power-off handler and to have a priority for the handler. Also, add a priority property so we can use gpio-poweroff even when registering another poweroff handler or using the legacy pm_power_off method. Stefan Eichenberger (4): power: reset: gpio-poweroff: use a struct to store the module variables power: reset: gpio-poweroff: use sys-off handler API dt-bindings: power: reset: gpio-poweroff: Add priority property power: reset: gpio-poweroff: make sys handler priority configurable .../bindings/power/reset/gpio-poweroff.yaml | 4 + drivers/power/reset/gpio-poweroff.c | 82 ++++++++++--------- 2 files changed, 48 insertions(+), 38 deletions(-)