From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 252DBECAAD5 for ; Tue, 6 Sep 2022 15:17:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=Ym/oOw3iZMYd7MNL3E807AdaA8WcQvAXhHcb9f0sdAQ=; b=UbeACj2fau7LWB ckTQIY4C1SOiL0qvbqr2kM3ZXaLN6PLewGYLMEucq8c/CESYeaSfhVMKpgtKAfUdZziv+o8WuDORu TE9drAQomwa6KVQ6pF+cIwi8l+26ESHqHZIXLhbgmERmDhVJITymqGKaODY39ziWpLPDSRDA1WT1t nt5bfQOT22F70AtvDUVDYAXLUP7prdwGUTj2VJ2W71MypY27w4eVBhMJvmAxaey5e+EHn8E6+jYl1 ZpfGFVNHf5Kz2XIkvUiotcCA7chUnEph0tbWOSfPlLiyHmrEV5C1704mDXnRWCvVFLICgeJki9TbO N/ITAN3cahst/k4v0pvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVaJY-00Efgz-Oi; Tue, 06 Sep 2022 15:16:42 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVZV8-00EGlP-LE for linux-arm-kernel@lists.infradead.org; Tue, 06 Sep 2022 14:24:32 +0000 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 D8CF91A2D; Tue, 6 Sep 2022 07:24:31 -0700 (PDT) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4CBB33F7B4; Tue, 6 Sep 2022 07:24:23 -0700 (PDT) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, f.fainelli@gmail.com, etienne.carriere@linaro.org, vincent.guittot@linaro.org, daniel.lezcano@linaro.org, tarek.el-sherbiny@arm.com, adrian.slatineanu@arm.com, souvik.chakravarty@arm.com, wleavitt@marvell.com, wbartczak@marvell.com, dan.carpenter@oracle.com, lukasz.luba@arm.com, Cristian Marussi Subject: [PATCH v2 0/3] Add ARM SCMI Powercap driver Date: Tue, 6 Sep 2022 15:23:34 +0100 Message-Id: <20220906142337.1697569-1-cristian.marussi@arm.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220906_072430_855924_3812772E X-CRM114-Status: GOOD ( 11.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi all, this short series builts on top of recently introduced SCMI v3.1 Powercap protocol to implement an ARM SCMI Powercap driver which takes care to expose via the Powercap framework all the SCMI Powercap zones that have been discovered asking the SCMI platform firmware. Basic testing has been performed against an emulated SCMI platform supporting SCMIv3.1 Powercap protocol using powercap-utils. A couple of fixes spotted with Smatch by Dan are queued on top of the driver itself; these may have to be squashed finally into the driver itself but for now I have just added them here as patches on top, for clarity and to preserve authorship. The series is based on sudeep/for-next/scmi [1] on top of commit 40d30cf680cb ("firmware: arm_scmi: Harmonize SCMI tracing message format") Thanks, Cristian --- v1 --> v2 - using clamp_t() to simplify normalizations - cleanup style in block of var declarations - refactor scale conversions code - add MAINTAINER entry - refactored normalizations and added dev_dbg Cristian Marussi (1): powercap: arm_scmi: Add SCMI Powercap based driver Dan Carpenter (2): powercap: arm_scmi: Fix signedness bug in probe powercap: arm_scmi: Fix a NULL vs IS_ERR() bug MAINTAINERS | 1 + drivers/powercap/Kconfig | 13 + drivers/powercap/Makefile | 1 + drivers/powercap/arm_scmi_powercap.c | 509 +++++++++++++++++++++++++++ 4 files changed, 524 insertions(+) create mode 100644 drivers/powercap/arm_scmi_powercap.c -- 2.32.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel