From patchwork Thu Mar 2 12:14:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlo Caione X-Patchwork-Id: 9600205 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C4A3960414 for ; Thu, 2 Mar 2017 13:06:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B31CD2859F for ; Thu, 2 Mar 2017 13:06:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A55F5285B7; Thu, 2 Mar 2017 13:06:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2BA02859F for ; Thu, 2 Mar 2017 13:06:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752728AbdCBNG0 (ORCPT ); Thu, 2 Mar 2017 08:06:26 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:36186 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752110AbdCBNGZ (ORCPT ); Thu, 2 Mar 2017 08:06:25 -0500 Received: by mail-wr0-f193.google.com with SMTP id l37so9398333wrc.3 for ; Thu, 02 Mar 2017 05:04:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=PLkhC9arvMFV9pLbYMPm8h33LE4xb6YWV3p2f1YIMz4=; b=qHMnTvDkEsFsCYBTxEo8fZ39KFrsdixDAhL0Hn1EcmNstQIeN6sL37Cbsxe6BOh+mw 33t00RdOnxgubFmn9dEKfusgeMdA+7c4AiE0jbJnNmHRLw1t2LLgebXQ0tRf2jLNHOyd MLg+c7AWWVUyxncv0nMkTu6YYAv+TzMZhY4BVgxz+9ModRgCdeLDhnlOW+3XDKkMJ5Sv xrrkH1oV38npvq3G3D+pwBW05qJbewGQ35gMnIO2YoW4olPeWlWQEsEih8vxIXAQnmAJ rFXUGRh03c1mV0DgxNnyh2xfeMURM1EpMNsBfealffulGilXJo2+bY6s4S3GG2TbBv+G 06cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=PLkhC9arvMFV9pLbYMPm8h33LE4xb6YWV3p2f1YIMz4=; b=M+0VyeUks58hrh5IP4dSIIIR8m+wd+XQmvw4OrcFY1g9MpakwMNWwrYH4VahArBcUR kpLcp72v2BZ0SaF4A1cvabfIoaRmrF1VoazysgLNm8kURLq/uitP1eQecYPTxjXHdPIf f2dwPnNnlep++2S91T1j9PlrOft9XCCik/xhwemiCxYsLPAZlvSQHdkPq4umpq0FQ4X0 jHUYJ9isR1SebhfayXzKUdOiy9jX5bKPm8Aekeb/0S7hubFfDoEXDfXg2Gmr7Dx91ena uvsyNRYoynyF/InSHqkvz9Vd0N3cDdO+bARW560QP4KqbKuQGAjsQbjM38n6SseRM7hM slDw== X-Gm-Message-State: AMke39kcbiW5s4eqINU+R6HVNRecAQp4LwEFUhx67iSW7MX/kJX1wV5nN6ytzspo70LhVQ== X-Received: by 10.223.177.218 with SMTP id r26mr4254685wra.194.1488456317198; Thu, 02 Mar 2017 04:05:17 -0800 (PST) Received: from satan.homestation.setup ([151.45.79.45]) by smtp.gmail.com with ESMTPSA id 191sm10956689wmo.21.2017.03.02.04.05.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Mar 2017 04:05:16 -0800 (PST) From: Carlo Caione To: jdelvare@suse.com, linux@roeck-us.net, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux@endlessm.com, punit.agrawal@arm.com, sudeep.holla@arm.com, robh+dt@kernel.org Cc: Carlo Caione Subject: [PATCH 1/2] Documentation: bindings: Introduce scpi,sensors-scale Date: Thu, 2 Mar 2017 13:14:59 +0100 Message-Id: <20170302121500.8121-2-carlo@caione.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170302121500.8121-1-carlo@caione.org> References: <20170302121500.8121-1-carlo@caione.org> Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Carlo Caione Document the new property `scpi,sensors-scale` used by the hwmon-scpi driver to convert the sensor readings to the correct / expected scale. Signed-off-by: Carlo Caione --- Documentation/devicetree/bindings/arm/arm,scpi.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/arm,scpi.txt b/Documentation/devicetree/bindings/arm/arm,scpi.txt index 401831973638..35c621ce52c5 100644 --- a/Documentation/devicetree/bindings/arm/arm,scpi.txt +++ b/Documentation/devicetree/bindings/arm/arm,scpi.txt @@ -84,6 +84,24 @@ Required properties: as used by the firmware. Refer to platform details for your implementation for the IDs to use. +Optional properties: +- scpi,sensors-scale: array of 5 elements defining the unit scale used by the + SCP for the 5 different sensor classes (temperature, + voltage, current, power, energy) such that 1 == unit, + 1000 == milli, 1000000 == micro, ... + + Example: + scpi,sensors-scale = <1 1000 1000 1000000 1000000> + In this case the values reported by SCP are: + -> temperature in degree Celsius + -> voltage in millivolts + -> current in milliamperes + -> power in microwatts + -> energy in microjoules + + The default value is: + scpi,sensors-scale = <1000 1000 1000 1000000 1000000> + Power domain bindings for the power domains based on SCPI Message Protocol ------------------------------------------------------------