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 X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3DA3C4363C for ; Wed, 7 Oct 2020 08:06:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 40DBC20870 for ; Wed, 7 Oct 2020 08:06:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fy7hM556" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40DBC20870 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pprzBniVs30sTO5K+hf38oS1C9JVclprAnca9Ggpn3U=; b=fy7hM5568Rpt/VpThFLPNsgEG TGiadajIEMQ2d5z8wEZu6jQv7X4fnptAW3NiVDOjjJax3RIlStoLnUKQtSoHQTsrbqLqWHoNMywTq 97KMwgKeIHuLqqvYWDCNejDZTkzZ56XbjVME5JZmhDhzzwWWOoDbQw5mA2UECBLQrIyoRpNQgX0Jz XjrLZ+xr2GN0Nc+PorblopRuKZO2re0vG/T/+xvveDbIjfOb1/hTL0/RenD8HMYmly5zpo1zaOfw6 MoNqNyGWOYBtyUYhfIowMRJES8Sg7zQVftyXW3BYXr3HDUP0NZYUnZF6oXoLwT8lX+wV46hF5LhjV ulcV7PnZQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQ4RI-00080m-IF; Wed, 07 Oct 2020 08:04:44 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQ4RF-0007zy-NY for linux-arm-kernel@lists.infradead.org; Wed, 07 Oct 2020 08:04:42 +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 97E28113E; Wed, 7 Oct 2020 01:04:37 -0700 (PDT) Received: from e119603-lin.cambridge.arm.com (unknown [10.57.50.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 231963F66B; Wed, 7 Oct 2020 01:04:36 -0700 (PDT) Date: Wed, 7 Oct 2020 09:06:01 +0100 From: Cristian Marussi To: Mark Brown Subject: Re: [PATCH 4/4] dt-bindings: arm: add support for SCMI Regulators Message-ID: <20201007080601.GA21759@e119603-lin.cambridge.arm.com> References: <20201005222623.1123-1-cristian.marussi@arm.com> <20201005222623.1123-5-cristian.marussi@arm.com> <20201006105922.GC5259@sirena.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201006105922.GC5259@sirena.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201007_040441_866978_7B8C7922 X-CRM114-Status: GOOD ( 21.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robh@kernel.org, satyakim@qti.qualcomm.com, sudeep.holla@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, etienne.carriere@linaro.org, lukasz.luba@arm.com 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 Mark thanks for reviewing this series. On Tue, Oct 06, 2020 at 11:59:22AM +0100, Mark Brown wrote: > On Mon, Oct 05, 2020 at 11:26:23PM +0100, Cristian Marussi wrote: > > > +An SCMI Regulator is permanently bound to a well defined SCMI Voltage Domain, > > +and should be always positioned as a root regulator. > > +It does not support negative voltages nor any current operation. > > Support for negative voltages is an implementation detail of Linux, IIRC > there's nothing in the generic regulator binding preventing it and even > if there were updates to the generic binding are what are relevant here > - they could start working with no updates to this binding. > > > +Optional properties: > > + - regulator-min-microvolt: when defined should be non-negative. > > + - regulator-max-microvolt: when defined should be non-negative. > > These are covered by the generic regulator binding, no need to duplicate > the documentation here. Right I'll drop this references to negative voltages in the bindings. Anyway, the underlying SCMI Voltage Domain protocol do support negatives and just expose a negative_volts_allowed flags in the Voltage descriptor if the domain is advertised by fw as supporting negatives. Based on that, since the regulator framework as of now cannot report negative voltages (since the .get ops return an int which is used also for reporting negative error codes), the SCMI regulator driver in this series just checks for that flag on every found Voltage Domain and refuse to handle it like: if (vinfo->negative_volts_allowed) { + dev_warn(dev, "Negative voltages NOT supported...skip %s\n", + sreg->of_node->full_name); + return -EOPNOTSUPP; + } So the driver itself will need to be patched in this regards the day the regulator framework should support negatives, it won't just work. (but I suppose this is not a problem since it will need to be changed anyway to use properly this possible new API handling negatives.) Thanks Cristian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel