From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9620BC433F5 for ; Fri, 24 Sep 2021 15:37:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7FAAA61212 for ; Fri, 24 Sep 2021 15:37:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347156AbhIXPiz (ORCPT ); Fri, 24 Sep 2021 11:38:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233132AbhIXPiz (ORCPT ); Fri, 24 Sep 2021 11:38:55 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2433C061571 for ; Fri, 24 Sep 2021 08:37:21 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id b15so41027318lfe.7 for ; Fri, 24 Sep 2021 08:37:21 -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=WIiXg3KWNaaiadXRiJALyTJvpk2NlOpsDMLooSBe0Uo=; b=SXmJjR1n5wGvVPsrifQ2Jio7TAw9SW+N1v34qSobYed1m5T7cHjTMDI+G7VW1c3sNP a4YdsMHoSpgoG1aXNjtzkA11KaW0L15W9Tykm7EhCZBKZUZMxI9m1/qV8aLIoaqWRu5H MDM4VibqWSmSuf0FWvQUOH4ttjLkBHJQsFWLLSxYQCwrHCoFeAVM7KGXrB+lc/n0gkdU 1QxzXepRD/6foOX0P/ItJo882340UfIr0S89TDu47mVRGVaAfrcwjWmFucySgibFH4o1 24NY+Qzv352XkbHqCmB+vTEX/EzJFY7XbqKfE2jJOpiu5CHXtXI6C2lSXHkl/1NefcvL l1ZA== 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=WIiXg3KWNaaiadXRiJALyTJvpk2NlOpsDMLooSBe0Uo=; b=t5fhrCeXldSm82sE1i82YVHhJo1bBGgXPQbks20eEfvdsC24b3POZcNF7NqNN9WcK4 n/JJN1PECa5LQQmf1JqMuNVnGGv9+4JiCGAnwbkdnq/6XyWlLXxNaR5YsDi4nABHfiV1 kOiP3qQHA0WP9bzu/Lho11iKC/zFEPp1JmTvLv7tvGrKEE6W7ErrmoFizjmgiOhHFRUp 0g+qYWWBtrhC3TLTqf9IkA9hQ6hDPaM1maT+rP+0OKAD470q7xXfEP38tFsMJ0t23c3x 4Wo5naatobVkfXY71S0g1oB6DZ4p278s10rvhJuEaMX0O0orxbWPMeG+BrOMVIFskaOp E7VA== X-Gm-Message-State: AOAM531BBV80VuLnoonpKphVt1iFBp0zMKcig+Btgens6pgX+FqGjjii SInqU+Yh/XKLYmMiKyl3XKqHs5qfwAsodJAgjlfqGA== X-Google-Smtp-Source: ABdhPJxnIuFkBBR/oG3fA3A1Sqyr0X/E+ybkFh48ZTX9iQb69fKdVYVuH/Eh2PqTNZ+krPCdDyaRZmtnlGiHZ2nQaCE= X-Received: by 2002:a05:651c:178e:: with SMTP id bn14mr12222808ljb.521.1632497836908; Fri, 24 Sep 2021 08:37:16 -0700 (PDT) MIME-Version: 1.0 References: <12984255aac11a3edfc0e6278e1a1cac70ce97ec.1631021349.git.krzysztof.adamski@nokia.com> <20210921125831.GB1864238@roeck-us.net> <20210921205247.GA2363535@roeck-us.net> <20210924002951.GA3027924@roeck-us.net> <20210924114636.GB2694238@roeck-us.net> In-Reply-To: <20210924114636.GB2694238@roeck-us.net> From: Oskar Senft Date: Fri, 24 Sep 2021 11:37:00 -0400 Message-ID: Subject: Re: [PATCH 8/8] dt-bindings: hwmon: allow specifying channels for tmp421 To: Guenter Roeck , Krzysztof Adamski Cc: Rob Herring , Jean Delvare , Linux HWMON List , devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org > > In many cases the channels are "shared" - we have 3 voltage, 3 current and 3 > > power sensors but in fact they are not separate sensors but 3 channels > > each able to measure 3 different things and they may share some common > > properties in each channel (so current, voltage and power may be > > calculated bases on the same shunt resistor or correction factor). An > > example being adi,ltc2992. In those cases it doesn't make sense to have > > two levels as how would you describe the shared parent? Call it generic > > "channels"? So in that case (e.g. for the nct7802, see [1]) do we want just 1-level, maybe like this: nct7802@28 { compatible = "nuvoton,nct7802"; reg = <0x28>; sensor@1 { /* RTD1 */ reg = <0x1>; status = "okay"; mode = "thermistor"; /* Any of "thermistor", "thermal-diode", "voltage" */ }; sensor@2 { /* RTD2 */ reg = <0x2>; status = "okay"; mode = "thermal-diode"; /* Any of "thermistor", "thermal-diode", "voltage" */ }; sensor@3 { /* RTD3 */ reg = <0x3>; status = "okay"; mode = "voltage"; /* Any of "thermistor", "voltage" */ }; sensor@4 { /* LTD */ reg = <0x4>; /* using the same number as in sysfs */ status = "okay"; /* No mode configuration for LTD */ }; }; In this example, RTD1, RTD2 and LTD would be temperature sensors and RTD3 would be a voltage sensor. Would that make more sense? Is the use of strings acceptable? Thanks Oskar. [1] https://lore.kernel.org/all/20210921004627.2786132-1-osk@google.com/