Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp217889rwe; Wed, 31 Aug 2022 01:15:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR5IXiDEe5KrrDQr/mgarYHmybpBYcdYz07NQ1GseP0zmUmK6a9wEMcX7e/45Pw7bXo+mgvm X-Received: by 2002:a05:6402:1e8d:b0:441:58db:b6a2 with SMTP id f13-20020a0564021e8d00b0044158dbb6a2mr23173427edf.277.1661933754130; Wed, 31 Aug 2022 01:15:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661933754; cv=none; d=google.com; s=arc-20160816; b=k0cE1qsq+nydWjUuheYTFyLAEdSYzz4FGld4BYJrfdCjburziB2On+3Hbs0h57Pvff AZse6Qc7k+V5szs3VzCnLnErNSc0c/aB7H7WWZ9+EHahxSuzB6t/0VV2HvfcMApwWPaz 0udURUyxVPMq+YtDgcRAoCJzr069E4ZnRt9B9AfA72USawpV0vjYjjI9fkq34KRXBxPl VkdPf1Zdk+b1MBz/q0ljofI4CT1maI7cLcmSYQ9WyYhHgI/FaJ5Ne8ygqWdi8D0b636W YoAj8x/7a21+3F0vK8KDZ4cSXGjX7uKG++nnBOxD1QAGmZzLpCYMnF+QFey2/2B4A06J UfMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=LFoMvcld848Bt86qzpVohSCUMCt08caHdx/NoqLmM1U=; b=V0WYbTFZcrquQj2VXA2paB0qHHFWFensDkjKfLMy4Y46Pl9+htREdAfM8RT45QKMBZ jdL8HcNN0uvaV34HLinaW/Xsb81IkjsofEegjdFsv8RroRIpEGQFyL559MnhopUvYYtH yd008y3mPAcprjC2OqzC1+RiETmRD7nVM/hUgQBhbEmWrE35WNjlRRDSJJxG8q+xwQXE iOc/7Lb9FOiY2TAEbSyrdjnNG7nv2CdT9iVjeNDrNMlwJMbQsYvOFVkocvO2A7qNhpKD GNG7qotdL5QytLLi9nYff3HPwEp5NwdZsmYA1hI1A6+2+TwGLRCHfExhjREc/64TRzeh yj2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=C53N8311; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p21-20020a170906a01500b0073101567b5esi9490531ejy.482.2022.08.31.01.15.28; Wed, 31 Aug 2022 01:15:54 -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=@walle.cc header.s=mail2022082101 header.b=C53N8311; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230430AbiHaHsQ (ORCPT + 99 others); Wed, 31 Aug 2022 03:48:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230335AbiHaHsI (ORCPT ); Wed, 31 Aug 2022 03:48:08 -0400 Received: from mail.3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7A13BD1C3; Wed, 31 Aug 2022 00:48:02 -0700 (PDT) Received: from 3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 39D16380; Wed, 31 Aug 2022 09:48:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1661932080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LFoMvcld848Bt86qzpVohSCUMCt08caHdx/NoqLmM1U=; b=C53N8311mpQvKcwwMc/oaAQ2T43ilFDeGn3pJEAf5Dj1bhxVoN5yyvFt1xuaN8eGbZmxqr ykM+SerEUn4fw8PhkS2yrD5M7+z7IKD9rrSZeLuFqV+EPWct1an/C3TZQsi63bMEXcsWhA 80x3PsXna5lV2x6r797byOSWvqHkpotQ/4W5h2BimaCzpXkyx86BqHPRyYgZeCV+hF8Fvm qp2dwrQyw5fABeoxZrcuY2rxzcG49s8Q23w+iEcEI0/ToFqNbso9lqeqcQTVNI5e+EYan4 NctumU/JUcggWiu7GIEHoHc2O67thifBQBmYcjner16A4JPfAKyRUX8gf0/rCg== MIME-Version: 1.0 Date: Wed, 31 Aug 2022 09:48:00 +0200 From: Michael Walle To: Krzysztof Kozlowski Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Srinivas Kandagatla , Shawn Guo , Li Yang , =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= , "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 Subject: Re: [PATCH v1 08/14] dt-bindings: mtd: relax the nvmem compatible string In-Reply-To: References: <20220825214423.903672-1-michael@walle.cc> <20220825214423.903672-9-michael@walle.cc> User-Agent: Roundcube Webmail/1.4.13 Message-ID: X-Sender: michael@walle.cc Content-Type: text/plain; charset=US-ASCII; format=flowed 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,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 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. 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? -michael