Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5825854iog; Thu, 23 Jun 2022 06:11:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vVCH3iRyI5hq904Ik9JCT29MBC84y0v6Id0PLyp0YYE/4I91gBFKDA6YkLdcMkjv7Lw8Gh X-Received: by 2002:a63:2bd2:0:b0:40d:62e4:b880 with SMTP id r201-20020a632bd2000000b0040d62e4b880mr1351149pgr.488.1655989889630; Thu, 23 Jun 2022 06:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655989889; cv=none; d=google.com; s=arc-20160816; b=bkiVYjTu9MI68pMC//P/Z2hWYsI/ScPn7Za37G1KPHCqj4w06ofV4l7ymfTBEUvKD5 of3m2XMsqH4Ww2lVlmNzZ+pfI75+W7fBDhCJepscyxJ8CznR3M31M2Diqw861+TtrlOa OxyYsXJ/UBAVJ4/AQGeudu4CA/P4DPHV2N53zcd7lxIhbdcdNbunzFvwD29OG44fmDy9 RQpI55IUrLIKoynn0NVm4ZWub8JBSecKuoWA3g/o7Gcc+fh+KwaVvAPfswYawg+J7CBq 6xvCZgUczjtHGy+zshC2QNaHtS6qOoDVGsL3Rv8T4rkA63kdk+W1r3FwfJ1rPk66Ms8m TuqQ== 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=0JxpS1wTXY7UBv27fhCndQUwygyrlHXNfM8lZKUf6oo=; b=i0ZUDYeoai36eo2fJD+s6j80FMJzYulTwGxMN1HMg88T2auNvmsCkV/kSt7HCcsn0j MVevgks1aw4j5+ZY6Nj85RXa52uq4SROFNIjCQOg5psxKX4btENM71c9VJs2zgq9uCaB kRtsVJzeRFixVA0WMKKZ8Hgw+xv5irnTcpKyjbsBMgoIXW72WqroeVHa0Sv9/3xUwDeh pl88igbmpVaJLNNZYAIH8WVZLIzJ+b7qWfAqI3F3wMabmqJ8guB67GyjyymVDimHqWyU QaRe5GM9GL1ZcNjklvbEjc+5nc5+OxHjUQ3j3f68xLaiJNm+mJTd0drHeMNDHkNg75s4 zItg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t8-20020a63eb08000000b003f6ba0c3a6csi26324825pgh.80.2022.06.23.06.11.16; Thu, 23 Jun 2022 06:11:29 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230253AbiFWMsB (ORCPT + 99 others); Thu, 23 Jun 2022 08:48:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229647AbiFWMsA (ORCPT ); Thu, 23 Jun 2022 08:48:00 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B1DFBCAD for ; Thu, 23 Jun 2022 05:47:58 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6CB7312FC; Thu, 23 Jun 2022 05:47:58 -0700 (PDT) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5824C3F534; Thu, 23 Jun 2022 05:47:57 -0700 (PDT) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: sudeep.holla@arm.com, vincent.guittot@linaro.org, f.fainelli@gmail.com, Cristian Marussi Subject: [PATCH 0/5] Introduce SCMI System Power Control driver Date: Thu, 23 Jun 2022 13:47:37 +0100 Message-Id: <20220623124742.2492164-1-cristian.marussi@arm.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,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 Hi, This series is a respin of an old series[0] parked for a while waiting for a required SCMI specification change to be published. The series, building on top of the SCMI System Power Protocol, adds a new SCMI driver which, registering for SystemPower notifications, takes care to satisfy SCMI plaform system-transitions graceful requests like shutdown or reboot involving userspace interactions as needed. Interaction with userspace boils down to the same orderly_ Kernel methods used by ACPI to handle similar shutdown requests. The latest SCMI v3.1 specification [1], which adds a new timeout field to the graceful notifications payload, let the platform advertise for how long it will possibly wait for the requested system state transition to happen before forcibly enforcing it. As a part of the series, patch 2/3 enforces, at the SCMI core level, the creation of one single SCMI SystemPower device, to avoid promoting the design of systems in which multiple SCMI platforms can advertise the concurrent support of SystemPower protocol: when multiple SCMI platform are defined, only one of them should be in charge of SystemPower comms with the OSPM, so only one such SystemPower device across all platforms is allowed to be created. Thanks, Cristian [0]:https://lore.kernel.org/linux-arm-kernel/20210204165913.42582-1-cristian.marussi@arm.com/ [1]:https://developer.arm.com/documentation/den0056/d/?lang=en Cristian Marussi (5): firmware: arm_scmi: Remove deprecated ida_simple_ calls firmware: arm_scmi: Support only one single SystemPower device firmware: arm_scmi: Add SCMIv3.1 SystemPower extensions firmware: arm_scmi: Add devm_protocol_acquire helper firmware: arm_scmi: Add SCMI System Power Control driver drivers/firmware/arm_scmi/Kconfig | 12 + drivers/firmware/arm_scmi/Makefile | 1 + drivers/firmware/arm_scmi/bus.c | 37 +- drivers/firmware/arm_scmi/driver.c | 70 +++- .../firmware/arm_scmi/scmi_power_control.c | 362 ++++++++++++++++++ drivers/firmware/arm_scmi/system.c | 17 +- include/linux/scmi_protocol.h | 7 + 7 files changed, 486 insertions(+), 20 deletions(-) create mode 100644 drivers/firmware/arm_scmi/scmi_power_control.c -- 2.32.0