From patchwork Tue May 16 17:48:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan McDowell X-Patchwork-Id: 13243478 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E4574C77B7A for ; Tue, 16 May 2023 17:48:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=l/LNx9LVaFpwsay0aV1Unge8tK9rUXy7ij2VChE23U8=; b=438Q+b75iYrzPr H5ZS51KkWfpF3GLA47yejhZ4xwRKb650w0QkzsVIciVShS/lV/U2jdhYnTP8fkcRAtlH8VicL073D M3A4TrIGXpW1r+PmKae5iG4EAh+N/rv95mtHhfJgz0NUd79exIZPIVaqYuVDTweV4S1IfCaCIY27A UQklZWWpG7G5Zq0DIZKOe8dCkbrUxAyL1L5rzsOxZp/gqSqBJhu7gA0smBrcg2KKeIklWnjO2VkcQ v+gc9rbCJDfE2bzquATJ/HBCzrUtKBG88sc8hXwLDnoEuZMr65mwS1uGyqzs9AiGk6SThxWPqM71d OLM4EwQyClQmQ+VdzTcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pyymq-006gE0-2q; Tue, 16 May 2023 17:48:36 +0000 Received: from the.earth.li ([2a00:1098:86:4d:c0ff:ee:15:900d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pyymn-006gCN-1G for linux-arm-kernel@lists.infradead.org; Tue, 16 May 2023 17:48:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=earth.li; s=the; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=KbcQkYKNRCHyuXFCuS3kkLD2pB2ybnzz6U+C/4pf2yo=; b=CKgH460/CO2JV+oflOuijS3r5q 6vIPnY51LwvOvEthIh3DFtITt3uPivgwuC7GNCxIiORdo06NXt9khGgUuzMizF3Tm7PXKapoBWD12 EA3JDVVx8WNN73SejQX4RNgQZGAuwWP+DWyFaoIRml/UvOQwmNfTVHF2KkHXwxIftWU9ASBjEx5/S qUzecZonZeN8e3VqtxIq4wEVavhAvPJVw6wJLVjylHA0I/jqq85+darZ5v+x1aoDzGJtMxjSN8mxC P00c7jBoleNHGiiv2ri2R0IAb9WMMgTlciXVDV4nadQi+H8ln8rSJ+AIefjdCWEj0V7q9MKEn6Jas H3Utr+Bg==; Received: from [2001:4d48:ad59:1403::16a3] (helo=earth.li) by the.earth.li with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pyymh-00GMwv-FJ; Tue, 16 May 2023 18:48:27 +0100 Date: Tue, 16 May 2023 18:48:21 +0100 From: Jonathan McDowell To: Rob Herring , Krzysztof Kozlowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Linus Walleij , Bartosz Golaszewski , Conor Dooley , andy.shevchenko@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: [PATCH v3 5/5] ARM: dts: axp209: Add iio-hwmon node for internal temperature Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230516_104833_431805_35914F74 X-CRM114-Status: GOOD ( 11.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This adds a DT node to hook up the internal temperature ADC to the iio-hwmon driver. The various voltage + current ADCs are consumed and exposed by their respective drivers, but this is not and is always available. Naming chosen to match the axp20x_ prefix the power sensors use. Signed-off-by: Jonathan McDowell Reviewed-by: Jernej Skrabec --- arch/arm/boot/dts/axp209.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi index ca240cd6f6c3..469d0f7d5185 100644 --- a/arch/arm/boot/dts/axp209.dtsi +++ b/arch/arm/boot/dts/axp209.dtsi @@ -48,6 +48,13 @@ * http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf */ +/ { + pmic-temp { + compatible = "iio-hwmon"; + io-channels = <&axp_adc 4>; /* Internal temperature */ + }; +}; + &axp209 { compatible = "x-powers,axp209"; interrupt-controller;