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 B6714ECAAD2 for ; Mon, 29 Aug 2022 06:31:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229476AbiH2Gbq (ORCPT ); Mon, 29 Aug 2022 02:31:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbiH2Gbp (ORCPT ); Mon, 29 Aug 2022 02:31:45 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 363FBBC97; Sun, 28 Aug 2022 23:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661754702; x=1693290702; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=tBRThUyNOZ/khHKlmG0VTgZ6Qe5VMW4DNL2BjrSmuMM=; b=DItL2JqEjw5vV9FAcwPZufH35fxzg8kRNrP5ykTVM3GW0/zUuSBldNeu 6fJp2UV8Y6L0uCLc1KY/D7pQN9Fy1OrdsSumvFGWjHVpQFuqYhS3iK+kD /MYaXf2wInb9HPfoseGzzbjpIH84mRUKhKXpl6tTMtuf/UUueGYOu9GmO wLWk+mc+DxYkUxEVYNM3NqTuF2Jetx4vTN+rUz8qZ//gE1IoK0pjDbmsD o/HS0vTFIIbOUg0EBzvr0YEJDecLaueXXjc5yddBpjzn+dAxMyPebipXf htsKXdqJ/AMJFCmFrk6K8oBJgNMcmbhQRSPxu4jmWu/AmV+5mTUWkKO0N A==; X-IronPort-AV: E=Sophos;i="5.93,272,1654585200"; d="scan'208";a="188432508" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 28 Aug 2022 23:31:41 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Sun, 28 Aug 2022 23:31:40 -0700 Received: from localhost (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Sun, 28 Aug 2022 23:31:40 -0700 Date: Mon, 29 Aug 2022 08:35:57 +0200 From: Horatiu Vultur To: Krzysztof Kozlowski CC: , , , , , Subject: Re: [PATCH v2 1/2] dt-bindings: lan9662-otpc: document Lan9662 OTPC Message-ID: <20220829063557.3ntgt6uqblgew3r3@soft-dev3-1.localhost> References: <20220825204041.1485731-1-horatiu.vultur@microchip.com> <20220825204041.1485731-2-horatiu.vultur@microchip.com> <96da4897-7b55-84d5-8f1d-892e116153df@linaro.org> <20220826073103.kkotbaxc3latculo@soft-dev3-1.localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The 08/26/2022 20:37, Krzysztof Kozlowski wrote: > > On 26/08/2022 10:31, Horatiu Vultur wrote: > > The 08/26/2022 09:42, Krzysztof Kozlowski wrote: > > > > Hi Krzysztof, > > > >>> +properties: > >>> + compatible: > >>> + items: > >>> + - const: microchip,lan9662-otpc > >>> + - const: microchip,lan9668-otpc > >> > >> Does not look like you tested the bindings. Please run `make > >> dt_binding_check` (see > >> Documentation/devicetree/bindings/writing-schema.rst for instructions). > >> > >> This won't work... > > > > You are right. That was a silly mistake on my side. > > > > It should be: > > --- > > properties: > > compatible: > > enum: > > - microchip,lan9662-otpc > > - microchip,lan9668-otpc > > --- > > Because what I want to achive is to be able to use any of > > string(microchip,lan9662-otpc or microchip,lan9668-otpc) as compatible > > string. > > > > Or this is not the correct change? > > At least with this change dt_binding_check is happy. > > This would be correct from syntax point of view, however maybe not the > best choice from functional point of view. How you wrote the driver and > bindings, these devices are compatible, so why this is not expressed as > compatible devices? OK, so then it should be something like this? --- properties: compatible: items: - const: microchip,lan9662-otpc - const: microchip,lan9668-otpc --- I have tried to look at the following yaml files[1],[2] to see how they have done it. [1] https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml [2] https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml > > Best regards, > Krzysztof -- /Horatiu