Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp209652rwe; Wed, 31 Aug 2022 01:05:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR5xDkUSQDT5UaQtC40hj6Oyx4l/bKRjnHDA/pqoYwvK23TgG4E8uztrIys4rtGOn8rED/9+ X-Received: by 2002:a17:902:ecc6:b0:172:af77:2952 with SMTP id a6-20020a170902ecc600b00172af772952mr25240016plh.122.1661933104902; Wed, 31 Aug 2022 01:05:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661933104; cv=none; d=google.com; s=arc-20160816; b=M5ItLgYYq2reucT+s+m7uOSri0LjhGccniknpOEUd9EK1UxM6qRqzbmciccx8xXiTV Ysngw9g7DmJFypEpZAsltUv6yuQ7tha4T263P3Lv3Dd6oPo95hWiz5EE0r4gkLB7LPxJ JTVwulSpRfNfurMVnYuSjrXy3Um73/pr4/rGSfrqBwqs3B2BR4317+BiLR48RkfQQAp2 7gor7cucNiG8H/kAon3yvBKaWarEeUzB8XSUtkYiCRrCFlxCopNpM7Esdfs71xlrIi/Z a5J+I29gL4DWY9ikLiYkTFEhOjfq7idXrYrIQ8utv7okriVWTbGcR29HKA15Ph6xzZFQ pDbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=EjNp+7haJJSgy95sPk2VW8hRKYlROSxGZaohd5CN+EI=; b=PVOSyc99jqnB9JWcUzS8yKoa1s4zZiUkrsuMXOSihHBXlQxMz9RTlX7fDwuwDGyHP1 6xHN1FeHST2kkU8kBNjQfbrRQUAE4RAofUfvDlX+v0t5twZBXhgMnxuAsSKX6O5IY3Tn AosrHIOlYNP8MAdEAKAxfr6R46rVz+Bw75Gp4lq5r9nR7Aj8GSCATH0N6L5G+0MgfFAE BsdO1mtl2IhKIRMJrNuQU6j8/ucjHgNk9qrjPAnD5C/u5BQAQH3E2Hx90HQGqROiogcO pq9x+iBHobnsnpXf/CW9WeFyDN/oI+ndyNftJ3FD4wFI47MSDkHG6hu7i6Dc9Vtc4Q/H 9y8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CwqpdxtS; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cv3-20020a056a0044c300b00538516e2c90si6395527pfb.43.2022.08.31.01.04.53; Wed, 31 Aug 2022 01:05:04 -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=@linaro.org header.s=google header.b=CwqpdxtS; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231251AbiHaH4V (ORCPT + 99 others); Wed, 31 Aug 2022 03:56:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231156AbiHaH4N (ORCPT ); Wed, 31 Aug 2022 03:56:13 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BBF512AE4 for ; Wed, 31 Aug 2022 00:55:04 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id p18so10430965ljc.9 for ; Wed, 31 Aug 2022 00:55:03 -0700 (PDT) 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; bh=EjNp+7haJJSgy95sPk2VW8hRKYlROSxGZaohd5CN+EI=; b=CwqpdxtS9UCgIfqRkt6+aIZ0njmYiIrSHVdD82RbExYkj+ULE08yVapfltsyJ9hvSW Rb6AyDPrPUcT6w7doSdjava+dERXsqEeqkJ/OdD9iIWnhGyYr2pbtl8OVMc5f2KR9nKS Qejeur1bzAP74t/mQ82tyWDbqmUDC9AhxRI4X9KatAxvosA3H+xbR59V13PI2JEk8yY4 qWl8JtRsZaoZqu2Oosv2IdDv4tHuE5U72Xa7zFNCUlFfBxSJzmT7ZvD/IY2EURuy74eP vqquwYSd+wYFYdE4xfwCK7GOhmxagKAy3tb2bHzXyZ0n2wc2lCB65CjuZc7jHCba/tZX bOqw== 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; bh=EjNp+7haJJSgy95sPk2VW8hRKYlROSxGZaohd5CN+EI=; b=E9ZZRJ8AT03FrpvOkv7t3GOhcyGUj4jGQ0oFgXiOolXXBXLzxTyEXa4KXxt0qqcdrH GLyjikpkyYpDye/vKjRvmi+PT07o0NeqbxYkQLElbgeTpDiKZR1vnYOMSjINqFO4mSnz fEdzRNuOW2PJdnw1iBSfM2lkvmyjY+sxituJChpP91HGisaeSMxuCrN0tn6ggB2Vyrj9 C7K2SCPJ492GqLsaXCKk17ZdA+jCHHWF4t50gV9rZEU5M48kuePoZ5W5H0gCUAWXvqnq leyQcmM03tMIh8ILskkMzjd9JGWT0v8iMI0kNof4tT5NYcw9OKzxngk++xianjWWH/fT kK5Q== X-Gm-Message-State: ACgBeo2xpYaBjo1MTBiNuF7L/Bb92fKIDqrfCZ4DCN2ze4gVbx8D7N3j e5iDDp+4SJ2+svjfy94bclAcCQ== X-Received: by 2002:a2e:9d8b:0:b0:265:b87d:b43b with SMTP id c11-20020a2e9d8b000000b00265b87db43bmr3660954ljj.531.1661932501985; Wed, 31 Aug 2022 00:55:01 -0700 (PDT) Received: from [192.168.28.124] (balticom-73-99-134.balticom.lv. [109.73.99.134]) by smtp.gmail.com with ESMTPSA id bn38-20020a05651c17a600b0025e778f6f13sm2030296ljb.4.2022.08.31.00.55.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 31 Aug 2022 00:55:01 -0700 (PDT) Message-ID: Date: Wed, 31 Aug 2022 10:55:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH v1 08/14] dt-bindings: mtd: relax the nvmem compatible string Content-Language: en-US To: Michael Walle Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Srinivas Kandagatla , Shawn Guo , Li Yang , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Frank Rowand , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, Ahmad Fatoum References: <20220825214423.903672-1-michael@walle.cc> <20220825214423.903672-9-michael@walle.cc> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 31/08/2022 10:48, Michael Walle wrote: > Am 2022-08-31 09:37, schrieb Krzysztof Kozlowski: >> On 26/08/2022 00:44, Michael Walle wrote: >>> The "user-otp" and "factory-otp" compatible string just depicts a >>> generic NVMEM device. But an actual device tree node might as well >>> contain a more specific compatible string. Make it possible to add >>> more specific binding elsewere and just match part of the compatibles >> >> typo: elsewhere >> >>> here. >>> >>> Signed-off-by: Michael Walle >>> --- >>> Documentation/devicetree/bindings/mtd/mtd.yaml | 7 ++++--- >>> 1 file changed, 4 insertions(+), 3 deletions(-) >>> >>> diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml >>> b/Documentation/devicetree/bindings/mtd/mtd.yaml >>> index 376b679cfc70..0291e439b6a6 100644 >>> --- a/Documentation/devicetree/bindings/mtd/mtd.yaml >>> +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml >>> @@ -33,9 +33,10 @@ patternProperties: >>> >>> properties: >>> compatible: >>> - enum: >>> - - user-otp >>> - - factory-otp >>> + contains: >>> + enum: >>> + - user-otp >>> + - factory-otp >> >> This does not work in the "elsewhere" place. You need to use similar >> approach as we do for syscon or primecell. > > I'm a bit confused. Looking at > Documentation/devicetree/bindings/arm/primecell.yaml > it is done in the same way as this binding. Yes. primecell is like your mtd here. And how are other places with primcell (like other places with user-otp) done? > > Whereas, the syscon use a "select:" on top of it. I'm > pretty sure, I've tested it without the select and the > validator picked up the constraints. > > Could you elaborate on what is wrong here? Select missing? You got warning from Rob, so run tests. I think you will see the errors, just like bot reported them. Best regards, Krzysztof