Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2226547pxb; Sun, 17 Oct 2021 09:03:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypKjccii1H8oKvnmKb+Ndp2gi+dfISTq2eQxr7HOeLNamgMGn4WuEklBIQM5GwqmjboBef X-Received: by 2002:a17:90a:f291:: with SMTP id fs17mr38275499pjb.102.1634486611881; Sun, 17 Oct 2021 09:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634486611; cv=none; d=google.com; s=arc-20160816; b=U320EzRh3lj+NQyIdPsXWwqjBaSXthlMaqc2RCRZGrhKXRcJ0ePqWtv9tafi1ZCfiU jJp6ILfJZfnr2dP5fSrkWiWvIc92y89+0eFyWnuTZiBuBChHYkYrEIIG+4168ixhdpFa dYfrk/ahtCP9wO+bHv8N7Wd7b1s6bwSu6xEXaHfzuNhPXi7AH/xlDSmMaCBlatRCDig0 obMoMiK9mNZAibFfnqMqqxP19WXZXTEQCIt7YCJwym4gO7RUmcicsGQYzH0AN4wGfcaI 8RJ7VQzFZtQ6VKrwChtPKYlfyiRunrlh9Kz7L6VmydenhM10wtv49AQCnnjp+R4n1/T8 Lg5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=HoFTUFUmWvmGQQDxi8GZg1e9JL8ksuL98xWKQhFD6jw=; b=xp6SO4suwq+2cbJRr3DWb0Ux33YntT5yN5Q1QNo5H8OZl1urshcuDrMp6kJMRQozer 4pxF1ymZS8SOoM/dst9DcBsD4k4ibqMWNu8Mp9dgmFMyKf+s9hJPi/thgCByPZmKjLQG l7Q1tkoUaEs7T+ZuT6h8OKMIpKwvd7zG2VAs7WZuzCmehh8ow431SiuRqObsoF22wpd8 HMSJvsVWdIz4tQEllXGsUnEL2yPbYgnma3Vi0nmD/sEGkpbRGgE83AkevRZdsBh827aL AnUdXbv5AA0XLAMWSfviW0VHGcPXCq1ddWCozXWmL4J+h1B5hhYiEHTwcQbWVfWys1g+ mTVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h34si17078959pgh.340.2021.10.17.09.03.18; Sun, 17 Oct 2021 09:03:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241532AbhJORrN (ORCPT + 99 others); Fri, 15 Oct 2021 13:47:13 -0400 Received: from foss.arm.com ([217.140.110.172]:46684 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237319AbhJORrM (ORCPT ); Fri, 15 Oct 2021 13:47:12 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6344B11D4; Fri, 15 Oct 2021 10:45:05 -0700 (PDT) Received: from [10.57.95.157] (unknown [10.57.95.157]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BA7CF3F70D; Fri, 15 Oct 2021 10:45:03 -0700 (PDT) Subject: Re: [PATCH] ASoC: dt-bindings: rockchip: i2s-tdm: fix rockchip, cru requirement To: Nicolas Frattaroli , Liam Girdwood , Mark Brown , Rob Herring , Heiko Stuebner Cc: Rob Herring , linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20211015143115.1445707-1-frattaroli.nicolas@gmail.com> From: Robin Murphy Message-ID: <8553b0cd-95e4-c3db-c75a-d3b28e99f131@arm.com> Date: Fri, 15 Oct 2021 18:44:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211015143115.1445707-1-frattaroli.nicolas@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-10-15 15:31, Nicolas Frattaroli wrote: > The behaviour described in the bindings is exactly the opposite > of what it should be, so this patch fixes the description and > adjusts the if conditions for adding rockchip,cru to required. > > Fixes: 510f1c133aed ("ASoC: dt-bindings: rockchip: add i2s-tdm bindings") > Signed-off-by: Nicolas Frattaroli > --- > .../devicetree/bindings/sound/rockchip,i2s-tdm.yaml | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml b/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml > index ce3e18b50230..93f5221e9381 100644 > --- a/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml > +++ b/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml > @@ -86,7 +86,7 @@ properties: > $ref: /schemas/types.yaml#/definitions/phandle > description: > The phandle of the cru. > - Required if neither trcm-sync-tx-only nor trcm-sync-rx-only are specified. > + Required if either trcm-sync-tx-only or trcm-sync-rx-only are specified. > > rockchip,grf: > $ref: /schemas/types.yaml#/definitions/phandle > @@ -147,8 +147,13 @@ required: > allOf: > - if: > properties: > - rockchip,trcm-sync-tx-only: false > - rockchip,trcm-sync-rx-only: false > + rockchip,trcm-sync-tx-only: true > + then: > + required: > + - rockchip,cru > + - if: > + properties: > + rockchip,trcm-sync-rx-only: true FWIW, isn't this just a long-winded way to say if: anyOf: - properties: rockchip,trcm-sync-tx-only: true - properties: rockchip,trcm-sync-rx-only: true which itself could still be more concisely if: not: properties: rockchip,trcm-sync-tx-only: false rockchip,trcm-sync-rx-only: false ? Robin. > then: > required: > - rockchip,cru >