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 19CCFECAAD3 for ; Wed, 31 Aug 2022 07:56:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231164AbiHaH4X (ORCPT ); Wed, 31 Aug 2022 03:56:23 -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-Google-Smtp-Source: AA6agR5TonQq2egwGvsmAbtSJj7KC2P5OqTK7X6niXiRLekmSFrg4NY6LC2zIVdsJmcKXe2E6Q9IwA== 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 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