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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 9AE0AC10F26 for ; Fri, 6 Mar 2020 13:33:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7D56021D56 for ; Fri, 6 Mar 2020 13:33:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727225AbgCFNdF (ORCPT ); Fri, 6 Mar 2020 08:33:05 -0500 Received: from mail.baikalelectronics.com ([87.245.175.226]:37276 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727152AbgCFNdF (ORCPT ); Fri, 6 Mar 2020 08:33:05 -0500 Received: from localhost (unknown [127.0.0.1]) by mail.baikalelectronics.ru (Postfix) with ESMTP id 103408030701; Fri, 6 Mar 2020 13:26:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at baikalelectronics.ru Received: from mail.baikalelectronics.ru ([127.0.0.1]) by localhost (mail.baikalelectronics.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q1oWqLAR3iK0; Fri, 6 Mar 2020 16:26:10 +0300 (MSK) From: CC: Serge Semin , Serge Semin , Alexey Malahov , Maxim Kaurkin , Pavel Parkhomenko , Ramil Zaripov , Ekaterina Skachko , Vadim Vlasov , Thomas Bogendoerfer , Paul Burton , Ralf Baechle , Jean Delvare , Guenter Roeck , Rob Herring , Mark Rutland , , , Subject: [PATCH 0/2] hwmon: Add Baikal-T1 SoC Process, Voltage and Temp sensor support Date: Fri, 6 Mar 2020 16:26:02 +0300 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Message-Id: <20200306132611.103408030701@mail.baikalelectronics.ru> To: unlisted-recipients:; (no To-header on input) Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org From: Serge Semin In order to keep track of Baikal-T1 SoC power consumption and make sure the chip heating is within the normal temperature limits, there is a dedicated hardware monitor sensor embedded into the SoC. It is based on the Analog Bits PVT sensor but equipped with a vendor-specific control wrapper, which ease an access to the sensors functionality. Fist of all it provides an accessed to the sampled Temperature, Voltage and Low/Standard/High Voltage thresholds. In addition the wrapper generates an interrupt in case if one enabled for alarm thresholds or data ready event. All of these functionality is implemented in the Baikal-T1 PVT driver submitted within this patchset. Naturally there is also a patch, which creates a corresponding yaml-based dt-binding file for the sensor. This patchset is rebased and tested on the mainline Linux kernel 5.6-rc4: commit 98d54f81e36b ("Linux 5.6-rc4"). Signed-off-by: Serge Semin Signed-off-by: Alexey Malahov Signed-off-by: Maxim Kaurkin Cc: Pavel Parkhomenko Cc: Ramil Zaripov Cc: Ekaterina Skachko Cc: Vadim Vlasov Cc: Thomas Bogendoerfer Cc: Paul Burton Cc: Ralf Baechle Cc: Jean Delvare Cc: Guenter Roeck Cc: Rob Herring Cc: Mark Rutland Cc: linux-hwmon@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Serge Semin (2): dt-bindings: hwmon: Add Baikal-T1 PVT sensor bindings hwmon: Add Baikal-T1 PVT sensor driver .../devicetree/bindings/hwmon/be,bt1-pvt.yaml | 100 ++ Documentation/hwmon/bt1-pvt.rst | 113 ++ drivers/hwmon/Kconfig | 29 + drivers/hwmon/Makefile | 1 + drivers/hwmon/bt1-pvt.c | 1147 +++++++++++++++++ drivers/hwmon/bt1-pvt.h | 266 ++++ 6 files changed, 1656 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/be,bt1-pvt.yaml create mode 100644 Documentation/hwmon/bt1-pvt.rst create mode 100644 drivers/hwmon/bt1-pvt.c create mode 100644 drivers/hwmon/bt1-pvt.h -- 2.25.1