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 X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8D26C49EA4 for ; Tue, 22 Jun 2021 08:17:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 93FCB6128C for ; Tue, 22 Jun 2021 08:17:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229628AbhFVIT7 (ORCPT ); Tue, 22 Jun 2021 04:19:59 -0400 Received: from mail-vs1-f54.google.com ([209.85.217.54]:46782 "EHLO mail-vs1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbhFVIT7 (ORCPT ); Tue, 22 Jun 2021 04:19:59 -0400 Received: by mail-vs1-f54.google.com with SMTP id z15so10758892vsn.13; Tue, 22 Jun 2021 01:17:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s0hVMlLFV5eIwzuXXBEJWEV7FxMfuDBGtQwv1PuAfDc=; b=Yc8JShUBMH1dnjUYyQ4i3CS2+y2GF6q1YtRwv/bRUTq4JGwOzFH8jz0/QYnr8ZuDpr HcEesiBUGFsp/umSzAQ1ucxKn54tANWqVfYyhNDVX62VWxoC03W6vKFzSWDS1INIUujo EfpD0ZvANCW00iJ41ZnsyYqUYQ7WKnBJFLN0taGCgErNoNfbEbrJRexR6AwIwIKT2Knb /0emor8cfQJbNOnIXhfpVS1iQMsX9FEwTZTkt2w2NsDGz2POO5RqhJxIgP7TG7ACSbj/ GkkcJgg3HdSB+eNLe7DKVV3GNyEiHob+PVe9RVIKAdqt1PMr45YhOFebl4O9XRmtiOlY SQDQ== X-Gm-Message-State: AOAM530BLNzCLpsQ3ZsdxG/iSlElsnvEgk5f19JQOeLC0TziQs7pI7vp kFMx7YZsKONrP5YDTSXRni3TndxcwI12ri99DDk= X-Google-Smtp-Source: ABdhPJz3clw2O8tsVFk5F4OGcaBfo9Z8eHqvoF8LwYXAPGollSTCOREHx1S0f08A9nsiznMjaM5G5srL4UVXlJSotsU= X-Received: by 2002:a05:6102:2011:: with SMTP id p17mr21421376vsr.40.1624349860512; Tue, 22 Jun 2021 01:17:40 -0700 (PDT) MIME-Version: 1.0 References: <20210615191543.1043414-1-robh@kernel.org> In-Reply-To: <20210615191543.1043414-1-robh@kernel.org> From: Geert Uytterhoeven Date: Tue, 22 Jun 2021 10:17:28 +0200 Message-ID: Subject: Re: [PATCH] dt-bindings: Drop redundant minItems/maxItems To: Rob Herring Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , linux-ide@vger.kernel.org, linux-clk , Linux ARM , Linux Crypto Mailing List , DRI Development , dmaengine , Linux I2C , linux-iio@vger.kernel.org, ALSA Development Mailing List , Linux IOMMU , Linux Media Mailing List , Linux MMC List , netdev , linux-can@vger.kernel.org, linux-pci , linux-phy@lists.infradead.org, "open list:GPIO SUBSYSTEM" , Linux PWM List , "open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM" , linux-riscv , linux-rtc@vger.kernel.org, "open list:SERIAL DRIVERS" , linux-spi , Linux PM list , USB list , Linux Watchdog Mailing List , Jens Axboe , Stephen Boyd , Herbert Xu , "David S. Miller" , David Airlie , Daniel Vetter , Vinod Koul , Bartosz Golaszewski , Kamal Dasu , Jonathan Cameron , Lars-Peter Clausen , Thomas Gleixner , Marc Zyngier , Joerg Roedel , Jassi Brar , Mauro Carvalho Chehab , Krzysztof Kozlowski , Ulf Hansson , Jakub Kicinski , Wolfgang Grandegger , Marc Kleine-Budde , Andrew Lunn , Vivien Didelot , Vladimir Oltean , Bjorn Helgaas , Kishon Vijay Abraham I , Linus Walleij , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Lee Jones , Ohad Ben-Cohen , Mathieu Poirier , Philipp Zabel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alessandro Zummo , Alexandre Belloni , Greg Kroah-Hartman , Mark Brown , Zhang Rui , Daniel Lezcano , Wim Van Sebroeck , Guenter Roeck Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Hi Rob, On Tue, Jun 15, 2021 at 9:16 PM Rob Herring wrote: > If a property has an 'items' list, then a 'minItems' or 'maxItems' with the > same size as the list is redundant and can be dropped. Note that is DT > schema specific behavior and not standard json-schema behavior. The tooling > will fixup the final schema adding any unspecified minItems/maxItems. > > This condition is partially checked with the meta-schema already, but > only if both 'minItems' and 'maxItems' are equal to the 'items' length. > An improved meta-schema is pending. > Signed-off-by: Rob Herring > --- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > @@ -46,7 +46,6 @@ properties: > > clocks: > minItems: 3 > - maxItems: 5 > items: > - description: GMAC main clock > - description: MAC TX clock While resolving the conflict with commit fea99822914039c6 ("dt-bindings: net: document ptp_ref clk in dwmac") in soc/for-next, I noticed the following construct for clock-names: clock-names: minItems: 3 maxItems: 6 contains: enum: - stmmaceth - mac-clk-tx - mac-clk-rx - ethstp - eth-ck - ptp_ref Should this use items instead of enum, and drop maxItems, or is this a valid construct to support specifying the clocks in random order? If the latter, it does mean that the order of clock-names may not match the order of the clock descriptions. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds 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 X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A458C2B9F4 for ; Tue, 22 Jun 2021 08:18:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 46EBC61289 for ; Tue, 22 Jun 2021 08:18:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46EBC61289 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+RkNM3zvfMPnfYoeSSmjaz8JM5FJ5P+fQgelRgOX7hQ=; b=bLw01mniIpgrUq 9UyOh2S+mzYOwAOZ72WOeeSeNafTtkfcB6eisnsrWy7yoAw09oxEIF2fqKTj9Dy6ebDcklDsW2Atx H9Kj5GFw5ROXiD3IvUWmmiaxZfeaX6idWgIpwBd8Q6Qap8OimKPcXocCr5U2B/D5PC/Po1+41WiRQ Mti3p/CNhk1UasvYr/X/tY8kCBYKnYe6rTwTsCAZyj++jJLrwpuimloVJEwnT4qlIHltCbSzkoDlV UGXun11u1Wm9FHV69XLyxqXN5jIAnmpku1jlXs7qvciYfhIzSoPyZN50DsEN+bX0IZY18ZLTXWN6a hELo7wlGv4v1g0BKSKbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvbbO-006CrT-ET; Tue, 22 Jun 2021 08:17:46 +0000 Received: from mail-vs1-f43.google.com ([209.85.217.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvbbK-006CpX-74; Tue, 22 Jun 2021 08:17:43 +0000 Received: by mail-vs1-f43.google.com with SMTP id u10so263594vsu.12; Tue, 22 Jun 2021 01:17:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s0hVMlLFV5eIwzuXXBEJWEV7FxMfuDBGtQwv1PuAfDc=; b=Eu3AxSUt+8oEv/deqQc08PxJ351ScChPMZ7a3vPHLkcyoeS2LfHEY9J3PbrA5CPQL4 0l8C4kJWCRZwVktFcEpDLV6L2eer1Ggksdx2GvJy+ySUgKcpA/y/0ECMn/MBQlTWHS7i XCAGTegKiqLNRyFhFgfzwKGAm3gAWjS1MiIfoES7riSZLldAZ6mD5I+a6w0bYvrHwesg Zv/D3U/tT/2bbtpMdMr3LwTnbxRNUvRpng7t9Vn8sA06/wI43XV0OE7b2aMGxmrw6rUQ mIzu2/uVap+VOcmBiTO3FLRTNhsxBj9t2LdU4uhgMizwJHA5hQkfi9+Mvouo/EVCcpiI Gi4A== X-Gm-Message-State: AOAM531qXyHzNpmpR6m2yO8E1bzTCoeSC8ThHyeWxG6szpV0vx6zOah+ eDrGE87EaNullTPn3LMtVk67Cf747ZsE/sXCyC8= X-Google-Smtp-Source: ABdhPJz3clw2O8tsVFk5F4OGcaBfo9Z8eHqvoF8LwYXAPGollSTCOREHx1S0f08A9nsiznMjaM5G5srL4UVXlJSotsU= X-Received: by 2002:a05:6102:2011:: with SMTP id p17mr21421376vsr.40.1624349860512; Tue, 22 Jun 2021 01:17:40 -0700 (PDT) MIME-Version: 1.0 References: <20210615191543.1043414-1-robh@kernel.org> In-Reply-To: <20210615191543.1043414-1-robh@kernel.org> From: Geert Uytterhoeven Date: Tue, 22 Jun 2021 10:17:28 +0200 Message-ID: Subject: Re: [PATCH] dt-bindings: Drop redundant minItems/maxItems To: Rob Herring Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , linux-ide@vger.kernel.org, linux-clk , Linux ARM , Linux Crypto Mailing List , DRI Development , dmaengine , Linux I2C , linux-iio@vger.kernel.org, ALSA Development Mailing List , Linux IOMMU , Linux Media Mailing List , Linux MMC List , netdev , linux-can@vger.kernel.org, linux-pci , linux-phy@lists.infradead.org, "open list:GPIO SUBSYSTEM" , Linux PWM List , "open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM" , linux-riscv , linux-rtc@vger.kernel.org, "open list:SERIAL DRIVERS" , linux-spi , Linux PM list , USB list , Linux Watchdog Mailing List , Jens Axboe , Stephen Boyd , Herbert Xu , "David S. Miller" , David Airlie , Daniel Vetter , Vinod Koul , Bartosz Golaszewski , Kamal Dasu , Jonathan Cameron , Lars-Peter Clausen , Thomas Gleixner , Marc Zyngier , Joerg Roedel , Jassi Brar , Mauro Carvalho Chehab , Krzysztof Kozlowski , Ulf Hansson , Jakub Kicinski , Wolfgang Grandegger , Marc Kleine-Budde , Andrew Lunn , Vivien Didelot , Vladimir Oltean , Bjorn Helgaas , Kishon Vijay Abraham I , Linus Walleij , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Lee Jones , Ohad Ben-Cohen , Mathieu Poirier , Philipp Zabel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alessandro Zummo , Alexandre Belloni , Greg Kroah-Hartman , Mark Brown , Zhang Rui , Daniel Lezcano , Wim Van Sebroeck , Guenter Roeck X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210622_011742_300003_AC469596 X-CRM114-Status: GOOD ( 30.76 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Hi Rob, On Tue, Jun 15, 2021 at 9:16 PM Rob Herring wrote: > If a property has an 'items' list, then a 'minItems' or 'maxItems' with the > same size as the list is redundant and can be dropped. Note that is DT > schema specific behavior and not standard json-schema behavior. The tooling > will fixup the final schema adding any unspecified minItems/maxItems. > > This condition is partially checked with the meta-schema already, but > only if both 'minItems' and 'maxItems' are equal to the 'items' length. > An improved meta-schema is pending. > Signed-off-by: Rob Herring > --- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > @@ -46,7 +46,6 @@ properties: > > clocks: > minItems: 3 > - maxItems: 5 > items: > - description: GMAC main clock > - description: MAC TX clock While resolving the conflict with commit fea99822914039c6 ("dt-bindings: net: document ptp_ref clk in dwmac") in soc/for-next, I noticed the following construct for clock-names: clock-names: minItems: 3 maxItems: 6 contains: enum: - stmmaceth - mac-clk-tx - mac-clk-rx - ethstp - eth-ck - ptp_ref Should this use items instead of enum, and drop maxItems, or is this a valid construct to support specifying the clocks in random order? If the latter, it does mean that the order of clock-names may not match the order of the clock descriptions. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C31A5C4743C for ; Wed, 23 Jun 2021 09:19:38 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7787860FD9 for ; Wed, 23 Jun 2021 09:19:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7787860FD9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B2277165E; Wed, 23 Jun 2021 11:18:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B2277165E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1624439975; bh=i9DoHH3x32/k5xhsfB7BIN2ZgpoFfLC4fgPISuyR9Mo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aUdBedzDhir6V9QlN7wTbLWJ+ykvZUin42o/YZCt/VNu2SY5IduFw76TybCvqGnaO QFwbyQQQRjRxsU8nKBE0QuOWkYERU1HZdokPIGU4DGD6KIdRVW4dnaUP8d5nclvkzx EF9A+tmi0neo9ZfdUhuIpsVOCvH9nk4IR7Sr+MhA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 48B7EF80245; Wed, 23 Jun 2021 11:17:55 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D7522F80268; Tue, 22 Jun 2021 10:17:48 +0200 (CEST) Received: from mail-vs1-f49.google.com (mail-vs1-f49.google.com [209.85.217.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5B5C8F800E1 for ; Tue, 22 Jun 2021 10:17:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5B5C8F800E1 Received: by mail-vs1-f49.google.com with SMTP id j8so10788977vsd.0 for ; Tue, 22 Jun 2021 01:17:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s0hVMlLFV5eIwzuXXBEJWEV7FxMfuDBGtQwv1PuAfDc=; b=RlUve1WNpyp4KxptPDqTK7vJ9068bE9DSCtuTXCZAfrwG38GdVtMz7rgHmhebRqR16 BX2tcNoOrvzMoYfOwAMCXKbZLGoM7REPKtrwLDmjuD+OwFFMM/jAoXDihJvSfpnz4NGD RaY+KnAiJXwmKDRR2rL2xjPgY3qTZ1J9uMOhZUbCAsopzJ7NUXYDJrBM+IunNHu985KE wHoRVNAaJDk7AfgPfrbRFrqkFBXnL35baEW86Sqb6SSKTgSnWDeUOjIFVLzsDERX5lXh Yk+BpkZxr82oMSzhi0kIwswEKKRk92UauzPWff08aycKwDrTC2yDayfUVkJvWBw0pY5+ gXZQ== X-Gm-Message-State: AOAM532BfoZ3xljXcgUBoYAnBxIQM+gUxkFVIvEtlM+q5tikVPLwFrwK XJWP9J8QsJCJkpmmxBDtSIzDd+jaoOJiU1jA/mg= X-Google-Smtp-Source: ABdhPJz3clw2O8tsVFk5F4OGcaBfo9Z8eHqvoF8LwYXAPGollSTCOREHx1S0f08A9nsiznMjaM5G5srL4UVXlJSotsU= X-Received: by 2002:a05:6102:2011:: with SMTP id p17mr21421376vsr.40.1624349860512; Tue, 22 Jun 2021 01:17:40 -0700 (PDT) MIME-Version: 1.0 References: <20210615191543.1043414-1-robh@kernel.org> In-Reply-To: <20210615191543.1043414-1-robh@kernel.org> From: Geert Uytterhoeven Date: Tue, 22 Jun 2021 10:17:28 +0200 Message-ID: Subject: Re: [PATCH] dt-bindings: Drop redundant minItems/maxItems To: Rob Herring Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Wed, 23 Jun 2021 11:17:52 +0200 Cc: Andrew Lunn , ALSA Development Mailing List , Daniel Lezcano , Alexandre Belloni , Linux PWM List , linux-iio@vger.kernel.org, linux-pci , Linus Walleij , Wim Van Sebroeck , "open list:REMOTE PROCESSOR \(REMOTEPROC\) SUBSYSTEM" , Ulf Hansson , DRI Development , linux-ide@vger.kernel.org, Linux I2C , linux-phy@lists.infradead.org, linux-riscv , Lee Jones , linux-clk , linux-rtc@vger.kernel.org, Lars-Peter Clausen , Herbert Xu , Bartosz Golaszewski , Marc Zyngier , Joerg Roedel , Jassi Brar , Vinod Koul , Kishon Vijay Abraham I , David Airlie , "open list:SERIAL DRIVERS" , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Jakub Kicinski , Zhang Rui , Vivien Didelot , Wolfgang Grandegger , Linux Media Mailing List , Ohad Ben-Cohen , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Albert Ou , Linux Watchdog Mailing List , Linux PM list , linux-can@vger.kernel.org, "open list:GPIO SUBSYSTEM" , Mark Brown , Marc Kleine-Budde , Kamal Dasu , Paul Walmsley , Bjorn Helgaas , Krzysztof Kozlowski , Thomas Gleixner , Mauro Carvalho Chehab , Linux ARM , Jens Axboe , Alessandro Zummo , Guenter Roeck , Mathieu Poirier , Stephen Boyd , netdev , Philipp Zabel , USB list , Linux MMC List , Linux Kernel Mailing List , linux-spi , Linux IOMMU , Palmer Dabbelt , Linux Crypto Mailing List , Daniel Vetter , Greg Kroah-Hartman , dmaengine , Vladimir Oltean , "David S. Miller" , Jonathan Cameron X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Hi Rob, On Tue, Jun 15, 2021 at 9:16 PM Rob Herring wrote: > If a property has an 'items' list, then a 'minItems' or 'maxItems' with the > same size as the list is redundant and can be dropped. Note that is DT > schema specific behavior and not standard json-schema behavior. The tooling > will fixup the final schema adding any unspecified minItems/maxItems. > > This condition is partially checked with the meta-schema already, but > only if both 'minItems' and 'maxItems' are equal to the 'items' length. > An improved meta-schema is pending. > Signed-off-by: Rob Herring > --- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > @@ -46,7 +46,6 @@ properties: > > clocks: > minItems: 3 > - maxItems: 5 > items: > - description: GMAC main clock > - description: MAC TX clock While resolving the conflict with commit fea99822914039c6 ("dt-bindings: net: document ptp_ref clk in dwmac") in soc/for-next, I noticed the following construct for clock-names: clock-names: minItems: 3 maxItems: 6 contains: enum: - stmmaceth - mac-clk-tx - mac-clk-rx - ethstp - eth-ck - ptp_ref Should this use items instead of enum, and drop maxItems, or is this a valid construct to support specifying the clocks in random order? If the latter, it does mean that the order of clock-names may not match the order of the clock descriptions. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds 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 X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 700B6C49EAB for ; Tue, 22 Jun 2021 08:17:46 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 06A796135A for ; Tue, 22 Jun 2021 08:17:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06A796135A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B1BE682675; Tue, 22 Jun 2021 08:17:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x0VUCEm8rrSn; Tue, 22 Jun 2021 08:17:44 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id A15A682612; Tue, 22 Jun 2021 08:17:44 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 78579C001A; Tue, 22 Jun 2021 08:17:44 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id B9405C000E for ; Tue, 22 Jun 2021 08:17:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A4C5B82662 for ; Tue, 22 Jun 2021 08:17:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NkKys9Y1--iu for ; Tue, 22 Jun 2021 08:17:42 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54]) by smtp1.osuosl.org (Postfix) with ESMTPS id DC58382612 for ; Tue, 22 Jun 2021 08:17:41 +0000 (UTC) Received: by mail-vs1-f54.google.com with SMTP id x13so10762153vsf.11 for ; Tue, 22 Jun 2021 01:17:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s0hVMlLFV5eIwzuXXBEJWEV7FxMfuDBGtQwv1PuAfDc=; b=chdQjItdgN049rIqsToTvfnvWc9V1J0tuQPgVerMQ5XurhaYZImMy0xciSZy/cvhxM njKUblXBx0Y3eS0zyJfWiVIPqtZMvTRA4KAW2n6IYuUpfUEYYeQIvzNm2MDQATokyWHh /vnD/sY9OuyvFR975aVxklYhe05AN2zTgY/STMrhpu877JQLnfDZLDzwN4IP0uZxd04b 34B9Uqsk2CycJ2iR7KIIymwXLICLd1wvCiu6/AvnetfLzBZtqLLgMmhu5ub1q2BK5ZXC VnQU5dlJ4JQ8xq68LX6L7tlhbzxG7TlQMihqyddBx4EcHZVQg8YICZCh9jEGrn3Eqrav ZjVA== X-Gm-Message-State: AOAM531Ifa44cRhbqt8LfXG7/o3Y6dEGIUQqyzWnOA2FedE14IxBBVm+ TcjW6S22K/ubjzNXRl/1ilrn7X+TA9hvcfs7Bf8= X-Google-Smtp-Source: ABdhPJz3clw2O8tsVFk5F4OGcaBfo9Z8eHqvoF8LwYXAPGollSTCOREHx1S0f08A9nsiznMjaM5G5srL4UVXlJSotsU= X-Received: by 2002:a05:6102:2011:: with SMTP id p17mr21421376vsr.40.1624349860512; Tue, 22 Jun 2021 01:17:40 -0700 (PDT) MIME-Version: 1.0 References: <20210615191543.1043414-1-robh@kernel.org> In-Reply-To: <20210615191543.1043414-1-robh@kernel.org> From: Geert Uytterhoeven Date: Tue, 22 Jun 2021 10:17:28 +0200 Message-ID: Subject: Re: [PATCH] dt-bindings: Drop redundant minItems/maxItems To: Rob Herring Cc: Andrew Lunn , ALSA Development Mailing List , Daniel Lezcano , Alexandre Belloni , Linux PWM List , linux-iio@vger.kernel.org, linux-pci , Linus Walleij , Wim Van Sebroeck , "open list:REMOTE PROCESSOR \(REMOTEPROC\) SUBSYSTEM" , Ulf Hansson , DRI Development , linux-ide@vger.kernel.org, Linux I2C , linux-phy@lists.infradead.org, linux-riscv , Lee Jones , linux-clk , linux-rtc@vger.kernel.org, Lars-Peter Clausen , Herbert Xu , Bartosz Golaszewski , Marc Zyngier , Jassi Brar , Vinod Koul , Kishon Vijay Abraham I , David Airlie , "open list:SERIAL DRIVERS" , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Jakub Kicinski , Zhang Rui , Vivien Didelot , Wolfgang Grandegger , Linux Media Mailing List , Ohad Ben-Cohen , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Albert Ou , Linux Watchdog Mailing List , Linux PM list , linux-can@vger.kernel.org, "open list:GPIO SUBSYSTEM" , Mark Brown , Marc Kleine-Budde , Kamal Dasu , Paul Walmsley , Bjorn Helgaas , Krzysztof Kozlowski , Thomas Gleixner , Mauro Carvalho Chehab , Linux ARM , Jens Axboe , Alessandro Zummo , Guenter Roeck , Mathieu Poirier , Stephen Boyd , netdev , Philipp Zabel , USB list , Linux MMC List , Linux Kernel Mailing List , linux-spi , Linux IOMMU , Palmer Dabbelt , Linux Crypto Mailing List , Daniel Vetter , Greg Kroah-Hartman , dmaengine , Vladimir Oltean , "David S. Miller" , Jonathan Cameron X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Hi Rob, On Tue, Jun 15, 2021 at 9:16 PM Rob Herring wrote: > If a property has an 'items' list, then a 'minItems' or 'maxItems' with the > same size as the list is redundant and can be dropped. Note that is DT > schema specific behavior and not standard json-schema behavior. The tooling > will fixup the final schema adding any unspecified minItems/maxItems. > > This condition is partially checked with the meta-schema already, but > only if both 'minItems' and 'maxItems' are equal to the 'items' length. > An improved meta-schema is pending. > Signed-off-by: Rob Herring > --- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > @@ -46,7 +46,6 @@ properties: > > clocks: > minItems: 3 > - maxItems: 5 > items: > - description: GMAC main clock > - description: MAC TX clock While resolving the conflict with commit fea99822914039c6 ("dt-bindings: net: document ptp_ref clk in dwmac") in soc/for-next, I noticed the following construct for clock-names: clock-names: minItems: 3 maxItems: 6 contains: enum: - stmmaceth - mac-clk-tx - mac-clk-rx - ethstp - eth-ck - ptp_ref Should this use items instead of enum, and drop maxItems, or is this a valid construct to support specifying the clocks in random order? If the latter, it does mean that the order of clock-names may not match the order of the clock descriptions. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B569C2B9F4 for ; Tue, 22 Jun 2021 08:17:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E736461350 for ; Tue, 22 Jun 2021 08:17:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E736461350 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6CF846E41A; Tue, 22 Jun 2021 08:17:42 +0000 (UTC) Received: from mail-vs1-f49.google.com (mail-vs1-f49.google.com [209.85.217.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id 85D766E41A for ; Tue, 22 Jun 2021 08:17:41 +0000 (UTC) Received: by mail-vs1-f49.google.com with SMTP id x12so3648710vsp.4 for ; Tue, 22 Jun 2021 01:17:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s0hVMlLFV5eIwzuXXBEJWEV7FxMfuDBGtQwv1PuAfDc=; b=iYHVkaLaq2rTrqTStvN12EG/Q6YntXS4khLZGjwrfjqx7zgRxplhLEbd2P6c2ujka0 n+e1W+UDSj4FyIHVQasEdZm1lw0g/7RtMaZkitdpuy3yfAIBdP2sr+0vvMN2dF3Pg2fT OvPDBvylGcRKhTiAJVICHBOqh+bQnGGxJ1v+3HYkxWO9VSGTP54SbbovHFw3Pd4FNHIR eqsjp591+3lvt3QDkq1NmMmIcoVVNVc1I5/9nfiehzvNH1nmZWET+gcWvjhiSRJk5TOa pBBMB8e22jWh7yEBDN49pdYhEukMJTymtS7+px//5AgouqFBgmnQYfh7NF/LpQJkmMPJ ceqQ== X-Gm-Message-State: AOAM531ZQN5V7GQoC5E76EB9AS+Mti5IlBCN0kLkVaKZPiuApOACZt3J gVunOQ+4FcOqHgYO2n7w75SHXRfDFSIJI19Mtl8= X-Google-Smtp-Source: ABdhPJz3clw2O8tsVFk5F4OGcaBfo9Z8eHqvoF8LwYXAPGollSTCOREHx1S0f08A9nsiznMjaM5G5srL4UVXlJSotsU= X-Received: by 2002:a05:6102:2011:: with SMTP id p17mr21421376vsr.40.1624349860512; Tue, 22 Jun 2021 01:17:40 -0700 (PDT) MIME-Version: 1.0 References: <20210615191543.1043414-1-robh@kernel.org> In-Reply-To: <20210615191543.1043414-1-robh@kernel.org> From: Geert Uytterhoeven Date: Tue, 22 Jun 2021 10:17:28 +0200 Message-ID: Subject: Re: [PATCH] dt-bindings: Drop redundant minItems/maxItems To: Rob Herring Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , ALSA Development Mailing List , Daniel Lezcano , Alexandre Belloni , Linux PWM List , linux-iio@vger.kernel.org, linux-pci , "open list:REMOTE PROCESSOR \(REMOTEPROC\) SUBSYSTEM" , Ulf Hansson , DRI Development , linux-ide@vger.kernel.org, Linux I2C , linux-phy@lists.infradead.org, linux-riscv , Lee Jones , linux-clk , linux-rtc@vger.kernel.org, Herbert Xu , Bartosz Golaszewski , Marc Zyngier , Joerg Roedel , Jassi Brar , Vinod Koul , Kishon Vijay Abraham I , David Airlie , "open list:SERIAL DRIVERS" , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Jakub Kicinski , Zhang Rui , Vivien Didelot , Wolfgang Grandegger , Linux Media Mailing List , Ohad Ben-Cohen , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Albert Ou , Linux Watchdog Mailing List , Linux PM list , linux-can@vger.kernel.org, "open list:GPIO SUBSYSTEM" , Mark Brown , Marc Kleine-Budde , Kamal Dasu , Paul Walmsley , Bjorn Helgaas , Krzysztof Kozlowski , Thomas Gleixner , Mauro Carvalho Chehab , Linux ARM , Jens Axboe , Alessandro Zummo , Wim Van Sebroeck , Guenter Roeck , Mathieu Poirier , Stephen Boyd , netdev , USB list , Linux MMC List , Linux Kernel Mailing List , linux-spi , Linux IOMMU , Palmer Dabbelt , Linux Crypto Mailing List , Greg Kroah-Hartman , dmaengine , Vladimir Oltean , "David S. Miller" , Jonathan Cameron Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Rob, On Tue, Jun 15, 2021 at 9:16 PM Rob Herring wrote: > If a property has an 'items' list, then a 'minItems' or 'maxItems' with the > same size as the list is redundant and can be dropped. Note that is DT > schema specific behavior and not standard json-schema behavior. The tooling > will fixup the final schema adding any unspecified minItems/maxItems. > > This condition is partially checked with the meta-schema already, but > only if both 'minItems' and 'maxItems' are equal to the 'items' length. > An improved meta-schema is pending. > Signed-off-by: Rob Herring > --- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > @@ -46,7 +46,6 @@ properties: > > clocks: > minItems: 3 > - maxItems: 5 > items: > - description: GMAC main clock > - description: MAC TX clock While resolving the conflict with commit fea99822914039c6 ("dt-bindings: net: document ptp_ref clk in dwmac") in soc/for-next, I noticed the following construct for clock-names: clock-names: minItems: 3 maxItems: 6 contains: enum: - stmmaceth - mac-clk-tx - mac-clk-rx - ethstp - eth-ck - ptp_ref Should this use items instead of enum, and drop maxItems, or is this a valid construct to support specifying the clocks in random order? If the latter, it does mean that the order of clock-names may not match the order of the clock descriptions. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds 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 X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6BCAC49EAF for ; Tue, 22 Jun 2021 08:17:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8A9CE61358 for ; Tue, 22 Jun 2021 08:17:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A9CE61358 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9h2NNM3ZJaFmZnrQmv9svs12XaYPeqW+mN+ovOcgMSc=; b=oLbEis/+7eFwqL 4nkOs2VzWq0BWqidutyJGkjenXp2naJat7kLKWZgS7HPJq/J/lzRr+tDAS677t6/yndpaOXBr8yHg 9guzzXBbMqrbsllzye5QsH/G7O+AEyWfH6FOZENhgQ54aOtBtTbQFNUe35VTcle+iJIy48Z1bbHkc Czl4dbkvQJNQKl12PTIEgeKZGSiXrfVSpeEtc3wA9uFQv8uOvdUuD4jMYEtcD7+ZtFuW+tSRYTPbe PT3OXmu4FBP4TwMy+yL/6cFr20/9XjAgycMg0SY8qt0I1+tQimHaOsD8JadPhEaDJXRSuSjIaoSdN jVUkwbx/JIAG5c8mx6eQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvbbO-006CrN-4C; Tue, 22 Jun 2021 08:17:46 +0000 Received: from mail-vs1-f43.google.com ([209.85.217.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvbbK-006CpX-74; Tue, 22 Jun 2021 08:17:43 +0000 Received: by mail-vs1-f43.google.com with SMTP id u10so263594vsu.12; Tue, 22 Jun 2021 01:17:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s0hVMlLFV5eIwzuXXBEJWEV7FxMfuDBGtQwv1PuAfDc=; b=Eu3AxSUt+8oEv/deqQc08PxJ351ScChPMZ7a3vPHLkcyoeS2LfHEY9J3PbrA5CPQL4 0l8C4kJWCRZwVktFcEpDLV6L2eer1Ggksdx2GvJy+ySUgKcpA/y/0ECMn/MBQlTWHS7i XCAGTegKiqLNRyFhFgfzwKGAm3gAWjS1MiIfoES7riSZLldAZ6mD5I+a6w0bYvrHwesg Zv/D3U/tT/2bbtpMdMr3LwTnbxRNUvRpng7t9Vn8sA06/wI43XV0OE7b2aMGxmrw6rUQ mIzu2/uVap+VOcmBiTO3FLRTNhsxBj9t2LdU4uhgMizwJHA5hQkfi9+Mvouo/EVCcpiI Gi4A== X-Gm-Message-State: AOAM531qXyHzNpmpR6m2yO8E1bzTCoeSC8ThHyeWxG6szpV0vx6zOah+ eDrGE87EaNullTPn3LMtVk67Cf747ZsE/sXCyC8= X-Google-Smtp-Source: ABdhPJz3clw2O8tsVFk5F4OGcaBfo9Z8eHqvoF8LwYXAPGollSTCOREHx1S0f08A9nsiznMjaM5G5srL4UVXlJSotsU= X-Received: by 2002:a05:6102:2011:: with SMTP id p17mr21421376vsr.40.1624349860512; Tue, 22 Jun 2021 01:17:40 -0700 (PDT) MIME-Version: 1.0 References: <20210615191543.1043414-1-robh@kernel.org> In-Reply-To: <20210615191543.1043414-1-robh@kernel.org> From: Geert Uytterhoeven Date: Tue, 22 Jun 2021 10:17:28 +0200 Message-ID: Subject: Re: [PATCH] dt-bindings: Drop redundant minItems/maxItems To: Rob Herring Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , linux-ide@vger.kernel.org, linux-clk , Linux ARM , Linux Crypto Mailing List , DRI Development , dmaengine , Linux I2C , linux-iio@vger.kernel.org, ALSA Development Mailing List , Linux IOMMU , Linux Media Mailing List , Linux MMC List , netdev , linux-can@vger.kernel.org, linux-pci , linux-phy@lists.infradead.org, "open list:GPIO SUBSYSTEM" , Linux PWM List , "open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM" , linux-riscv , linux-rtc@vger.kernel.org, "open list:SERIAL DRIVERS" , linux-spi , Linux PM list , USB list , Linux Watchdog Mailing List , Jens Axboe , Stephen Boyd , Herbert Xu , "David S. Miller" , David Airlie , Daniel Vetter , Vinod Koul , Bartosz Golaszewski , Kamal Dasu , Jonathan Cameron , Lars-Peter Clausen , Thomas Gleixner , Marc Zyngier , Joerg Roedel , Jassi Brar , Mauro Carvalho Chehab , Krzysztof Kozlowski , Ulf Hansson , Jakub Kicinski , Wolfgang Grandegger , Marc Kleine-Budde , Andrew Lunn , Vivien Didelot , Vladimir Oltean , Bjorn Helgaas , Kishon Vijay Abraham I , Linus Walleij , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Lee Jones , Ohad Ben-Cohen , Mathieu Poirier , Philipp Zabel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alessandro Zummo , Alexandre Belloni , Greg Kroah-Hartman , Mark Brown , Zhang Rui , Daniel Lezcano , Wim Van Sebroeck , Guenter Roeck X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210622_011742_300003_AC469596 X-CRM114-Status: GOOD ( 30.76 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Hi Rob, On Tue, Jun 15, 2021 at 9:16 PM Rob Herring wrote: > If a property has an 'items' list, then a 'minItems' or 'maxItems' with the > same size as the list is redundant and can be dropped. Note that is DT > schema specific behavior and not standard json-schema behavior. The tooling > will fixup the final schema adding any unspecified minItems/maxItems. > > This condition is partially checked with the meta-schema already, but > only if both 'minItems' and 'maxItems' are equal to the 'items' length. > An improved meta-schema is pending. > Signed-off-by: Rob Herring > --- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > @@ -46,7 +46,6 @@ properties: > > clocks: > minItems: 3 > - maxItems: 5 > items: > - description: GMAC main clock > - description: MAC TX clock While resolving the conflict with commit fea99822914039c6 ("dt-bindings: net: document ptp_ref clk in dwmac") in soc/for-next, I noticed the following construct for clock-names: clock-names: minItems: 3 maxItems: 6 contains: enum: - stmmaceth - mac-clk-tx - mac-clk-rx - ethstp - eth-ck - ptp_ref Should this use items instead of enum, and drop maxItems, or is this a valid construct to support specifying the clocks in random order? If the latter, it does mean that the order of clock-names may not match the order of the clock descriptions. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy