Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2319009rwb; Sat, 8 Oct 2022 06:03:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM48afKhkYcYcM2Xc815oUgFNnF3enzgpIBteLCt7OWvDafSRL44il8vlyIjeLn+mt7PxBVB X-Received: by 2002:a05:6a00:9a1:b0:563:12c1:9a79 with SMTP id u33-20020a056a0009a100b0056312c19a79mr891365pfg.22.1665234194598; Sat, 08 Oct 2022 06:03:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665234194; cv=none; d=google.com; s=arc-20160816; b=feu/1ycmCfFVnxx/MEACqKUv3ZTT3aml7P/BF6CME98ro3i5h7rzrvj+rwr/4/c0kR gLzQXWVLp5G9RJFjJfn+HLR2CKgPf5YbqrenxBW+I97HyJ+VC9GFAZcktchF/iIOsFIf Gdc9GOaBmPiePSC1xzhVHbFJzAeMPgidoBys9MWjXqWp1cJgR7p3IA0P1kNfYAliECPM dj0hCzSfMMMisYLVQHXguOPZ0WGK3Mti4DAYVHp89j2bbVYdobPX20RIr5/anlWp1y/F jaYuPrrTI+xJEqln434x2GoNKDE0xuwhsvCcUGJ++z/egcK+3jpg8Zx/UIbQYaIKdW+y rpkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Dji2Yw3SxEqIXHoPCkkOxGjvaONXRxPb3yOPhNs389g=; b=EWiiNZlYrTF1Qu5Y48NCYniQUuezD2bYatXwmerEekNID7M8pneIyrWz1qw0opoUfZ j7IhzcsjeSv90PDwKhmLK373azG7mkFOjI+MMMvqJYTh2jzPPLkT8jDoZCOoOr3eHfEI ogEwbYBOfUkRYafwYEStJRqW7rUPoiahVOlpK4mcT4lOF6QB9fJj8NRCcfjCua2rbfoC DVlVH8tGzp90Mjmhnm9Hihuqatriy4mv+y2S8m5l4eM59nwYEiIdDNL3B1g3Vl8p9sov JpM3lr0g0MStrMuz8xJ8FJ21xzMwijczy1YEohmLGcMF0omlED5zHojdMcFQyO4WBQle UsUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pcr8plzA; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h16-20020a056a00219000b005184183372csi5909984pfi.350.2022.10.08.06.03.01; Sat, 08 Oct 2022 06:03:14 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pcr8plzA; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229705AbiJHLu3 (ORCPT + 99 others); Sat, 8 Oct 2022 07:50:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbiJHLuZ (ORCPT ); Sat, 8 Oct 2022 07:50:25 -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 770551C117; Sat, 8 Oct 2022 04:50:24 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id b1so5632723lfs.7; Sat, 08 Oct 2022 04:50:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Dji2Yw3SxEqIXHoPCkkOxGjvaONXRxPb3yOPhNs389g=; b=pcr8plzA5CjmEreaQB9NbfeIgWGA26IPHwvzgpWz8IqLAM8QW4AfwD7/PpJq8geUsw PFfuJp8MAM1B180Rrt8Hp4MXNa8G0QPTN2/EFHVN5yxhxedf8VHY0m+bUlkrNY0g2Y5s 8ppvQvzGIP1TcpMXT1mIv8LCd9XaPxsh8eiSqJ+x8lP7JIsq0K8GAVjj80QI6/dtOVPp FWGJfnbpn0e+jRi5v6qPC2NxzDcsCuw1miGB3po+adJ4HTpe2y/kY/GRToshN9E/Y4+V 5WYiwvN+BWPNjtkvmjXN7v4D3WI0bkqsWKu6coU73BEkqSB9dHG6tjMR/gy41cPHoCfg LqBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Dji2Yw3SxEqIXHoPCkkOxGjvaONXRxPb3yOPhNs389g=; b=Pa3Qxqntl8pxSbop8HZEs8dWjK2pTJPFZQLNhHha//3Yzzn0kuCR2ARSK2gyFMmzbD leKrHuGaLNg8YEF+EjiHAbcCth7WbMcw5+OYLWrOht4qA7LBmNlp2Gp4sreLIqcjtzOO D7vPW98Zj4mcz00b/JKmF5xafMKL7TcWLnKqmUKA6BWpWYPsxXxoJbY5VCy7hxstB+Dk Ac0+KT+DOwsZV2SycfyJlVSsvDG5mgrM5s9CjTbBviqHDJ2CI3ti3qc1ubty+BjVpAXb BfNAoHLGwzqAknfTelhM5QWCl8Y+6C/u2cCBmupxV/rH37gOIKlFVerrFdZzlWITRa77 qZtQ== X-Gm-Message-State: ACrzQf0n3OIlQQGOHoYkZTHL3nt7ADRBlkkvlickUScK9ndbDoLLAP51 s5W5+zP3EqRW9tJbxpit33E= X-Received: by 2002:a05:6512:224d:b0:4a2:7710:9b8b with SMTP id i13-20020a056512224d00b004a277109b8bmr3137394lfu.128.1665229822628; Sat, 08 Oct 2022 04:50:22 -0700 (PDT) Received: from mobilestation ([95.79.133.202]) by smtp.gmail.com with ESMTPSA id v18-20020a05651203b200b00494813c689dsm657418lfp.219.2022.10.08.04.50.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Oct 2022 04:50:21 -0700 (PDT) Date: Sat, 8 Oct 2022 14:50:19 +0300 From: Serge Semin To: Patrick Rudolph Cc: Peter Rosin , Laurent Pinchart , robh@kernel.org, wsa@kernel.org, Rob Herring , Krzysztof Kozlowski , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [v9 1/4] dt-bindings: i2c: Add Maxim MAX735x/MAX736x variants Message-ID: <20221008115019.6jxsbawtye7cdkfh@mobilestation> References: <20221007075354.568752-1-patrick.rudolph@9elements.com> <20221007075354.568752-2-patrick.rudolph@9elements.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221007075354.568752-2-patrick.rudolph@9elements.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 07, 2022 at 09:53:50AM +0200, Patrick Rudolph wrote: > Update the pca954x bindings to add support for the Maxim MAX735x/MAX736x > chips. The functionality will be provided by the exisintg pca954x driver. > > While on it make the interrupts support conditionally as not all of the > existing chips have interrupts. > > For chips that are powered off by default add an optional regulator > called vdd-supply. > > Signed-off-by: Patrick Rudolph > --- > .../bindings/i2c/i2c-mux-pca954x.yaml | 39 ++++++++++++++++--- > 1 file changed, 34 insertions(+), 5 deletions(-) > > diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml > index 9f1726d0356b..efad0a95806f 100644 > --- a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml > +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml > @@ -4,21 +4,25 @@ > $id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml# > $schema: http://devicetree.org/meta-schemas/core.yaml# > > -title: NXP PCA954x I2C bus switch > +title: NXP PCA954x I2C and compatible bus switches > > maintainers: > - Laurent Pinchart > > description: > - The binding supports NXP PCA954x and PCA984x I2C mux/switch devices. > - > -allOf: > - - $ref: /schemas/i2c/i2c-mux.yaml# Why do you move the allOf statement to the bottom of the schema? > + The binding supports NXP PCA954x and PCA984x I2C mux/switch devices, > + and the Maxim MAX735x and MAX736x I2C mux/switch devices. What about combining the sentence: "The binding supports NXP PCA954x/PCA984x and Maxim MAX735x/MAX736x I2C mux/switch devices." ? Currently it does look a bit bulky. > > properties: > compatible: > oneOf: > - enum: > + - maxim,max7356 > + - maxim,max7357 > + - maxim,max7358 > + - maxim,max7367 > + - maxim,max7368 > + - maxim,max7369 > - nxp,pca9540 > - nxp,pca9542 > - nxp,pca9543 > @@ -59,10 +63,33 @@ properties: > description: if present, overrides i2c-mux-idle-disconnect > $ref: /schemas/mux/mux-controller.yaml#/properties/idle-state > > + vdd-supply: > + description: A voltage regulator supplying power to the chip. > + > required: > - compatible > - reg > > +allOf: > + - $ref: /schemas/i2c/i2c-mux.yaml# > + - if: > + not: > + properties: > + compatible: > + contains: > + enum: > + - maxim,max7367 > + - maxim,max7369 > + - nxp,pca9542 > + - nxp,pca9543 > + - nxp,pca9544 > + - nxp,pca9545 > + then: > + properties: > + interrupts: false > + "#interrupt-cells": false > + interrupt-controller: false I'd suggest to add an opposite definition. Evaluate the properties for the devices which expect them being evaluated instead of falsing their existence for the devices which don't support the interrupts. -Sergey > + > unevaluatedProperties: false > > examples: > @@ -79,6 +106,8 @@ examples: > #size-cells = <0>; > reg = <0x74>; > > + vdd-supply = <&p3v3>; > + > interrupt-parent = <&ipic>; > interrupts = <17 IRQ_TYPE_LEVEL_LOW>; > interrupt-controller; > -- > 2.37.3 >