From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6390BC05027 for ; Fri, 3 Feb 2023 17:58:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232924AbjBCR6X (ORCPT ); Fri, 3 Feb 2023 12:58:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232723AbjBCR6W (ORCPT ); Fri, 3 Feb 2023 12:58:22 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 592EBCA17 for ; Fri, 3 Feb 2023 09:58:16 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id c4-20020a1c3504000000b003d9e2f72093so6581859wma.1 for ; Fri, 03 Feb 2023 09:58:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=lN+M6aiUbCqF46CC1crDFxdVf7hLTQ+IRNqaZ978vd8=; b=S1EjWXdz//eVBIiu80y0i58Nwfp/vPB6JlRYf2vOiL5xiefMP2zINH+qTlJJbRKItY WPrNVD0VpVMglADIzRh8Ojmkhb+O/yZ6DvaCEfVRF7ZEnrTYtwIF13YFx5XNMFgIj8rE uWSA5IlhAOYI0mTPHGzK+xv/oXOiRT/JZGYpW3WMtyFcdn+ofmFkqIFIURJEvwE7FM7Q 2TMKBxnxWIbBXDhy/h1s540I8b9ylHqaLRjlafMhockTDHZP+qIiT44NeP9mnh4zsA0s Xclq547eR3BpKU4H5GOz04EFZ1KWSUjYUabfKn1PAQqCB0mIirpl0MmXm/DFU5UC11ms 1l5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lN+M6aiUbCqF46CC1crDFxdVf7hLTQ+IRNqaZ978vd8=; b=hkIgIQMHkmQ5KTs6cVTF4Uds6SF67mHbx6bplU4Cz/CC+BesvXJwjuYhYdlOKTwVjP y159b3hsJ2CpFSeG/Dk5V0x1Er0yhaBpBfyCbsXybIsnQg4vPJGFaJTSBd59gasJkquj RwLg/HScSAojFH7wsD8yV5lGbJaKndXCJZnLWWmIFZLKAgJGFXyIr0k8N2oNzb8yIzuT Ec5Yu0CxnPhzQHKjUnSgUfP9SoE1We4Bd5+7t1Fb+nw6Maf6e8dOBICDxTuG2AD/YaoZ aBkV7D1qsOX2cpU5vnRA1exnj+ve6z/Uzhwv8JmQOZc9XlehXp3u7OrxqCGAlJkXVCdT +J3g== X-Gm-Message-State: AO0yUKW19sLWvtofCSx4dWP0KeZB6yPd2BzxMGEkN2RdC5LW7V+XnFET O99aamZPpJsjCi6d7/idKLYQIsZjw/0Wva8T X-Google-Smtp-Source: AK7set/XQawmCDWrVyjPwzNZBBNVKsO+g4KUQAE8B9uS3eeB81KjPN+ttS8KXCXrBfkXJpYejKU66Q== X-Received: by 2002:a05:600c:510e:b0:3dc:59e9:9285 with SMTP id o14-20020a05600c510e00b003dc59e99285mr11539024wms.18.1675447094889; Fri, 03 Feb 2023 09:58:14 -0800 (PST) Received: from [192.168.1.109] ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id p2-20020a05600c358200b003dc4ecfc4d7sm3609686wmq.29.2023.02.03.09.58.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Feb 2023 09:58:14 -0800 (PST) Message-ID: Date: Fri, 3 Feb 2023 18:58:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH 6/9] ASoC: dt-bindings: meson: convert axg fifo to schema Content-Language: en-US To: Jerome Brunet , Mark Brown , alsa-devel@alsa-project.org, devicetree@vger.kernel.org Cc: linux-amlogic@lists.infradead.org, Kevin Hilman , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org References: <20230202183653.486216-1-jbrunet@baylibre.com> <20230202183653.486216-7-jbrunet@baylibre.com> <6e6ed493-4748-46ca-7a26-fe9cf6e2377a@linaro.org> <1jmt5un9u4.fsf@starbuckisacylon.baylibre.com> From: Krzysztof Kozlowski In-Reply-To: <1jmt5un9u4.fsf@starbuckisacylon.baylibre.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 03/02/2023 14:27, Jerome Brunet wrote: > >>> + resets: >>> + items: >>> + - description: Memory ARB line >>> + - description: Dedicated device reset line >> >> This won't work without minItems and you should see errors on your DTS >> or in dt_binding_check >> > > The example provided here worked but there is indeed a warning with the > axg-frddr variant. > > I'm adding a 2nd example so it does not happen again. If the difference is only in one property, no need. If the difference is in more properties - then could be. We do not keep examples for every trivial change, because the assumption is that submitter tests DTS as well. > >>> + >>> + reset-names: true >> >> minItems >> maxItems > > Adding this causes troubles with the reset-names definitions in the 'if' > clause. If I put min: 1, max: 2 and min: 2 in the 'then' clause I get: > >> Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml: allOf:1:then:properties:reset-names: 'oneOf' conditional failed, one must be fixed: >> [{'const': 'arb'}, {'const': 'rst'}] is too long >> [{'const': 'arb'}, {'const': 'rst'}] is too short >> False schema does not allow 2 >> 1 was expected >> hint: "minItems" is only needed if less than the "items" list length >> from schema $id: http://devicetree.org/meta-schemas/items.yaml# Probably because rest of binding does not match. One way is like this: https://elixir.bootlin.com/linux/v5.19-rc6/source/Documentation/devicetree/bindings/clock/samsung,exynos7-clock.yaml#L57 > > The older devices just have the 'arb' reset. > Newer devices have a 2nd reset line (called rst here) > > If I just restrict the min and max, it would be valid for the older > devices to have 'rst' only - but it is not valid. How? Why would you define for old devices "rst" as one name if this is not correct? > > With just 'true', it works as expected (throw errors if an incorrect > name or number of names is passed). Min and Max comes from the items list. Because the rest is not in recommended way. Once you implement it in recommended way, there will be no such... > > Any suggestions ? Implement rest of comments. Best regards, Krzysztof