Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp731193rwi; Mon, 10 Oct 2022 06:34:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ewvIss47oK9R64EQsh/8AmyBHtqxhO6oW82iTyrDl+tJiZ3XGInJHF7GXjLmB9+Wuzj6U X-Received: by 2002:a17:902:b194:b0:176:d229:83bd with SMTP id s20-20020a170902b19400b00176d22983bdmr18712370plr.174.1665408860114; Mon, 10 Oct 2022 06:34:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665408860; cv=none; d=google.com; s=arc-20160816; b=aDP3JAv0Q2LLiq1vgAhXNN4QuJWmbnAEfMUPqrhGKyFxQM4iIwosTGRp78vdaX5ZTZ NFjMGT3lHVJANYhdmlP2BnCIltd0Ab84YARAFNVoFEcB7CeBr+EVjvRviBnEyT6NiQry b4e8kb6If9qufYwvakmhxN3qMVkzY39ZrNVjvG+fF636DtTxzA82C+BAwfOrRc9qvLgV Tbqcjy0fqG7tEMDyyGAmoafQ/5faV3s62eIrukr+uieEfv608M5ptmuZj4VAM97dnAKN QprFkLHEmCDS2ClY2aVrToYLRD83bJ1MVlcGYcw4D3ODKJ9l7M+YzfTN92K8qLHABnkh qwxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=nR/rAw6CQShbts6CpV87qik30O7Qq44olcNuzF4N9gk=; b=JmvEM98mhMs2qONp1kYsLz/kkbZGqNdtCbYsygErM3YyXY5bnQQwayKI8/qUQ4xZgO SzB1ikm9TD7wJvvX49Q0LUwrRENMWixCFCnCG///SJ4n7TXn/WontOZjZsYckKjBYRQg wf6N30sV4OzUprAdPjPPq3m85sCkTwom/q/KaomolX/7oLq56zoOg0zoNcVYJPHZlmjZ yaln0KGKLAHpQul6VLLLEhGcOOhNgZEe+QnoUhOQHvDqkaKADChT+eYPULSpRw6upe5U C+kBAsa2XE+Lj45duYwkLYnNqur5kKBTAe8HiuNwFwGhzFi82vLPNd4sWGJoPxlG7fx+ Uc1Q== 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 o22-20020a17090a9f9600b001fd7ae1ae32si10941217pjp.126.2022.10.10.06.34.08; Mon, 10 Oct 2022 06:34:20 -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 S229887AbiJJNOT (ORCPT + 99 others); Mon, 10 Oct 2022 09:14:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229760AbiJJNOQ (ORCPT ); Mon, 10 Oct 2022 09:14:16 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 77D4615718; Mon, 10 Oct 2022 06:14:15 -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 439E811FB; Mon, 10 Oct 2022 06:14:21 -0700 (PDT) Received: from [10.57.5.39] (unknown [10.57.5.39]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 210953F766; Mon, 10 Oct 2022 06:14:11 -0700 (PDT) Message-ID: <14be9c37-55af-54cf-fb08-406a2a6b8952@arm.com> Date: Mon, 10 Oct 2022 14:14:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v2 1/3] powercap: arm_scmi: Add SCMI Powercap based driver Content-Language: en-US To: Cristian Marussi 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, "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org References: <20220906142337.1697569-1-cristian.marussi@arm.com> <20220906142337.1697569-2-cristian.marussi@arm.com> From: Lukasz Luba In-Reply-To: <20220906142337.1697569-2-cristian.marussi@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE 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 Cristian, On 9/6/22 15:23, Cristian Marussi wrote: > Add a powercap driver that, using the ARM SCMI Protocol to query the SCMI > platform firmware for the list of existing Powercap domains, registers all > of such discovered domains under the new 'arm-scmi' powercap control type. > > A new simple powercap zone and constraint is registered for all the SCMI > powercap zones that are found. > > Cc: Rafael J. Wysocki > Cc: linux-pm@vger.kernel.org > Signed-off-by: Cristian Marussi > --- > 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 > vOLD --> v1 > - fix _init cleaning up powerctrl zone on failure > - removed uneeded casting > - simplified normalization helpers > --- > MAINTAINERS | 1 + > drivers/powercap/Kconfig | 13 + > drivers/powercap/Makefile | 1 + > drivers/powercap/arm_scmi_powercap.c | 508 +++++++++++++++++++++++++++ > 4 files changed, 523 insertions(+) > create mode 100644 drivers/powercap/arm_scmi_powercap.c > Thanks for addressing my comments. The code LGTM Reviewed-by: Lukasz Luba Regards, Lukasz