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 1D8B0ECAAD1 for ; Wed, 31 Aug 2022 07:48:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230352AbiHaHsT (ORCPT ); Wed, 31 Aug 2022 03:48:19 -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 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