Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp194129rdg; Tue, 10 Oct 2023 07:50:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4B4PVH2OMUs19d9CGXB+M5A2gcCyYcA/j1gnE9k4hQ5olUOfWQvU5f4diajI1jxmN1gpU X-Received: by 2002:a05:6a20:3d1d:b0:166:654e:549d with SMTP id y29-20020a056a203d1d00b00166654e549dmr19352404pzi.37.1696949444960; Tue, 10 Oct 2023 07:50:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696949444; cv=none; d=google.com; s=arc-20160816; b=y9iqPg5To6/r6dMcagVehFh1PorErnjS1883RFYz5iAQc6JvI23eWKGmjbwHauHDVA +rFEdfDKq3txC/0fLEf17068avIP0WWbtm6YgUtcXBqVMsMAF5sqV7tyi2I3fyWBbB+S PHPscd1OYHBgWpVGylX5hx/crnXtdTSi9kiVZB3N8dWLd39/ICKFbU6vy+ege1IyH8Va DNaAbVbVPTh/3ni60e6fBRMYv+CeyZ4VqwQKoBX2yK1XgQLgqgg9I7J895ojWHllB8eh zijDnpud+zHX09b3DRTRNe4GIICGURpRDcB3axMcg5HDEQc0V5uUADVsANhCWVP/7PmJ b2uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=XgEvIB9Lj16JEl/+iAEWvISzTvlIoeZB1811VPi8Fl8=; fh=9SHHfX6dThGX6ygChpsSwotnqDXnkS1WYoXT5nMFoWw=; b=Opb0JE0eOitySJ/WeoEPvJZ5fhPZP/7CjbjadMZm5F5Kep2pRc4bQoA37Gt53lSHFa v6joaS1mt75Rq//bRrXe3q6Vt+MkK2dlGu/u8t9NElvCRZrp3O6CbozsQprh4BnmfrFv 33GdCdl503iPYpyhyXWLkQ4ary9uYz8NIHTI6CMlaFCa0cw+g9dg5NaqAXMCxI0ab2L4 NobXkEBRqrmeVPKPMkZS8snG7K2SCONTDtbWv7HOSNRDzNg6jRkPV9LO8Tw37RFkRhFN EyMsI5ebLitsIqzjebgEFZSLRcrsFzA3aGwO120RbPtnuMqHFUgWtJLiF6INJ5FfAEn0 QpZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ExMTOBAl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id z3-20020a17090ad78300b00274d1a584dfsi11561973pju.107.2023.10.10.07.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 07:50:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ExMTOBAl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 5C5F4801B99F; Tue, 10 Oct 2023 07:50:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232986AbjJJOuU (ORCPT + 99 others); Tue, 10 Oct 2023 10:50:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232969AbjJJOuT (ORCPT ); Tue, 10 Oct 2023 10:50:19 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44472C6; Tue, 10 Oct 2023 07:50:18 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C18FC433C9; Tue, 10 Oct 2023 14:50:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696949417; bh=JhuQXBSPj6aFMuffNqgpC/hPfXH0KhfFsBRMiiFK1go=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ExMTOBAlCjDHwV1o41MulJQH3Uo0HoyZQ+8rQ0siqRitFLCVCY/Im8GUZ7ZQbrmUB NrZKOZCyTkGnhNgmm0YhnRyxQ2xIQmB83+bBoZfZhOs4Z2yOyRZ2Y5GqTNlYGJnvac o75MFHwEPpekK8GESRLiX0BOcKlly9rc36svv+D+IpHUl1ejMvGqUirRW9exqsunOX h43r5xJ08xA1ewNQhEu2V8MEJiCA2nmdjEKwmziLTRLQqTXEsSZ8IkHBq50O0HRMFn e5fRg5173sgDZEsEquTd+j0VbWXQI+ZD8hCDC4iPXEEdw3nRG0/SDSctoi1HcKW7qR 4qAXTcoONi+qQ== Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-50308217223so7216909e87.3; Tue, 10 Oct 2023 07:50:17 -0700 (PDT) X-Gm-Message-State: AOJu0YzDO9Ut1cH9Q6L6BmbHnxXjptGDI175QTIdjqYL46JoJBdUiFEv AyrgLAxaLPvoEdTib8fOrp/+jEFzT/5HfWOa1Q== X-Received: by 2002:a05:6512:3e01:b0:503:3453:ea7a with SMTP id i1-20020a0565123e0100b005033453ea7amr19326327lfv.66.1696949415802; Tue, 10 Oct 2023 07:50:15 -0700 (PDT) MIME-Version: 1.0 References: <20231004063712.3348978-1-alvin@pqrs.dk> <20231004063712.3348978-2-alvin@pqrs.dk> <20231004143937.GA3091822-robh@kernel.org> In-Reply-To: From: Rob Herring Date: Tue, 10 Oct 2023 09:50:03 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/4] dt-bindings: clock: si5351: convert to yaml To: =?UTF-8?Q?Alvin_=C5=A0ipraga?= Cc: =?UTF-8?Q?Alvin_=C5=A0ipraga?= , Michael Turquette , Stephen Boyd , Krzysztof Kozlowski , Conor Dooley , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Rabeeh Khoury , "linux-clk@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 10 Oct 2023 07:50:42 -0700 (PDT) X-Spam-Level: ** On Wed, Oct 4, 2023 at 4:40=E2=80=AFPM Alvin =C5=A0ipraga wrote: > > On Wed, Oct 04, 2023 at 09:39:37AM -0500, Rob Herring wrote: > > > + silabs,multisynth-source: > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > + enum: [ 0, 1 ] > > > + description: | > > > > Don't need '|' if no formatting to preserve. > > I thought the line would be too long otherwise. > Column width is 80 in dt-schema as well, right? Yes, and up to 100 is fine as an exception. > > > > > + Source PLL A (0) or B (1) for the corresponding multisynth= divider. But this doesn't look like it is over 80. Maybe if you put after 'description:' on the same line, but that's not what I said. It can still be on the next line. No '|' just means the line endings aren't fixed. Not important now, but if we were to generate pretty documentation from the schemas, then it would matter. > > [...] > > > > + - if: > > > + properties: > > > + compatible: > > > + contains: > > > + enum: > > > + - silabs,si5351a > > > + - silabs,si5351a-msop > > > + - silabs,si5351b > > > > Isn't this just the 'else' for the next one? Or more parts are coming? > > Not sure if more parts are coming - these are the only ones I am aware of= . But I > have not checked thoroughly. I thought it better to be explicit, but I wi= ll > change the next one to an else: in v3 unless you change your mind. > > > > > > + then: > > > + properties: > > > + clocks: > > > + minItems: 1 > > > + maxItems: 1 > > > + clock-names: > > > + items: > > > + - const: xtal > > > + > > > + - if: > > > + properties: > > > + compatible: > > > + contains: > > > + const: silabs,si5351c > > > + then: > > > + properties: > > > + clocks: > > > + minItems: 1 > > > + maxItems: 2 > > > + clock-names: > > > + minItems: 1 > > > + items: > > > + - const: xtal > > > + - const: clkin > > > > Define clocks and clock-names at the top level and just use > > minItems/maxItems in the if/then schemas. > > I was trying to imply here that it is invalid to specify clkin for the fo= rmer > three part types - only for the si5351c. If I specify both in the top-lev= el > clock-names:items then it would allow something like this: > > clk { > compatible =3D "silabs,si5351a-msop"; > clocks =3D <&ref25>; > clock-names =3D "clkin"; /* not OK - Si5351A-MSOP only supports XTAL = */ > }; What I'm saying will work. There are lots of examples in the tree. The top-level defines the full array and then the if/then schema just sets the max size to 1 so that the clkin entry is not allowed. properties: clock-names: minItems: 1 items: - const: xtal - const: clkin if: properties: compatible: contains: const: silabs,si5351a-msop then: properties: clock-names: maxItems: 1 (and then "minItems: 2" for the cases with 2 clocks) Rob