Message ID | 20230118063822.14521-3-okan.sahin@analog.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2195189wrn; Tue, 17 Jan 2023 23:36:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXsWV0rQLyZNysu4Dg9fWHBOSAa44NvkALw5q31+vD2NuycHDPhat7VhguzDLlnjb3Z46tzO X-Received: by 2002:a17:907:8b09:b0:873:2612:e12c with SMTP id sz9-20020a1709078b0900b008732612e12cmr5237602ejc.21.1674027392704; Tue, 17 Jan 2023 23:36:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674027392; cv=none; d=google.com; s=arc-20160816; b=OFyUfQnA5QOXleufn7VbwsrIz2BdGgprwoHONv5udy1D4nmPQtWt/mPPlE6rbdKNFE iDhZqTE2Hq5kkQglVJYvznF9qNb9muWL6FVPFoZb9g9mmWRt7ovJ/A3+h1FjcP73CPhr 9jKF6VtoJGqWzKLInRVOoRxV8LX2HHcFAbKxPpjs+bi51KOwuhrSH4g9T2yRo+k658jp BFAVxYfrDefg6yJhhOEQRRgFYcpQMj5AQcGb+qKwSXZmLquup6V8TyWTkPbUeZp3tEi8 sAZTGrd4SSAR4SwyRhRc1jqJ6OGcwG8CKDAOrfhXlewCc3PG6Dn1o4tuGz4vtIgONDNj gECQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=nplG1POEjoMUXbnSRMHvvCc+zEJGeO//3yq3iHJJJXc=; b=glNBf+Ik6BhSl9Viw/g84f7rtiU93z1vS77foY/xmg9u//PGVBINeMucr5q8nI8AAw 0HzbDyVTA9K+fM3yq2MGBUvwwE9rCMsEtrVJtskJi6KVS2uEXtVfnwPx4TjV09xjxIAt iIMfEHJtKToAMcNgNV7ToeyU6AH9lmVfKMlJi7Au5Rv4eKI9dqO+6cIjbOeaWEy89mii NgdVvIdWVgcMgtrKt2EXCpxKeRS/FesNiNsj9D13aSwGi9Ya3UBx/83YkMoSPWRD/Ct0 Z7J2cLnM4daa2j52Ro823YBDr44cKiucCk6I/lN4MTZtZ6GkSBKLu+pjEPckISs6MSyK IN2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du1-20020a17090772c100b0080f0493b9c8si39460627ejc.536.2023.01.17.23.36.08; Tue, 17 Jan 2023 23:36:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229775AbjARHSC (ORCPT <rfc822;pfffrao@gmail.com> + 99 others); Wed, 18 Jan 2023 02:18:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230037AbjARHQq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 18 Jan 2023 02:16:46 -0500 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 353BE5B59A; Tue, 17 Jan 2023 22:40:29 -0800 (PST) Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30I4em6d024711; Wed, 18 Jan 2023 01:40:12 -0500 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3n6048mc7s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Jan 2023 01:40:12 -0500 Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 30I6eBi7002678 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 18 Jan 2023 01:40:11 -0500 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; Wed, 18 Jan 2023 01:40:10 -0500 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) 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; Wed, 18 Jan 2023 01:40:09 -0500 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Wed, 18 Jan 2023 01:40:09 -0500 Received: from okan.localdomain ([10.158.40.55]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 30I6ccUt005042; Wed, 18 Jan 2023 01:39:53 -0500 From: Okan Sahin <okan.sahin@analog.com> To: <okan.sahin@analog.com> CC: Lee Jones <lee@kernel.org>, Rob Herring <robh+dt@kernel.org>, "Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Jonathan Cameron <jic23@kernel.org>, Lars-Peter Clausen <lars@metafoo.de>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Caleb Connolly <caleb.connolly@linaro.org>, Marcus Folkesson <marcus.folkesson@gmail.com>, Ramona Bolboaca <ramona.bolboaca@analog.com>, William Breathitt Gray <william.gray@linaro.org>, ChiYuan Huang <cy_huang@richtek.com>, <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-iio@vger.kernel.org> Subject: [PATCH v3 2/5] dt-bindings: mfd: Add ADI MAX77541/MAX77540 Date: Wed, 18 Jan 2023 09:38:09 +0300 Message-ID: <20230118063822.14521-3-okan.sahin@analog.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230118063822.14521-1-okan.sahin@analog.com> References: <20230118063822.14521-1-okan.sahin@analog.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: _p4AJKZ8iURkrSgALAzN46vnIqB6HLlJ X-Proofpoint-ORIG-GUID: _p4AJKZ8iURkrSgALAzN46vnIqB6HLlJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-18_01,2023-01-17_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=991 suspectscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 phishscore=0 clxscore=1011 spamscore=0 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301180057 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755344947575229553?= X-GMAIL-MSGID: =?utf-8?q?1755344947575229553?= |
Series |
Add MAX77541/MAX77540 PMIC Support
|
|
Commit Message
Sahin, Okan
Jan. 18, 2023, 6:38 a.m. UTC
Add ADI MAX77541/MAX77540 devicetree document.
Signed-off-by: Okan Sahin <okan.sahin@analog.com>
---
.../devicetree/bindings/mfd/adi,max77541.yaml | 87 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 88 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/adi,max77541.yaml
Comments
On 18/01/2023 07:38, Okan Sahin wrote: > Add ADI MAX77541/MAX77540 devicetree document. > > Signed-off-by: Okan Sahin <okan.sahin@analog.com> > --- > .../devicetree/bindings/mfd/adi,max77541.yaml | 87 +++++++++++++++++++ > MAINTAINERS | 1 + > 2 files changed, 88 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mfd/adi,max77541.yaml > > diff --git a/Documentation/devicetree/bindings/mfd/adi,max77541.yaml b/Documentation/devicetree/bindings/mfd/adi,max77541.yaml > new file mode 100644 > index 000000000000..91d15e9ca2e3 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mfd/adi,max77541.yaml > @@ -0,0 +1,87 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mfd/adi,max77541.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MAX77540/MAX77541 PMIC from ADI > + > +maintainers: > + - Okan Sahin <okan.sahin@analog.com> > + > +description: | > + MAX77540 is a Power Management IC with 2 buck regulators. > + > + MAX77541 is a Power Management IC with 2 buck regulators and 1 ADC. > + > +properties: > + compatible: > + enum: > + - adi,max77540 > + - adi,max77541 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + regulators: > + $ref: /schemas/regulator/adi,max77541-regulator.yaml# No improvements regarding bisectability - this patch fails. If you tested this patch, you would see it. Instead of ignoring comments, either implement them or ask for clarification. > + > +required: > + - compatible > + - reg > + - interrupts > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: adi,max77540 > + then: > + properties: > + regulator: You do not have 'regulator' property. > + properties: > + compatible: > + const: adi,max77540-regulator > + else: > + properties: > + regulator: Same problem. > + properties: > + compatible: > + const: adi,max77541-regulator > + > +additionalProperties: false > + Best regards, Krzysztof
On Wed, 18 Jan 2023 09:38:09 +0300, Okan Sahin wrote: > Add ADI MAX77541/MAX77540 devicetree document. > > Signed-off-by: Okan Sahin <okan.sahin@analog.com> > --- > .../devicetree/bindings/mfd/adi,max77541.yaml | 87 +++++++++++++++++++ > MAINTAINERS | 1 + > 2 files changed, 88 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mfd/adi,max77541.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: ./Documentation/devicetree/bindings/mfd/adi,max77541.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/regulator/adi,max77541-regulator.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/adi,max77541.example.dtb: pmic@69: regulators: False schema does not allow {'buck1': {'regulator-min-microvolt': [[500000]], 'regulator-max-microvolt': [[5200000]], 'regulator-boot-on': True, 'regulator-always-on': True}, 'buck2': {'regulator-min-microvolt': [[500000]], 'regulator-max-microvolt': [[5200000]], 'regulator-boot-on': True, 'regulator-always-on': True}} From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/adi,max77541.yaml doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230118063822.14521-3-okan.sahin@analog.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Hi Krzysztof, Thank you for your feedback and efforts. There is something that confuses me so I would like to ask below On Wed, 18 Jan 2023 11:23 AM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: >On 18/01/2023 07:38, Okan Sahin wrote: >> Add ADI MAX77541/MAX77540 devicetree document. >> >> Signed-off-by: Okan Sahin <okan.sahin@analog.com> >> --- >> .../devicetree/bindings/mfd/adi,max77541.yaml | 87 +++++++++++++++++++ >> MAINTAINERS | 1 + >> 2 files changed, 88 insertions(+) >> create mode 100644 >> Documentation/devicetree/bindings/mfd/adi,max77541.yaml >> >> diff --git a/Documentation/devicetree/bindings/mfd/adi,max77541.yaml >> b/Documentation/devicetree/bindings/mfd/adi,max77541.yaml >> new file mode 100644 >> index 000000000000..91d15e9ca2e3 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/mfd/adi,max77541.yaml >> @@ -0,0 +1,87 @@ >> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 >> +--- >> +$id: >> +https://urldefense.com/v3/__http://devicetree.org/schemas/mfd/adi,max >> >+77541.yaml*__;Iw!!A3Ni8CS0y2Y!8996jdM8k1vZNHCTUma_rPZJgJFp5YspnfHn9 >Az >> +1iRZER2Won_Nt-egtD6XnaFy2I2YTAHhCTJA0DcP6xCbYS_SPe8iy$ >> +$schema: >> +https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.y >> >+aml*__;Iw!!A3Ni8CS0y2Y!8996jdM8k1vZNHCTUma_rPZJgJFp5YspnfHn9Az1iRZE >R2 >> +Won_Nt-egtD6XnaFy2I2YTAHhCTJA0DcP6xCbYS-wr9IcZ$ >> + >> +title: MAX77540/MAX77541 PMIC from ADI >> + >> +maintainers: >> + - Okan Sahin <okan.sahin@analog.com> >> + >> +description: | >> + MAX77540 is a Power Management IC with 2 buck regulators. >> + >> + MAX77541 is a Power Management IC with 2 buck regulators and 1 ADC. >> + >> +properties: >> + compatible: >> + enum: >> + - adi,max77540 >> + - adi,max77541 >> + >> + reg: >> + maxItems: 1 >> + >> + interrupts: >> + maxItems: 1 >> + >> + regulators: >> + $ref: /schemas/regulator/adi,max77541-regulator.yaml# > >No improvements regarding bisectability - this patch fails. If you tested this patch, >you would see it. > >Instead of ignoring comments, either implement them or ask for clarification. > > Sorry for misunderstanding, I checked patchset as a whole not one by one this is why I did not get failure after "make dt_binding_check " . Right now, I understand why you are saying this patch fails, but what is your suggestion? what is the correct order for this patchset? I sent adi,max77541-regulator.yaml in path 4/5. In the light of discussion, should I remove all the parts related to regulator in patch 2/5, then add adi,max77541-regulator.yaml and update adi,max77541.yaml in patch 4/5? or should I add new patch to update adi,max77541.yaml? >> + >> +required: >> + - compatible >> + - reg >> + - interrupts >> + >> +allOf: >> + - if: >> + properties: >> + compatible: >> + contains: >> + const: adi,max77540 >> + then: >> + properties: >> + regulator: > >You do not have 'regulator' property. > >> + properties: >> + compatible: >> + const: adi,max77540-regulator >> + else: >> + properties: >> + regulator: > >Same problem. > >> + properties: >> + compatible: >> + const: adi,max77541-regulator >> + >> +additionalProperties: false >> + > >Best regards, >Krzysztof Regards, Okan Sahin
On 31/01/2023 13:02, Sahin, Okan wrote: >>> + regulators: >>> + $ref: /schemas/regulator/adi,max77541-regulator.yaml# >> >> No improvements regarding bisectability - this patch fails. If you tested this patch, >> you would see it. >> >> Instead of ignoring comments, either implement them or ask for clarification. >> >> > Sorry for misunderstanding, I checked patchset as a whole not one by one this is why I did not get failure after "make dt_binding_check " . Right now, I understand why you are saying this patch fails, but what is your suggestion? what is the correct order for this patchset? I sent adi,max77541-regulator.yaml in path 4/5. In the light of discussion, should I remove all the parts related to regulator in patch 2/5, then add adi,max77541-regulator.yaml and update adi,max77541.yaml in patch 4/5? or should I add new patch to update adi,max77541.yaml? Regulator binding patch should be first in the series (bindings are before usage), then the MFD binding should come. Your cover letter should clearly at the top mention the dependency. You can also mention dependency in MFD patch after ---, because many of us do not really read cover letters... Best regards, Krzysztof
On Tue, 31 Jan 2023 7:44 PM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: >On 31/01/2023 13:02, Sahin, Okan wrote: >>>> + regulators: >>>> + $ref: /schemas/regulator/adi,max77541-regulator.yaml# >>> >>> No improvements regarding bisectability - this patch fails. If you >>> tested this patch, you would see it. >>> >>> Instead of ignoring comments, either implement them or ask for clarification. >>> >>> >> Sorry for misunderstanding, I checked patchset as a whole not one by one this is >why I did not get failure after "make dt_binding_check " . Right now, I understand >why you are saying this patch fails, but what is your suggestion? what is the >correct order for this patchset? I sent adi,max77541-regulator.yaml in path 4/5. >In the light of discussion, should I remove all the parts related to regulator in >patch 2/5, then add adi,max77541-regulator.yaml and update >adi,max77541.yaml in patch 4/5? or should I add new patch to update >adi,max77541.yaml? > >Regulator binding patch should be first in the series (bindings are before usage), >then the MFD binding should come. Your cover letter should clearly at the top >mention the dependency. You can also mention dependency in MFD patch after -- >-, because many of us do not really read cover letters... > > >Best regards, >Krzysztof Hi Krzysztof, Thank you for your feedback. I tried to explain in cover letter .However, I understand that it was not clear enough. I do not want to take your time, but let me ask one thing to understand the case completely. Right now, my order is like below [cover letter]->[mfd driver]->[mfd binding]->[regulator driver]->[regulator binding]->[adc]. Should I completely change the ordering e.g. starting with regulator ending with mfd or is it sufficient to just get the regulator binding just before the mfd bindings? Regards, Okan
On 31/01/2023 22:28, Sahin, Okan wrote: > On Tue, 31 Jan 2023 7:44 PM > Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > >> On 31/01/2023 13:02, Sahin, Okan wrote: >>>>> + regulators: >>>>> + $ref: /schemas/regulator/adi,max77541-regulator.yaml# >>>> >>>> No improvements regarding bisectability - this patch fails. If you >>>> tested this patch, you would see it. >>>> >>>> Instead of ignoring comments, either implement them or ask for clarification. >>>> >>>> >>> Sorry for misunderstanding, I checked patchset as a whole not one by one this is >> why I did not get failure after "make dt_binding_check " . Right now, I understand >> why you are saying this patch fails, but what is your suggestion? what is the >> correct order for this patchset? I sent adi,max77541-regulator.yaml in path 4/5. >> In the light of discussion, should I remove all the parts related to regulator in >> patch 2/5, then add adi,max77541-regulator.yaml and update >> adi,max77541.yaml in patch 4/5? or should I add new patch to update >> adi,max77541.yaml? >> >> Regulator binding patch should be first in the series (bindings are before usage), >> then the MFD binding should come. Your cover letter should clearly at the top >> mention the dependency. You can also mention dependency in MFD patch after -- >> -, because many of us do not really read cover letters... >> >> >> Best regards, >> Krzysztof > Hi Krzysztof, > > Thank you for your feedback. I tried to explain in cover letter .However, I understand that it was not clear enough. I do not want to take your time, but let me ask one thing to understand the case completely. Right now, my order is like below > [cover letter]->[mfd driver]->[mfd binding]->[regulator driver]->[regulator binding]->[adc]. > Should I completely change the ordering e.g. starting with regulator ending with mfd or is it sufficient to just get the regulator binding just before the mfd bindings? "bindings are before usage" - what's unclear? How can you use binding before defining it? Best regards, Krzysztof
>> On Wed, 1 Feb 2023 10:26 AM >> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: >On 31/01/2023 22:28, Sahin, Okan wrote: >> On Tue, 31 Jan 2023 7:44 PM >> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: >> >>> On 31/01/2023 13:02, Sahin, Okan wrote: >>>>>> + regulators: >>>>>> + $ref: /schemas/regulator/adi,max77541-regulator.yaml# >>>>> >>>>> No improvements regarding bisectability - this patch fails. If you >>>>> tested this patch, you would see it. >>>>> >>>>> Instead of ignoring comments, either implement them or ask for >clarification. >>>>> >>>>> >>>> Sorry for misunderstanding, I checked patchset as a whole not one by >>>> one this is >>> why I did not get failure after "make dt_binding_check " . Right now, >>> I understand why you are saying this patch fails, but what is your >>> suggestion? what is the correct order for this patchset? I sent adi,max77541- >regulator.yaml in path 4/5. >>> In the light of discussion, should I remove all the parts related to >>> regulator in patch 2/5, then add adi,max77541-regulator.yaml and >>> update adi,max77541.yaml in patch 4/5? or should I add new patch to >>> update adi,max77541.yaml? >>> >>> Regulator binding patch should be first in the series (bindings are >>> before usage), then the MFD binding should come. Your cover letter >>> should clearly at the top mention the dependency. You can also >>> mention dependency in MFD patch after -- -, because many of us do not really >read cover letters... >>> >>> >>> Best regards, >>> Krzysztof >> Hi Krzysztof, >> >> Thank you for your feedback. I tried to explain in cover letter >> .However, I understand that it was not clear enough. I do not want to take your >time, but let me ask one thing to understand the case completely. Right now, my >order is like below [cover letter]->[mfd driver]->[mfd binding]->[regulator driver]- >>[regulator binding]->[adc]. >> Should I completely change the ordering e.g. starting with regulator ending >with mfd or is it sufficient to just get the regulator binding just before the mfd >bindings? > >"bindings are before usage" - what's unclear? > >How can you use binding before defining it? > >Best regards, >Krzysztof Hi Krysztof, It is crystal clear that "bindings are before usage", but what I want to know is what is the correct order of patchset for mfd device? Max77541 is multi-functional device. It has both adc and regulator subdevices. I thought I need to put mfd driver first, yet it looks wrong to me right now? Regards, Okan
On 01/02/2023 08:46, Sahin, Okan wrote: >> "bindings are before usage" - what's unclear? >> >> How can you use binding before defining it? >> >> Best regards, >> Krzysztof > > Hi Krysztof, > > It is crystal clear that "bindings are before usage", but what I want to know is what is the correct order of patchset for mfd device? Max77541 is multi-functional device. It has both adc and regulator subdevices. I thought I need to put mfd driver first, yet it looks wrong to me right now? MFD driver is also usually the last. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/mfd/adi,max77541.yaml b/Documentation/devicetree/bindings/mfd/adi,max77541.yaml new file mode 100644 index 000000000000..91d15e9ca2e3 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/adi,max77541.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/adi,max77541.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MAX77540/MAX77541 PMIC from ADI + +maintainers: + - Okan Sahin <okan.sahin@analog.com> + +description: | + MAX77540 is a Power Management IC with 2 buck regulators. + + MAX77541 is a Power Management IC with 2 buck regulators and 1 ADC. + +properties: + compatible: + enum: + - adi,max77540 + - adi,max77541 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + regulators: + $ref: /schemas/regulator/adi,max77541-regulator.yaml# + +required: + - compatible + - reg + - interrupts + +allOf: + - if: + properties: + compatible: + contains: + const: adi,max77540 + then: + properties: + regulator: + properties: + compatible: + const: adi,max77540-regulator + else: + properties: + regulator: + properties: + compatible: + const: adi,max77541-regulator + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@69 { + compatible = "adi,max77541"; + reg = <0x69>; + interrupt-parent = <&gpio>; + interrupts = <16 IRQ_TYPE_EDGE_FALLING>; + + regulators { + buck1 { + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <5200000>; + regulator-boot-on; + regulator-always-on; + }; + buck2 { + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <5200000>; + regulator-boot-on; + regulator-always-on; + }; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index af94d06bb9f0..22f5a9c490e3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12501,6 +12501,7 @@ MAXIM MAX77541 PMIC MFD DRIVER M: Okan Sahin <okan.sahin@analog.com> L: linux-kernel@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/mfd/adi,max77541.yaml F: drivers/mfd/max77541.c F: include/linux/mfd/max77541.h