Message ID | 20230921142005.102263-1-antoniu.miclaus@analog.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5196428vqi; Thu, 21 Sep 2023 16:07:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IELbzKutjoUbRWWyOZG6HSKFB6jONBPCkQ9sTLfAQ7TiFCAEPGoP0/ENlyDqaTrhVTZTtBV X-Received: by 2002:a05:6a20:96db:b0:137:fa5:8519 with SMTP id hq27-20020a056a2096db00b001370fa58519mr6319634pzc.31.1695337657616; Thu, 21 Sep 2023 16:07:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695337657; cv=none; d=google.com; s=arc-20160816; b=iy34FEe5eNMo5XGv0zi8Ttven+2/qUHUrgbmT7NFB/KlbFwL5Sbx43bw84GupLQpAi BJowcIkQkkU+c2+kCyp420iDSgdkgj2Qzd2GNzQq+eKRdyC5ObpIQ6sMWRQFncWwiEGa JU/OG1PifUs5iebmGMeEk6AzIAhNtYCT/ZleScPIH+OQfqqs1w9pqNaoEe9o1wvd9Si1 wFhHn8FHP961OVY+R0U9JObkKwvNoIuYBpClfdqLPqYGj0U5BzP74iEKyjkuHMr5Kyjf pVKqHa/p291Qx0KZz+nYuKmxBgU6DKeQIFJdRiPE8ZD6JqHR27b1GkObIbmn0PjAVK0C /g7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=HnZ5O63oybVvs0SoRG1kQdyru1w7cAvY4ndRtSu0fwY=; fh=sA6c4ifE2iquZBa0xFbXVl7qcdCsrwxqtf91K1NtIGA=; b=Umr1JNVqKK7IM+SSe/YOzzY/75LD5LQ6I2MplTgjzCPwmxGlZucf8UtrILy45g8H7v AGGks5GSAKQvm4jTQ0udhgY9Z99WSP/tKuUHSl5YWtpgWOPXGQXilBNc/bqs4oJPwGN5 eIbGVabIbXMU5Vq/6twDzGcMhQKQJ3uCbMoB0ArtE3N3sOwADDMn6dCIIgw6Vs3mr7V5 u3y6LWOeW8uhZeUFDfDHbLYq5Zh+BIC26JmJg25X+2iOttRXBtryBpE+Y9nEbrIxLwuR /E6T3t7wb2Tvu6v3ayUpSyh16/CLtGkkZUC19YWnNzeY0hwvza0fYSFMpr+QgsdUs2je d7tQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id i9-20020a170902c94900b001bdc387b3a3si2753638pla.189.2023.09.21.16.07.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 16:07:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 60C2B8029A3E; Thu, 21 Sep 2023 15:55:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231267AbjIUWzk (ORCPT <rfc822;pwkd43@gmail.com> + 29 others); Thu, 21 Sep 2023 18:55:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231620AbjIUWz3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 21 Sep 2023 18:55:29 -0400 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D213A1533; Thu, 21 Sep 2023 14:03:06 -0700 (PDT) Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 38LBakwG004663; Thu, 21 Sep 2023 10:20:55 -0400 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3t8dv9u6r9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Sep 2023 10:20:55 -0400 (EDT) Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 38LEKs2Z060110 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 21 Sep 2023 10:20:54 -0400 Received: from ASHBCASHYB4.ad.analog.com (10.64.17.132) by ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 21 Sep 2023 10:20:53 -0400 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) by ASHBCASHYB4.ad.analog.com (10.64.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 21 Sep 2023 10:20:53 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Thu, 21 Sep 2023 10:20:53 -0400 Received: from amiclaus-VirtualBox.ad.analog.com (AMICLAUS-L02.ad.analog.com [10.48.65.194]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 38LEKdFV020713; Thu, 21 Sep 2023 10:20:41 -0400 From: Antoniu Miclaus <antoniu.miclaus@analog.com> To: Daniel Matyas <daniel.matyas@analog.com>, Jean Delvare <jdelvare@suse.com>, Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, <linux-hwmon@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org> CC: Antoniu Miclaus <antoniu.miclaus@analog.com> Subject: [PATCH 1/2] dt-bindings: hwmon: max31827: use supply pin name Date: Thu, 21 Sep 2023 17:20:03 +0300 Message-ID: <20230921142005.102263-1-antoniu.miclaus@analog.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-ORIG-GUID: IiLtrQJ7d9N3fDWPIIRz40Som1ECv-oY X-Proofpoint-GUID: IiLtrQJ7d9N3fDWPIIRz40Som1ECv-oY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-21_13,2023-09-21_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=780 bulkscore=0 adultscore=0 mlxscore=0 malwarescore=0 phishscore=0 priorityscore=1501 clxscore=1011 spamscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2309210123 X-Spam-Status: No, score=-0.8 required=5.0 tests=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 pete.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 (pete.vger.email [0.0.0.0]); Thu, 21 Sep 2023 15:55:48 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777690379784870397 X-GMAIL-MSGID: 1777690379784870397 |
Series |
[1/2] dt-bindings: hwmon: max31827: use supply pin name
|
|
Commit Message
Antoniu Miclaus
Sept. 21, 2023, 2:20 p.m. UTC
The actual hardware pin name for the supply of max31827 is vdd.
Update the dt-binding to reflect the hardware properties accordingly.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
Documentation/devicetree/bindings/hwmon/adi,max31827.yaml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On Thu, Sep 21, 2023 at 05:20:03PM +0300, Antoniu Miclaus wrote: > The actual hardware pin name for the supply of max31827 is vdd. > Update the dt-binding to reflect the hardware properties accordingly. Changing this breaks the ABI. I see the old one wasn't used by the driver, but that's just one driver potentially. You need some justification here why it's okay to break the ABI. > > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> > --- > Documentation/devicetree/bindings/hwmon/adi,max31827.yaml | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/hwmon/adi,max31827.yaml b/Documentation/devicetree/bindings/hwmon/adi,max31827.yaml > index 2dc8b07b4d3b..21f2d350373b 100644 > --- a/Documentation/devicetree/bindings/hwmon/adi,max31827.yaml > +++ b/Documentation/devicetree/bindings/hwmon/adi,max31827.yaml > @@ -27,7 +27,7 @@ properties: > reg: > maxItems: 1 > > - vref-supply: > + vdd-supply: > description: > Must have values in the interval (1.6V; 3.6V) in order for the device to > function correctly. > @@ -35,7 +35,7 @@ properties: > required: > - compatible > - reg > - - vref-supply > + - vdd-supply > > additionalProperties: false > > @@ -48,7 +48,7 @@ examples: > temperature-sensor@42 { > compatible = "adi,max31827"; > reg = <0x42>; > - vref-supply = <®_vdd>; > + vdd-supply = <®_vdd>; > }; > }; > ... > -- > 2.42.0 >
> On Thu, Sep 21, 2023 at 05:20:03PM +0300, Antoniu Miclaus wrote: > > The actual hardware pin name for the supply of max31827 is vdd. > > Update the dt-binding to reflect the hardware properties accordingly. > > Changing this breaks the ABI. I see the old one wasn't used by the > driver, but that's just one driver potentially. You need some > justification here why it's okay to break the ABI. > As I mentioned also in the commit description, the supply should match the actual hardware pin name. Otherwise it might create confusion. Usually vref refers to an external voltage reference pin used for ADC/DACs which is not exactly the case for this part, taking into account that there is no "reference" word mentioned in the datasheet at all. VREF and VDD are usually separate hardware pins. There is a hint indeed in the dts example that the vref-supply might be referenced to a vdd regulator node, but from my point of view that is not enough. Moreover the current vref-supply is not handled at all in the driver, it is only mentioned in the dt-binding (That's why I added a second patch in the series handling the supply). If the justification is not enough to apply this change, then I can keep only the second patch, which handles the regulator in the driver and use the old `vref` naming which currently appears only in the dt-binding. Antoniu > > > > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> > > --- > > Documentation/devicetree/bindings/hwmon/adi,max31827.yaml | 6 +++-- > - > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git > a/Documentation/devicetree/bindings/hwmon/adi,max31827.yaml > b/Documentation/devicetree/bindings/hwmon/adi,max31827.yaml > > index 2dc8b07b4d3b..21f2d350373b 100644 > > --- a/Documentation/devicetree/bindings/hwmon/adi,max31827.yaml > > +++ b/Documentation/devicetree/bindings/hwmon/adi,max31827.yaml > > @@ -27,7 +27,7 @@ properties: > > reg: > > maxItems: 1 > > > > - vref-supply: > > + vdd-supply: > > description: > > Must have values in the interval (1.6V; 3.6V) in order for the device to > > function correctly. > > @@ -35,7 +35,7 @@ properties: > > required: > > - compatible > > - reg > > - - vref-supply > > + - vdd-supply > > > > additionalProperties: false > > > > @@ -48,7 +48,7 @@ examples: > > temperature-sensor@42 { > > compatible = "adi,max31827"; > > reg = <0x42>; > > - vref-supply = <®_vdd>; > > + vdd-supply = <®_vdd>; > > }; > > }; > > ... > > -- > > 2.42.0 > >
On Sat, Sep 23, 2023 at 02:19:45PM +0000, Miclaus, Antoniu wrote: > > > > On Thu, Sep 21, 2023 at 05:20:03PM +0300, Antoniu Miclaus wrote: > > > The actual hardware pin name for the supply of max31827 is vdd. > > > Update the dt-binding to reflect the hardware properties accordingly. > > > > Changing this breaks the ABI. I see the old one wasn't used by the > > driver, but that's just one driver potentially. You need some > > justification here why it's okay to break the ABI. > > > As I mentioned also in the commit description, the supply should match the > actual hardware pin name. Otherwise it might create confusion. Usually vref > refers to an external voltage reference pin used for ADC/DACs which is not > exactly the case for this part, taking into account that there is no "reference" > word mentioned in the datasheet at all. VREF and VDD are usually separate > hardware pins. There is a hint indeed in the dts example that the vref-supply > might be referenced to a vdd regulator node, but from my point of view > that is not enough. Moreover the current vref-supply is not handled at all in > the driver, it is only mentioned in the dt-binding (That's why I added a second > patch in the series handling the supply). > > If the justification is not enough to apply this change, then I can keep only the > second patch, which handles the regulator in the driver and use the old `vref` > naming which currently appears only in the dt-binding. > That would have been a good argument when the property was introduced, but if there are any systems with existing bindings out there they will use the old name and fail after this change is applied. I don't thnk it is mandated that every system in the world would publish their devicetree bindings in the kernel. That would not scale. So any argument along the line of "this binding is not used" is not really a valid argument. Guenter
On Sun, 2023-09-24 at 05:02 -0700, Guenter Roeck wrote: > On Sat, Sep 23, 2023 at 02:19:45PM +0000, Miclaus, Antoniu wrote: > > > > > > > On Thu, Sep 21, 2023 at 05:20:03PM +0300, Antoniu Miclaus wrote: > > > > The actual hardware pin name for the supply of max31827 is vdd. > > > > Update the dt-binding to reflect the hardware properties accordingly. > > > > > > Changing this breaks the ABI. I see the old one wasn't used by the > > > driver, but that's just one driver potentially. You need some > > > justification here why it's okay to break the ABI. > > > > > As I mentioned also in the commit description, the supply should match the > > actual hardware pin name. Otherwise it might create confusion. Usually vref > > refers to an external voltage reference pin used for ADC/DACs which is not > > exactly the case for this part, taking into account that there is no "reference" > > word mentioned in the datasheet at all. VREF and VDD are usually separate > > hardware pins. There is a hint indeed in the dts example that the vref-supply > > might be referenced to a vdd regulator node, but from my point of view > > that is not enough. Moreover the current vref-supply is not handled at all in > > the driver, it is only mentioned in the dt-binding (That's why I added a second > > patch in the series handling the supply). > > > > If the justification is not enough to apply this change, then I can keep only the > > second patch, which handles the regulator in the driver and use the old `vref` > > naming which currently appears only in the dt-binding. > > > > That would have been a good argument when the property was introduced, but if > there are any systems with existing bindings out there they will use the old > name and fail after this change is applied. > How about introducing the new property and add 'deprecated: true' to the old one. I guess the second patch would still remain as-is. Or is this just not worth the noise? - Nuno Sá
> On Sat, Sep 23, 2023 at 02:19:45PM +0000, Miclaus, Antoniu wrote: > > > > > > > On Thu, Sep 21, 2023 at 05:20:03PM +0300, Antoniu Miclaus wrote: > > > > The actual hardware pin name for the supply of max31827 is vdd. > > > > Update the dt-binding to reflect the hardware properties accordingly. > > > > > > Changing this breaks the ABI. I see the old one wasn't used by the > > > driver, but that's just one driver potentially. You need some > > > justification here why it's okay to break the ABI. > > > > > As I mentioned also in the commit description, the supply should match the > > actual hardware pin name. Otherwise it might create confusion. Usually > vref > > refers to an external voltage reference pin used for ADC/DACs which is not > > exactly the case for this part, taking into account that there is no > "reference" > > word mentioned in the datasheet at all. VREF and VDD are usually separate > > hardware pins. There is a hint indeed in the dts example that the vref- > supply > > might be referenced to a vdd regulator node, but from my point of view > > that is not enough. Moreover the current vref-supply is not handled at all in > > the driver, it is only mentioned in the dt-binding (That's why I added a > second > > patch in the series handling the supply). > > > > If the justification is not enough to apply this change, then I can keep only > the > > second patch, which handles the regulator in the driver and use the old > `vref` > > naming which currently appears only in the dt-binding. > > > > That would have been a good argument when the property was introduced, > but if > there are any systems with existing bindings out there they will use the old > name and fail after this change is applied. > > I don't thnk it is mandated that every system in the world would publish their > devicetree bindings in the kernel. That would not scale. So any argument > along > the line of "this binding is not used" is not really a valid argument. > > Guenter Will keep then only the second patch which targets the driver. Thanks for the feedback!
diff --git a/Documentation/devicetree/bindings/hwmon/adi,max31827.yaml b/Documentation/devicetree/bindings/hwmon/adi,max31827.yaml index 2dc8b07b4d3b..21f2d350373b 100644 --- a/Documentation/devicetree/bindings/hwmon/adi,max31827.yaml +++ b/Documentation/devicetree/bindings/hwmon/adi,max31827.yaml @@ -27,7 +27,7 @@ properties: reg: maxItems: 1 - vref-supply: + vdd-supply: description: Must have values in the interval (1.6V; 3.6V) in order for the device to function correctly. @@ -35,7 +35,7 @@ properties: required: - compatible - reg - - vref-supply + - vdd-supply additionalProperties: false @@ -48,7 +48,7 @@ examples: temperature-sensor@42 { compatible = "adi,max31827"; reg = <0x42>; - vref-supply = <®_vdd>; + vdd-supply = <®_vdd>; }; }; ...