Message ID | 20231025-ina237-v1-4-a0196119720c@linux.dev |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2503181vqx; Wed, 25 Oct 2023 03:36:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGVE4nTRvW/s3FKD41JjZpPQKeZ/6AgXBFpIsHJpKC1CeCmx1KrQTwQoeAbtq9NL1COVmkl X-Received: by 2002:a05:6122:178f:b0:495:3d9d:535c with SMTP id o15-20020a056122178f00b004953d9d535cmr14952771vkf.4.1698230187318; Wed, 25 Oct 2023 03:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698230187; cv=none; d=google.com; s=arc-20160816; b=UbFwGhkDaeF3R2HkqzPch1uSI4EZ2yvicbCyD780dLSBoNV8uj+bFfpa4BqFzI98mm hjm5tQJvx7yqrPF09hdBHr1UateBeDh+omzj5GP6PSwOfOEtZD+R7NTJn14uqlXx8BrJ jlKhc6GtzzWRHQlB8m3ZtobfYDRiIiKzUIFxEs6+iJjpWAI+a1AjNuAEbzHuGHJ4fqwO EYsbeHJanBrRbOTmevMMXbUdc975mdyCbbvyMW++Xk8hGbN5NcU/lreKpoZr07C9VqyE TVHdvaB69C+M54BrqDttUwcG/BwrJ0L5CuxTdK1SfSaFv75l6B91byQmEvM9qx3PZrwS MMBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=sQ9Uo8YsVmHuGQTV4xR5AWSkbxykNAnnRGGq4p/MoWc=; fh=lhNkkbLm/HIJ1PE6fjk142ayDM14yYFU7I5GsZU8FkM=; b=A9p39sPz5rjSnG3DcgygidDuvGY9qsT6pQuE2wh9yKvkQaPu5W8AjBdyjkk7+qEXnf FoDUTaadgTIOhK74Y/xKgb5JxV/8mHSlW6wJSN9Iam/9kHKIYVtjm8R2qsxN19YCKBtH je4HhZ9GWuXmrpB1t57TyXxTYtXH2MI3SX9AXikdZmX9qkhndJFBmqEJAlyEmXOcOd9t TKF/LYIGBjeWvepGfTcQymdkRyCBnWJgtlPlZOgQrIdMLl8sLsv3KEiJsKXe7iEZdd/l DqkJRG6/6u+XBsykGsCeH/Fw6J4NvNQrZ2/Us/9nHSGC3xMA32xOjK+cffOXRQhI76Ah a+ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=korg header.b=0Z1BfXWg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id u11-20020a81a50b000000b0059b3e22e6d2si10748144ywg.154.2023.10.25.03.36.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 03:36:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=korg header.b=0Z1BfXWg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 39387809477B; Wed, 25 Oct 2023 03:36:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343622AbjJYKfk (ORCPT <rfc822;aposhian.dev@gmail.com> + 26 others); Wed, 25 Oct 2023 06:35:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234617AbjJYKfC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 25 Oct 2023 06:35:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5298C1719; Wed, 25 Oct 2023 03:34:50 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPS id 75C4AC433AD; Wed, 25 Oct 2023 10:34:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.dev; s=korg; t=1698230089; bh=2UlV2SAeLThisZx2CDUzVQIsXFCsdphm0WX5MqF/paA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=0Z1BfXWgfx5rvEQovfZHR5PrOerqx9mtKj0gvUKkZkvLL/uGDjnqG7M8qQEBqsGWE FBRvTxMCS6UaSA6UX29G/K9+PczmVEOaeELWTjn0aGlf2dtH/1OKCeP6tTf+4GlS95 +t0vUgeDr1AUmkRnqwma+kPTgNod/r0EHNBtZFRs= Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 599C7C25B6F; Wed, 25 Oct 2023 10:34:49 +0000 (UTC) From: Richard Leitner <richard.leitner@linux.dev> Date: Wed, 25 Oct 2023 10:34:14 +0000 Subject: [PATCH 4/4] dt-bindings: hwmon: ti,ina238: add ti,ina237 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231025-ina237-v1-4-a0196119720c@linux.dev> References: <20231025-ina237-v1-0-a0196119720c@linux.dev> In-Reply-To: <20231025-ina237-v1-0-a0196119720c@linux.dev> To: Guenter Roeck <linux@roeck-us.net>, Jean Delvare <jdelvare@suse.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org> Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, Richard Leitner <richard.leitner@linux.dev> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1698230088; l=666; i=richard.leitner@linux.dev; s=20231025; h=from:subject:message-id; bh=2UlV2SAeLThisZx2CDUzVQIsXFCsdphm0WX5MqF/paA=; =?utf-8?q?b=3DqVMEmSxVR/Bx?= =?utf-8?q?f6+PrpumfMpyFJL40+yFqvVmuDr8yuDujWEFxZ2CGxoNMGcrHJR8tHp9Rf4n02pU?= YDhZzYxyBzu4oeagPUqVG4mczsszD7wqGMgouzCpDI++hLYnLHSe X-Developer-Key: i=richard.leitner@linux.dev; a=ed25519; pk=ZYa5+0m9RFYtnNU6DLet7sHyPehnVHa0ucJlYiAu2NU= X-Endpoint-Received: by B4 Relay for richard.leitner@linux.dev/20231025 with auth_id=90 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 25 Oct 2023 03:36:16 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780723416650219954 X-GMAIL-MSGID: 1780723416650219954 |
Series |
hwmon: add ti,ina237 support to ina238 driver
|
|
Commit Message
Richard Leitner
Oct. 25, 2023, 10:34 a.m. UTC
Add ti,ina237 binding to ti,ina238 as they share the same driver.
Signed-off-by: Richard Leitner <richard.leitner@linux.dev>
---
Documentation/devicetree/bindings/hwmon/ti,ina238.yaml | 1 +
1 file changed, 1 insertion(+)
Comments
On Wed, Oct 25, 2023 at 10:34:14AM +0000, Richard Leitner wrote: > Add ti,ina237 binding to ti,ina238 as they share the same driver. > > Signed-off-by: Richard Leitner <richard.leitner@linux.dev> > --- > Documentation/devicetree/bindings/hwmon/ti,ina238.yaml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml > index aba89e5f34b3..17408076696c 100644 > --- a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml > +++ b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml > @@ -22,6 +22,7 @@ description: | > properties: > compatible: > enum: > + - ti,ina237 The driver patch you have done implies no difference between the programming model for both of these devices. It'd seem to make more sense for the ina237 to fall back to the ina238, thereby requiring no change in the driver to support it. Cheers, Conor. > - ti,ina238 > > reg: > > -- > 2.40.1 >
On Wed, Oct 25, 2023 at 02:58:44PM +0100, Conor Dooley wrote: > On Wed, Oct 25, 2023 at 10:34:14AM +0000, Richard Leitner wrote: > > Add ti,ina237 binding to ti,ina238 as they share the same driver. > > > > Signed-off-by: Richard Leitner <richard.leitner@linux.dev> > > --- > > Documentation/devicetree/bindings/hwmon/ti,ina238.yaml | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml > > index aba89e5f34b3..17408076696c 100644 > > --- a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml > > +++ b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml > > @@ -22,6 +22,7 @@ description: | > > properties: > > compatible: > > enum: > > + - ti,ina237 > > The driver patch you have done implies no difference between the > programming model for both of these devices. It'd seem to make more sense > for the ina237 to fall back to the ina238, thereby requiring no change in > the driver to support it. Thanks for the quick feedback, Conor. I first thought of just mentioning the ina237 in the documentation as "compatible" to the ina238. But IMHO it is better understandable if it's listed as compatible. And I would strongly encourage mentioning it somewhere (documentation or compatible). So other people using the ina237 are able to find it and don't have to compare the datasheets by themselves to find the right driver. > > Cheers, > Conor. > > > - ti,ina238 > > > > reg: > > > > -- > > 2.40.1 > >
On 25/10/2023 16:13, Richard Leitner wrote: > On Wed, Oct 25, 2023 at 02:58:44PM +0100, Conor Dooley wrote: >> On Wed, Oct 25, 2023 at 10:34:14AM +0000, Richard Leitner wrote: >>> Add ti,ina237 binding to ti,ina238 as they share the same driver. >>> >>> Signed-off-by: Richard Leitner <richard.leitner@linux.dev> >>> --- >>> Documentation/devicetree/bindings/hwmon/ti,ina238.yaml | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml >>> index aba89e5f34b3..17408076696c 100644 >>> --- a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml >>> +++ b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml >>> @@ -22,6 +22,7 @@ description: | >>> properties: >>> compatible: >>> enum: >>> + - ti,ina237 >> >> The driver patch you have done implies no difference between the >> programming model for both of these devices. It'd seem to make more sense >> for the ina237 to fall back to the ina238, thereby requiring no change in >> the driver to support it. > > Thanks for the quick feedback, Conor. > > I first thought of just mentioning the ina237 in the documentation as > "compatible" to the ina238. But IMHO it is better understandable if it's > listed as compatible. Conor did not oppose listing it. The point is to use fall-back. > > And I would strongly encourage mentioning it somewhere (documentation or > compatible). So other people using the ina237 are able to find it and > don't have to compare the datasheets by themselves to find the right > driver. Sure, there is plenty of space in the driver code (.c or Kconfig) to document whatever you wish. We focus here on the bindings, though. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml index aba89e5f34b3..17408076696c 100644 --- a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml +++ b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml @@ -22,6 +22,7 @@ description: | properties: compatible: enum: + - ti,ina237 - ti,ina238 reg: