Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1777220pxb; Fri, 10 Sep 2021 13:46:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeTm2JgkF7fj+9ertecDtBh5cBg2abQkzaqnYKLt/s2yAnisG8QsV3ET628O/7l5XAn1X8 X-Received: by 2002:a92:b301:: with SMTP id p1mr7400869ilh.10.1631306815793; Fri, 10 Sep 2021 13:46:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631306815; cv=none; d=google.com; s=arc-20160816; b=Nfx3gBxvpXS9LJL3pKnvcEHziNB7DrmIPLpcQkImBuii9P/FBajFzb64TeYfOr9cD2 5lPyeJIBAZguFf/AHDPSnI7lZFFn0Dj2BZvZnZ3v2fJ3H/V1mr7Zi/Wezl4OYJH1zdoQ BffBbcedfHE5XUfERItD45MBlWtBb2LORYOfQ9hYxp4nhclHbH11k4VEK9i07uSB6IV1 xtc09Fho47fobUs2LFXqHruQwFky4gslHozo3waJlqaiosUJ/Lwj/kPdBLrti0fM1Nrk UTFowj2e4jYrlor5iQMJoZ4vjPYjlg9ZjxMmV7qeeqHNOSdAc6U0AK84+crxJzRNblpM bpmw== 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=cHZ3QYaJRANd6Qj4KQO6L3SGyASMHRspLs55AF3AwWE=; b=osgPhd6bBwRjxOoaKTkDPAZuxjJFI1GNiII97KIjXA0qM17A6Jeae8AiId1vgtUgIz NtpRb90d4t1FU04KBAr7WWfdyeJydWJGMRO+5HzNZmW8Qto3GdXu3YNdPwrX95Ta9+sT q3At6UbtFTIhPGZ8Xkio7moMoY+zCvraZ809uSSTmJf1U4B/541EnSO6ifVA91+XHV+t F7OCD5w6llcnUZKhFHwGoTQbAxMuNeAUhgRQZy8I8N1Fa5Nr24VRzSZouuFC+GUfz96/ 9QetBI6z4LBWsLEKzuYqnC1cdBfq9Hu9I7a988L+4DKtG8PjmxQyX+A5p/kIYPM0CkA8 XeLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=oWtIVPgv; 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 y9si5558022ilc.12.2021.09.10.13.46.44; Fri, 10 Sep 2021 13:46:55 -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=oWtIVPgv; 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 S234192AbhIJUqY (ORCPT + 99 others); Fri, 10 Sep 2021 16:46:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234187AbhIJUqX (ORCPT ); Fri, 10 Sep 2021 16:46:23 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55A90C061574 for ; Fri, 10 Sep 2021 13:45:12 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id l11so6565297lfe.1 for ; Fri, 10 Sep 2021 13:45:12 -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=cHZ3QYaJRANd6Qj4KQO6L3SGyASMHRspLs55AF3AwWE=; b=oWtIVPgv1HwE7IY8decgYe+XXsapaK71IYNwqcUpFV/X30cjslrTpA8ZgbGCPucza5 DoEpBPO5b7fToKSGi7M2O5K5ck/8zJ9zMbM8zzQBlmjyg/O1hmf2/F/BuxqOdCo9RLX5 CN44zjCWc2H/woem3/Q5Enn77Bu4aroRtduOwkTyHn2xqj8t//BWWJoqF8+C8GsCWQ0N PVxQ6ZfiGKbDhasUfzDG01Pu1kyyKYvA2u+JyT4cBD3NnOR0GmeyFVCGOIMo540r6DJU ebX0YfaIK2l61i263jvT3xncvy4oky11uHJv1kksY766rN8WOxgOF3VD82mhsOnWIslA DxdA== 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=cHZ3QYaJRANd6Qj4KQO6L3SGyASMHRspLs55AF3AwWE=; b=AusE6SqmbgMPKtbOl4PMr1YeSu7TqU7dFXf2C9M4n8mdmsSUGOiOXdRJGIq4jvCMY/ +av8VYzRZNBfSqv0XKBfRGFGo6fqaB7Y76hm62sc/l7LEq7CIfojp07gdWtIYA5sc89k tM66jOBGbG9r92FsjhtUdPsPReP06DX2JBxabbDtSgEQZdieV3icH7YqHN823g38jgxH xD5YaGnpSnjgkaiboFzHKr6MJwfq/ePbm5eEUatlGxWUpaPF7h+kWo8dPhdXW0tdblXu XCyMwgeSvmQ3vLuqXc8iZPDJb2HIUbZCu01glkN5pplkMnuYsQtBBpa/X7GgDtaKTUIj riVQ== X-Gm-Message-State: AOAM531UiUN5ljmzhKTdk095O4JsNusmPYdp5G2ANQVNWyI06Pv83nwd 95CLzzp9mNG0CdKuZuadK5eU3bXm8+E6KT6YqBnRCQ== X-Received: by 2002:a05:6512:3e15:: with SMTP id i21mr5186718lfv.273.1631306710387; Fri, 10 Sep 2021 13:45:10 -0700 (PDT) MIME-Version: 1.0 References: <20210910130337.2025426-1-osk@google.com> <71c17c47-ca9e-e9d2-7b89-cc25b512c06a@roeck-us.net> In-Reply-To: <71c17c47-ca9e-e9d2-7b89-cc25b512c06a@roeck-us.net> From: Oskar Senft Date: Fri, 10 Sep 2021 16:44:54 -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 Thanks for the quick feedback! > > + nuvoton,rtd-modes: > > + description: | > > + Select modes for the three RTDs. > > + > At the very least, "RTD" should be defined. The datasheet doesn't say explicitly, > but I suspect it means "Remote Temperature Diode". Ha, good point. As I understand, RTD means "Resistance Temperature Detector". But TBH, I'm not sure how that squares with Nuvoton's use of "LTD" for the local sensor ... sigh. > > + Valid values for RTD1 and RTD2 are: > > + "closed", > > + "current", > > + "thermistor", > > + "voltage" > I am not sure what "closed" means (the datasheet doesn't say), but I suspect it means > that the sensor is disabled (?). For the other modes, the translation to the standard > ABI is: Thanks for that pointer, I now found that in Documentation/hwmon/sysfs-interface. Given that there's no definition for "disabled", I guess I'll just leave that out of the device tree binding for now? That way we'll stay consistent with the sysfs ABI. That gives us the following mapping for sysfs / device tree -> nct7802 HW: 2 (3904 transistor) -> 3 (voltage) 3 (thermal diode) -> 1 (current) 4 (thermistor) -> 2 (thermistor) I'll update the device tree binding to be an array then. I also update the temp_type functions to support all 3 values. Oskar.