Message ID | a40b6d46209f9b5626cd5a147c31daf5d19c9439.1681580558.git.noodles@earth.li |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1175813vqo; Sat, 15 Apr 2023 11:11:46 -0700 (PDT) X-Google-Smtp-Source: AKy350b4CLhikHOI+6hglo6yqnTvSrKnHhR8pbGD1cQEMZZcjHPX+fiDt824JCG3giVtlTFyEo+n X-Received: by 2002:a05:6a20:47d9:b0:ce:2fb4:5fc4 with SMTP id ey25-20020a056a2047d900b000ce2fb45fc4mr8922592pzb.38.1681582306497; Sat, 15 Apr 2023 11:11:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681582306; cv=none; d=google.com; s=arc-20160816; b=fB1zvVYeI42sv5ZFjPruGiqNNpsyHxgUhOrHPPirxsgJGmedIRM0zzlH2HB3rfT49B Ti909T6UmaYIoXq5JuwFe8TXi8deUcRBvaFqKrv6MgWhFBW6jPNL9239u2EtKY2GtWUi 3JzPZe7BOmgC8W0474oWXKauzz2lCRiuAOykCu+KF/2MdJyCOZGnjOayTudu/QRKsnjA /8fGEaZIXTGoRcXUEqHUDT1pJnMiHHaPVcTso0+4p38wTPxigIsmDbZ1sp6iXOXVnrgH ZNWgFBhFxU7FGIEuVr47KBL93XuNN+aCu0EbLrfppX5+q3NZTKH5w8C+7km+3o5Djjse YA8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=V3hC1iXMftqNHVVjf9y/IQOJAn+pUeg8MBrKjF7zyEU=; b=y/EJZtBg4/XPB6gTAnTvCnp8iS2/94Fml8c9b3H7V0IWTO0ZFhsSTsCrp4hitt9xoX QHs3VfvzUewY02MYtuR8usQfGl1pIxRfkx5ZCNDgu5Vw+dpqtTp1fmKFU6p4iSTPjhMP 8/l3MjHP7IbsnqkWskrejyT6w0wmmI6VFVnUEDQgIPyIY89vTH1eytEynSrjeoN53tLI BWXEC1SoG85PwIWGBMnR4Tedv/G5R5R/DKcqYWkXZJYeGuW5KBtoRmH44K1s90cEDGb3 nrguZ8BVq+bPH8wEyBGZ+dAsnoYFxjjQklOJR2c8GIdGlloQj1ARIdneXx1UBXrwMwHm 7Z7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@earth.li header.s=the header.b=tWlUdvEX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r18-20020a632b12000000b0050af2178284si7723165pgr.819.2023.04.15.11.11.28; Sat, 15 Apr 2023 11:11:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@earth.li header.s=the header.b=tWlUdvEX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230107AbjDORrW (ORCPT <rfc822;yuanzuo1009@gmail.com> + 99 others); Sat, 15 Apr 2023 13:47:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229746AbjDORrU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 15 Apr 2023 13:47:20 -0400 Received: from the.earth.li (the.earth.li [IPv6:2a00:1098:86:4d:c0ff:ee:15:900d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBF4EE41; Sat, 15 Apr 2023 10:47:18 -0700 (PDT) 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=V3hC1iXMftqNHVVjf9y/IQOJAn+pUeg8MBrKjF7zyEU=; b=tWlUdvEX04DAJTh9v4VGMcRyTc fdQsu33b9RCx1TGq9nNTnuaxVm9lB5EnIT71Qaih2vSe73a+8R9xl5d8c1OXQiKgUSezj+3aCLpxa TWbicTc6fjQwP/KxuHblsdSjBqOZ3CVy4kyQRVVcLrQSiUmC6Pdnme1vVptmUaHDK4dXYjcqPXPxi GYXwb/9GBh6t0FNxAmPRaDTbPXZRWJw/+7RJ6tx8JLYrb4ySKrC35nY10Wworvekm1HzSt7ao0osK 3ffQuXXxBdlCxF/MJMYGZ+aYX3NZgqUkDA45pYedbs6oWNMjqdZ1cNR3wYj0aKjIAWYzsLLbqSJuq cOy4/sSA==; 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 <noodles@earth.li>) id 1pnjzS-00FJpt-5k; Sat, 15 Apr 2023 18:47:10 +0100 Date: Sat, 15 Apr 2023 18:47:05 +0100 From: Jonathan McDowell <noodles@earth.li> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Chen-Yu Tsai <wens@csie.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org> Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] ARM: dts: axp209: Add iio-hwmon node for internal temperature Message-ID: <a40b6d46209f9b5626cd5a147c31daf5d19c9439.1681580558.git.noodles@earth.li> References: <cover.1681580558.git.noodles@earth.li> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <cover.1681580558.git.noodles@earth.li> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763266848535439515?= X-GMAIL-MSGID: =?utf-8?q?1763266848535439515?= |
Series |
Minor device-tree additions for C.H.I.P
|
|
Commit Message
Jonathan McDowell
April 15, 2023, 5:47 p.m. UTC
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 <noodles@earth.li>
---
arch/arm/boot/dts/axp209.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
Comments
On 15/04/2023 19:47, Jonathan McDowell wrote: > This adds a DT node to hook up the internal temperature ADC to the Do not use "This commit/patch", but imperative mood. See: https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95 > 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. Weird choice. > > Signed-off-by: Jonathan McDowell <noodles@earth.li> > --- > 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..f00b5a7ec106 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 > */ > > +/ { > + axp20x_temp { No underscores in node names. Node names should be generic. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + compatible = "iio-hwmon"; > + io-channels = <&axp_adc 4>; /* Internal temperature */ > + }; > +}; > + > &axp209 { > compatible = "x-powers,axp209"; > interrupt-controller; Best regards, Krzysztof
On Sun, Apr 16, 2023 at 09:27:46AM +0200, Krzysztof Kozlowski wrote: > On 15/04/2023 19:47, Jonathan McDowell wrote: > > This adds a DT node to hook up the internal temperature ADC to the > > Do not use "This commit/patch", but imperative mood. See: > https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95 > > > 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. > > Weird choice. You think? I didn't choose the axp20x_ prefix for the others, but it made sense to me that all the sensors from the same device would be identifiable as such. From your comment below it sounds like you'd prefer I use the more generic pmic-temp as the node name? Will do for v2. > > Signed-off-by: Jonathan McDowell <noodles@earth.li> > > --- > > 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..f00b5a7ec106 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 > > */ > > > > +/ { > > + axp20x_temp { > > No underscores in node names. > > Node names should be generic. > https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > > > + compatible = "iio-hwmon"; > > + io-channels = <&axp_adc 4>; /* Internal temperature */ > > + }; > > +}; > > + > > &axp209 { > > compatible = "x-powers,axp209"; > > interrupt-controller; J.
diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi index ca240cd6f6c3..f00b5a7ec106 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 */ +/ { + axp20x_temp { + compatible = "iio-hwmon"; + io-channels = <&axp_adc 4>; /* Internal temperature */ + }; +}; + &axp209 { compatible = "x-powers,axp209"; interrupt-controller;