From patchwork Fri May 25 19:24:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 920744 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=i2se.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="G0I3xu3N"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40sx8M1Zn9z9s0w for ; Sat, 26 May 2018 05:26:59 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=J9lFnX7kNxogT5NQpllL8G2sF3i2J/T/8cE0AxodtHM=; b=G0I3xu3Nmuj8Uk QUPqX4fsG3LDDUn0ub6rr1GiLJuI4UdWVQdf4Az1uiqEW9VhadQz8uBMCNo+lnjMjXN2BygLcpkLE FhvBBclCyUAUHG+UrrdwMv5/0ZJh8Q7OZ6Y7D0NGDwJF9h5a9PPaVEatGQIsGkHjG6VcWRxkOeAtW o8H6qsZw4kJgHFEb7+5j6dRblz9IHhdQcDAEWUrVt28J5JRXZcAkrNCep2XU35sbP+BNcEjkW7f2s QnLdiSckM5/3iLaSMEBSPHHOQCZ3hRdU4m6AaysUvj2EshDpsIsgJ2KExRasxh3C2/unqDO6OQ7rP tzIrHkO9RzMncMQHEEYA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fMIMY-0002Rb-8y; Fri, 25 May 2018 19:26:54 +0000 Received: from mout.kundenserver.de ([217.72.192.73]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fMILt-00025i-4f; Fri, 25 May 2018 19:26:24 +0000 Received: from localhost.localdomain ([37.4.249.126]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.183]) with ESMTPSA (Nemesis) id 0M25gB-1gBn870Uot-00u4a7; Fri, 25 May 2018 21:25:28 +0200 From: Stefan Wahren To: Jean Delvare , Guenter Roeck , Jonathan Corbet , Eric Anholt Subject: [PATCH V3 0/6] hwmon: Add support for Raspberry Pi voltage sensor Date: Fri, 25 May 2018 21:24:33 +0200 Message-Id: <1527276279-23876-1-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Provags-ID: V03:K1:9LC1+OYTbtJ2AfeZZLE1dLy62FIZTH7s3il0Civ1XBxqbdchadX wq/IkVunZ+FuZBHG3NXQgUqGWcDD0ZWGMDqlxPmONeZXN/Y8pctV8/gqIrZ/HM3J401X4s9 3fdh21OIxH/rUwpHW4VO+KoddeH1/qCbA0XpASddc+E75IPh2+NRraJV5+FS7c6uQsyLU1M YpZcoTtniHcU+gpHQ4j8g== X-UI-Out-Filterresults: notjunk:1; V01:K0:ig3cNkaJK1k=:6yIZ308U6/RAry1FoZP2WR X6iMWAgusEmCU36C+AAnuQxVTipbKjSPTdWsIag3KxYnZOJIy6pV7Q6/HSWwftr9K1EuFuY4F n2F5DYlbVVdEZ3+eM4JR7R/QpRQOAyd7ZjyAVkWoV1OW//JeC9QqxEwSaezP5b/YuJqecHdUl Jpov6DehlaPlyUUyhIIjG92YPBKzpPesob4wiGLS4CAGASL41+nO+LcCetKREVaDqhPcdx/7E N7lPwF606F8tnttAP67bbN3gu9D8OAKfTAcer6IInGpV3HdG+xxwrxHwKcuKlJF4v7fTizntq 5mUKpf4AI0giWDrorAmdnF40ML0KWafJ4MmO3ShPhaoIkyCFRWlByjlhFkjqDNy58VXKNusQu 3cQc9340zh4pC4g3F6uPOjwR9Y3pWg/QxjBOCmtPd83YN75u+3euMwW3ywnQWWNwDz1Hh0YYh 6riDfAASv4NR4YciALGK4zxB1xzFml6AsAW4Pb9ZUVWn+krHTqk/3kfjSunQDqeGVtFKXAn1g HCdxY5VtPq7pVS0yrEE2LwmDeyMCt+URjE0PXw5f1RfZ9KpFzH+AG9AebkawOuPQR9eyhaid8 nk3cwmDtDT/hotr4+Sx7Br8GBFEVUaEMj5JHkSW65ROhjoeskOFIJCTB4/M+B4tOTAWxA9GMg JmzQNRDqVF38YptpOjxrvliJWj5o4LMXDbgi6BTpL6al7pr1dEWZb0LMNDxgiPAtry+EoJ4jy ggDm+hfsxfSVbx+K X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180525_122613_520726_E645CDB1 X-CRM114-Status: GOOD ( 15.00 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [217.72.192.73 listed in list.dnswl.org] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-hwmon@vger.kernel.org, Stefan Wahren , Florian Fainelli , Scott Branden , linux-doc@vger.kernel.org, Ray Jui , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org A common issue for the Raspberry Pi is an inadequate power supply. Noralf Trønnes started a discussion [1] about writing such undervoltage conditions into the kernel log. Changes in V3: - rebase - simplify probing Changes in V2: - simplified Kconfig dependency suggested by Robin Murphy - replace dt-binding by probing from firmware driver - add hwmon documentation - minor improvements suggested by Guenter Roeck [1] - https://github.com/raspberrypi/linux/issues/2367 Stefan Wahren (6): ARM: bcm2835: Add GET_THROTTLED firmware property hwmon: Add support for RPi voltage sensor firmware: raspberrypi: Register hwmon driver ARM: bcm2835_defconfig: Enable RPi voltage sensor ARM: multi_v7_defconfig: Enable RPi voltage sensor arm64: defconfig: Enable RPi voltage sensor Documentation/hwmon/raspberrypi-hwmon | 22 ++++ arch/arm/configs/bcm2835_defconfig | 2 +- arch/arm/configs/multi_v7_defconfig | 1 + arch/arm64/configs/defconfig | 1 + drivers/firmware/raspberrypi.c | 19 ++++ drivers/hwmon/Kconfig | 10 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/raspberrypi-hwmon.c | 166 +++++++++++++++++++++++++++++ include/soc/bcm2835/raspberrypi-firmware.h | 1 + 9 files changed, 222 insertions(+), 1 deletion(-) create mode 100644 Documentation/hwmon/raspberrypi-hwmon create mode 100644 drivers/hwmon/raspberrypi-hwmon.c