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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 27C94C433FE for ; Fri, 30 Sep 2022 07:09:09 +0000 (UTC) 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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+gUrFh2n0jajYWzvex63EFl6I+42IuIYHoA1NNUjEFw=; b=svVmOEIhPBjFK2 hYS6h1HpkM6+PEgqr1cHQy0qKtdcUOk2yV7Ow5OBa8/DSM0JMAprPwL51RObAlheQUx8esKa6uhiG sThW9QgKEOJ/mQCZHPYki3t3waqew0g1qHl4rJd8gADPXKgwXSHIOq52IhYLQvRkFq5yEJXTqMxdf WUkiB3+C9OackOVPmbBb4tlRzHWPqFiyXIMESK1TTa3TufBiVnQvN1zj2f1DNb+0XEakPNRBrCFOO VH8oOQlYACZxwP1s41w4v9jDbiHOsFV9Z9u2sVnNsF6eZ5l3Ti1fpq21cpiJEe9weiiDBnaVHX6QX uJ/Ht9HrOmhxhlCOZAwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oeA7y-007j9O-DP; Fri, 30 Sep 2022 07:08:06 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oeA7v-007j6T-RQ for linux-arm-kernel@lists.infradead.org; Fri, 30 Sep 2022 07:08:05 +0000 Received: by mail-lf1-x136.google.com with SMTP id j16so5534616lfg.1 for ; Fri, 30 Sep 2022 00:08:01 -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:subject:date; bh=nLJnMnuF27KpA54oCyazXvMEh65rDHKWB2qGdOWup6o=; b=dfmkwZ8TCwiafjYtCW45hVGIkW2t/An31iW6b/oglbbyqZvQMwrwR/8bPQlpeym3Bv 91HDEHYPHjHUIosK8WztZ2XhFuf0uqhiZnh0ESybq3ZvoVtB+E7TuZU9wfLz9QlUWjTy GxpPMJQLbt7UmB+hmcobwJa/b1eXEwK3PniXzWw11LZJr889iYz+AS7j1LMQew2d1FPr s7C7yP/6FLG1jw24IATvrNEJQfXwZJvzOl02lqa/MGnMLbs1zsgAjI4iVqQJhiAezQ/+ K1mbgyQKEfLcVwXVqX1b3jLHTOTe1BVn0orLFv6SpLhJbR19ahWo4IM+tH9YU1qLSGcT Q5hw== 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:subject:date; bh=nLJnMnuF27KpA54oCyazXvMEh65rDHKWB2qGdOWup6o=; b=sdLbDKS9rcbiBPTQ8K6PuhDd51VuLchQsiMGRMpcsBKXPbEyJEYTJ2yslamKj90KkV QcuEmanCio3RvAMViMmj/JUnC3NggsxlZhEu06lIrgWmTUXPCGhm27A+cX4qcUcHQljt H8zyjmuXXsHG/NHiqwAJ2vfi88+NHB4g2ID1HWosPpy3QML2K/AwyHm6CburbpfZeg26 wfG+AkVu4CWksOVkdulf+jaOuV+qCobcdEphwkbsQ362qKh6HknHQ0QoxD69UkTDlqME FB+9/JYwWWvZAaAvs9Uyy0R5fqHbGnPvJOpxUeghcFBgu4bNk7BF4F0UcmHQFhJDO0FT kgAw== X-Gm-Message-State: ACrzQf3l47QawhCFygXHAlT4g//c//C3shMpNx6DlDL6s7oY2GclCgXp hqE9e+aD5tonZncim5ULLwEQEA== X-Google-Smtp-Source: AMsMyM6TmE2GOXzon3ucipybgwTivKMpek15bxf0HQkuASIYDcfMTXgavt/SZx50tvXv0SOklI0UPA== X-Received: by 2002:a05:6512:3e4:b0:497:a649:6627 with SMTP id n4-20020a05651203e400b00497a6496627mr3116789lfq.326.1664521679980; Fri, 30 Sep 2022 00:07:59 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id k15-20020a05651239cf00b00499b19f23e8sm195644lfu.279.2022.09.30.00.07.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Sep 2022 00:07:59 -0700 (PDT) Message-ID: <9d65aa4f-3db9-c7e1-f41c-41db8877372e@linaro.org> Date: Fri, 30 Sep 2022 09:07:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH] dt-bindings: samsung: soc: match preferred naming in entire compatible Content-Language: en-US To: Rob Herring Cc: Alim Akhtar , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220926124757.475471-1-krzysztof.kozlowski@linaro.org> <20220929212845.GA2725627-robh@kernel.org> From: Krzysztof Kozlowski In-Reply-To: <20220929212845.GA2725627-robh@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220930_000803_951656_22DB41C0 X-CRM114-Status: GOOD ( 16.61 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 29/09/2022 23:28, Rob Herring wrote: > On Mon, Sep 26, 2022 at 02:47:57PM +0200, Krzysztof Kozlowski wrote: >> Compatible is a string-array, therefore the "select" should look for >> anything containing Samsung SoC part. This allows to validate cases >> like: >> - "samsung,exynos5250-gsc", "samsung,exynos5-gsc" >> - "samsung,exynos5250-pmu", "syscon" >> - "tesla,fsd-mct", "samsung,exynos4210-mct" >> >> Since Tesla FSD builts on top of Exynos blocks, add an adidtional >> pattern for it. >> >> Signed-off-by: Krzysztof Kozlowski >> --- >> .../bindings/arm/samsung/samsung-soc.yaml | 26 +++++++++++++++---- >> 1 file changed, 21 insertions(+), 5 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml b/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml >> index 653f85997643..bb1fdc205b44 100644 >> --- a/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml >> +++ b/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml >> @@ -18,17 +18,33 @@ description: | >> samsung,exynos5433-cmu-isp >> >> select: >> - properties: >> - compatible: >> - pattern: "^samsung,.*(s3c|s5pv|exynos)[0-9a-z]+.*$" >> + allOf: >> + - properties: >> + $nodename: >> + pattern: '^[a-z]' > > Why do you need this? Because otherwise I am matching top-level board compatible, which obviously do not fall into my patterns. > >> + - properties: >> + compatible: >> + contains: >> + pattern: "^samsung,.*(s3c|s5pv|exynos)[0-9a-z]+.*$" >> required: >> - compatible >> >> properties: >> compatible: >> oneOf: >> - - description: Preferred naming style for compatibles of SoC components >> - pattern: "^samsung,(s3c|s5pv|exynos|exynosautov)[0-9]+-.*$" >> + - description: Preferred naming style for compatibles of S3C/S5P/Exynos SoC components >> + minItems: 1 >> + items: >> + - pattern: "^samsung,(s3c|s5pv|exynos|exynosautov)[0-9]+-.*$" >> + - {} >> + - {} > > Wouldn't just contains be fine here too: > > contains: > pattern: "^samsung,(s3c|s5pv|exynos|exynosautov)[0-9]+-.*$" Somehow it does not work like it should - nodes with wrong compatibles pass. I tested with fake compatibles like: samsung,cmu-exynos5433-cmu-top samsung,exynos54xx-cmu-cpif Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel