Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp639647pxb; Tue, 14 Sep 2021 05:44:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSet0m9ezsYWC3id40R0mMNJp2ZJkKz1o1U1EK9p75kHscrs0WpM+hajxy5l+2pwNO8YH2 X-Received: by 2002:a2e:7814:: with SMTP id t20mr15176081ljc.13.1631623462524; Tue, 14 Sep 2021 05:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631623462; cv=none; d=google.com; s=arc-20160816; b=wtnqz9XS0P8OzTRsbWKGtVaVd9z0B5+vW/wLM4+M72Mh89KimvrLRWZMohsrpyZCH6 J44WduGP/cV+swx2NdAWt9hP7Xuu+H9cGCHb/EtszYvYO3HB8DB86YZAWcCIc0DgqjkF LGqZqEJGWTXd3P8Dg3ruTdJyQBMG0iwkvWijA36HelxN/wgs4dxZxJrdJ2Cfguh01wQ2 OQcJgxXScaBfIQZWJoj3EATVwj6u8nTltXOdfonXvrEbfl2EealQb0+oxiwnK48oThW0 jnSmqGMlrl2xvr77sjpGa/tchbpW6xMsFfSFd8nu3dQyZVbDJMV857k2Vc2r6iIj3xyj q8/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=4g2Wav+SkEq7UdYNbmRHcmC3tflY4E5NwVgSGxv7C8A=; b=Wh/iVwMZ4xutKv/e8a6lxOuHO86a/tMN5/LPj74FrcqbqdYuM4deZtP/howjGycWpJ 4v0QDm888OyAwfhvpCxtMfI5zk3mSQzVFuW76nHM/d0jK8vmjSrctrZ533AzLgJ9enVI N2OvDQgyvmp5y1NK0mRvchV49+L9JWEA1iJSrctdbyLPYAcbBDxmg67IOwW1j9XyLG6j JICtwv/aOTe+bh3VJBxJnh5J13digdJ7Q7xCEL7MaeYL5AZbFXjGBvSkqmcgazYY6V8l /b/RjOeXZhhwuUAUi4spPZj71u9XjWeTZLOp2/HDMCxJ59xa+fnVaVmafJ6R1zUPRO3A 3kqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qOHx8aC8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bp20si14043440lfb.242.2021.09.14.05.43.53; Tue, 14 Sep 2021 05:44:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qOHx8aC8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232804AbhINMnN (ORCPT + 99 others); Tue, 14 Sep 2021 08:43:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232920AbhINMnM (ORCPT ); Tue, 14 Sep 2021 08:43:12 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC966C061762 for ; Tue, 14 Sep 2021 05:41:54 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id s3so23556314ljp.11 for ; Tue, 14 Sep 2021 05:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4g2Wav+SkEq7UdYNbmRHcmC3tflY4E5NwVgSGxv7C8A=; b=qOHx8aC8BMjVfANULofMofo+Gn7EYmEyRD60TzkLTAglNPJTgUY6AhDhJDlsuNmUVP pXebtude00R9h0Np8DdVymybtPF6dYn5KcOfOMieN3ierydKjpSoQ3Ugm2L/Jv9GCMLG r8sWnElZ+XaBahtw2lCd+4w85Iy0b0x6lklsk926EE3SUMXZRh5zKDz7x73nYKXUbAdt oUkOddNJ6tJ15SieBfeBTGwdRHmoLxSp4LsdwD0hLo29Eze7Zk9SCmSoncJ0PNmbWJNq D0tjsH/QLcoS5vJdmTG4hztbNWnUBcOI1chBAFAO1tfCQvTAr+hRZNi1yBv838898FJr D/6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4g2Wav+SkEq7UdYNbmRHcmC3tflY4E5NwVgSGxv7C8A=; b=5N2hrDqdITwFpCYklvIOs/IFINdru+PONcRslzU/JbA+nhs8ceWPny+5rTpH73Yq2J WHUTdDU9XuQcX3pHKNoYZYK6F1Ryaf1j0+pbn2l/ZCAjm/7k8ywjachcQaIZbMSMXenU FbwmxfneDbwTZta6LiZOwxN/B6m45H97ia5bjoqMomoUuAUf/SEnIBciT5lOrtqWe+xw egS5ZTp7YD1Nm+c3/+iF4hoCfXydui5k9lVhmQGPcXanWkYL+7NnYSCDA/0O/EQtK4K6 xcLWLKHSC8OD4RUEqW4/CIZA6dPDg/15MesnZ8VonX4sMfOah8DeghInTFhviGx3Hn0s MXMg== X-Gm-Message-State: AOAM5305ZrNDdQTnKBcOs2IPfeTnm2SgW3UpRv0Z39x+VGDRPoHWw9Ra VY1SFrXvBUGbvP16YjWYF6og5GKFhhN88rxYWdKEPNx0mFdBrVNx X-Received: by 2002:a05:651c:1505:: with SMTP id e5mr15210748ljf.9.1631623312789; Tue, 14 Sep 2021 05:41:52 -0700 (PDT) MIME-Version: 1.0 References: <20210910130337.2025426-1-osk@google.com> <71c17c47-ca9e-e9d2-7b89-cc25b512c06a@roeck-us.net> <722b27f6-4390-9b5b-f6f2-75ce9e967d12@roeck-us.net> In-Reply-To: <722b27f6-4390-9b5b-f6f2-75ce9e967d12@roeck-us.net> From: Oskar Senft Date: Tue, 14 Sep 2021 08:41:36 -0400 Message-ID: Subject: Re: [PATCH] dt-bindings: hwmon: Add nct7802 bindings To: Guenter Roeck Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jean Delvare , Rob Herring Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Guenter > https://lore.kernel.org/linux-hwmon/cover.1631021349.git.krzysztof.adamski@nokia.com/ > > That specifically includes the ability to enable or disable channels > using the standard 'status' property. While that series is primarily > for the n-factor property supported by the tmp421, the same approach > can be used for [temperature] sensor properties on other chips as well. Good pointer! I should be able to replicate that for the LTD (@0) and RTDs (1, 2, 3) in a similar way. > I put [temperature] in [] because we'd need to find a means to express > if the sub-nodes are for temperature, voltage, or something else, but > I think the basic principle is sound. Following the example from tmp421, this could then be like this: i2c { #address-cells = <1>; #size-cells = <0>; nct7802@28 { compatible = "nuvoton,nct7802"; reg = <0x28>; #address-cells = <1>; #size-cells = <0>; /* LTD */ input@0 { reg = <0x0>; status = "okay"; /* No "mode" attribute here*/ label = "local temp"; }; /* RTD1 */ input@1 { reg = <0x1>; mode = <0x2>; /* 3904 transistor */ label = "voltage mode"; }; input@2 { reg = <0x2>; mode = <0x4>; /* thermistor */ label = "thermistor mode"; }; /* RTD3 */ input@3 { reg = <0x3>; mode = <0x3>; /* thermal diode */ label = "current mode"; status = "disabled"; }; }; }; I noticed that "nct7802_temp_is_visible" only allows the temperature sensor to be visible for current and thermistor but not voltage. Is that right? Before I go and change the driver further, I'd like to make sure we agree on the interface. Also: Is nct7802_temp_is_visible called again after temp_type_store was called (I didn't try it)? Thanks Oskar.