Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp427961rdh; Tue, 19 Dec 2023 03:21:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IFTE5LobFUdMHf4ds9rorVAK4VPFD4iqbyV/Z2nbytnpt5T+RbrItlvaRUuFHEoLOmOpb51 X-Received: by 2002:a05:6a21:191:b0:194:5edb:ab20 with SMTP id le17-20020a056a21019100b001945edbab20mr3773984pzb.58.1702984871791; Tue, 19 Dec 2023 03:21:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702984871; cv=none; d=google.com; s=arc-20160816; b=CIhm0tmP1NMPCZPUdcEF/PKBnU3h3VjWikomwEUuJ/FLChA9S96PQ9JgqcIgRmw5SB ee18GOnXukJTOP3PJ6PGaXQt5cJUrT3PXlP3aUJHnqjzr72bx6NLG6yjrN/CMpasKZ+d WtAwgGjS1etHmBfTs7XRDfwj40tWB7zzzw5T7g5dQWbhrsHT7nfsPojFHRYwOUnw4/lC LjUFGXN4wg5w/k6IBkNl9xn1RmeB0BNvsPryghSiS8QjbIWf8p9Kiz9ecSlaB2WPFC9a 3w6LTJpz7xObE4wRbPHKTy1lLZaWRCtmbG1cZnOW+66b8FGOnmFtM1ASoVm/Y+kuDw/2 bXyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=vrHI+C/8N+6WMywKa2Mtsu2yooelBSjntgs3OJkiMbU=; fh=llZJaFWwZDTfaQnBC7JgCC3IYQJ5UVu1itDHxjdgG5s=; b=zpZueGW9ajdt9ayFliFGbnYxKtrWumNiAZHyNbZiyJJyD63APY8k55IoW2O9c0Q6/d HTEvyXwhBoUX0MR5Gm8XnZhsNVywKntFdBL7G41TOah6c3x1H8kcwQKbc9rF2EkgjNRN bA1rCdJ0i7VsVUyk4SFufc7idE5ybOdjHj35C0QvGEUGti6bnh+k/f9bmv4sil5hg8s+ GzZljO+3y3rGs6afHNMV4jCKmrVaLwA5cGhaQcFFvUsyUzf2j0VYcU3v85M9u7o9eG8m 2Z8edVLIZvHt4UgZ7V1YDgJUClSvONyvaVYdldAYTMX8Dcj2EYmrNVbId2vbJe/Yh/J3 /Ejw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="OLq88u/O"; spf=pass (google.com: domain of linux-kernel+bounces-5071-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5071-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x13-20020a65454d000000b005c179c00758si19999779pgr.891.2023.12.19.03.21.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 03:21:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5071-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="OLq88u/O"; spf=pass (google.com: domain of linux-kernel+bounces-5071-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5071-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6BD3E2819F7 for ; Tue, 19 Dec 2023 11:21:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5451154B2; Tue, 19 Dec 2023 11:21:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OLq88u/O" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7467514F78 for ; Tue, 19 Dec 2023 11:21:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702984861; 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: in-reply-to:in-reply-to:references:references; bh=vrHI+C/8N+6WMywKa2Mtsu2yooelBSjntgs3OJkiMbU=; b=OLq88u/OoCwPqAaEuUTiAvQAkW/O8qlGsksvVzRzsye6YVDCF5fjt5sWB0UIdjTC/ud3rV FQXuPNE7/KwH5MwW0u4ncHtMUsx59n4B5dmjD1MmfOWzy+BqMcKXJ6LVkv0+/sSsi1rWWV ATb3fitMWAfU/bCEzhkakO+B8+AdYKg= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-99-_1HDhC7jOKe_zi2biuhx2Q-1; Tue, 19 Dec 2023 06:21:00 -0500 X-MC-Unique: _1HDhC7jOKe_zi2biuhx2Q-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-33667220256so1614932f8f.3 for ; Tue, 19 Dec 2023 03:20:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702984859; x=1703589659; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vrHI+C/8N+6WMywKa2Mtsu2yooelBSjntgs3OJkiMbU=; b=AkKTuJKPa4XZFDFSywjkGgVh9dyuO0bbr0NBFn3StseCt2E/EDDHdyAg9huMr5JIU5 MYgUacrzGVp2u4hwB7yQWzNKFcuncl138sXC0esio9t95SOw+z52aSJuZTgLHoF5W2hF Hu1AYRxukMtsKkM8AykZG5yWwV0P8pqYFesw2sBHCuCr1qNovLEfHRTkJ2cMcakCXicr FI200QLMOPyrT2cKIxb666zOhku2lqnNEk604lkWg+Jfo340sZIDTQGqcc/9sdqPRUR7 B/ybtscL5475QNjzEmZX++SNNcQ5Y50ew4gZcK6ULtcl23ft8zJc2ECf1frFMy2ew0yc FFPA== X-Gm-Message-State: AOJu0YyPATadSawMZuVe0S4j0vkJbmKciSsRUk928Y59esKXT9vscN15 hGtOS5psy3ymQwnvhFsYlFoUam7r5QqMYIDyJMbMYw2/Kz/8SpIPyQmNq/NfJ8L8SK91/hOXIXD ZA4FPNNEePUCIkkKTFuRvUN1z X-Received: by 2002:a5d:4d05:0:b0:336:58fb:f458 with SMTP id z5-20020a5d4d05000000b0033658fbf458mr2986535wrt.36.1702984858887; Tue, 19 Dec 2023 03:20:58 -0800 (PST) X-Received: by 2002:a5d:4d05:0:b0:336:58fb:f458 with SMTP id z5-20020a5d4d05000000b0033658fbf458mr2986525wrt.36.1702984858527; Tue, 19 Dec 2023 03:20:58 -0800 (PST) Received: from localhost (127.red-79-152-77.dynamicip.rima-tde.net. [79.152.77.127]) by smtp.gmail.com with ESMTPSA id h15-20020a5d504f000000b00336566b885csm11182577wrt.87.2023.12.19.03.20.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 03:20:58 -0800 (PST) From: Javier Martinez Canillas To: Conor Dooley Cc: linux-kernel@vger.kernel.org, Maxime Ripard , Jocelyn Falempe , Krzysztof Kozlowski , Geert Uytterhoeven , Thomas Zimmermann , Peter Robinson , Rob Herring , Conor Dooley , Daniel Vetter , David Airlie , Krzysztof Kozlowski , Maarten Lankhorst , Rob Herring , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH v2 1/2] dt-bindings: display: Add SSD133x OLED controllers In-Reply-To: <20231218-example-envision-b41ca8efa251@spud> References: <20231218132045.2066576-1-javierm@redhat.com> <20231218132045.2066576-2-javierm@redhat.com> <20231218-example-envision-b41ca8efa251@spud> Date: Tue, 19 Dec 2023 12:20:57 +0100 Message-ID: <87il4u5tgm.fsf@minerva.mail-host-address-is-not-set> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Conor Dooley writes: Hello Conor, > On Mon, Dec 18, 2023 at 02:20:35PM +0100, Javier Martinez Canillas wrote: [...] >> +allOf: >> + - $ref: solomon,ssd-common.yaml# >> + >> + - properties: >> + width: >> + default: 96 >> + height: >> + default: 64 > > diff --git a/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml b/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml > index 8feee9eef0fd..ffc939c782eb 100644 > --- a/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml > +++ b/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml > @@ -9,24 +9,24 @@ title: Solomon SSD133x OLED Display Controllers > maintainers: > - Javier Martinez Canillas > > +allOf: > + - $ref: solomon,ssd-common.yaml# > + This part worked correctly... > properties: > compatible: > enum: > - solomon,ssd1331 > > + width: > + default: 96 > + > + height: > + default: 64 > + ...but when trying move the default for the "solomon,width" and "solomon,height" to the properties section, make dt_binding_check complains as follows: LINT Documentation/devicetree/bindings CHKDT Documentation/devicetree/bindings/processed-schema.json /home/javier/devel/linux/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml: properties:solomon,height: 'oneOf' conditional failed, one must be fixed: 'type' is a required property hint: A vendor boolean property can use "type: boolean" 'description' is a required property hint: A vendor boolean property can use "type: boolean" Additional properties are not allowed ('default' was unexpected) hint: A vendor boolean property can use "type: boolean" /home/javier/devel/linux/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml: properties:solomon,height: 'oneOf' conditional failed, one must be fixed: 'enum' is a required property 'const' is a required property hint: A vendor string property with exact values has an implicit type from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# /home/javier/devel/linux/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml: properties:solomon,height: 'oneOf' conditional failed, one must be fixed: '$ref' is a required property 'allOf' is a required property hint: A vendor property needs a $ref to types.yaml from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# hint: Vendor specific properties must have a type and description unless they have a defined, common suffix. from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# /home/javier/devel/linux/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml: properties:solomon,width: 'oneOf' conditional failed, one must be fixed: 'type' is a required property hint: A vendor boolean property can use "type: boolean" 'description' is a required property hint: A vendor boolean property can use "type: boolean" Additional properties are not allowed ('default' was unexpected) hint: A vendor boolean property can use "type: boolean" /home/javier/devel/linux/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml: properties:solomon,width: 'oneOf' conditional failed, one must be fixed: 'enum' is a required property 'const' is a required property hint: A vendor string property with exact values has an implicit type from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# /home/javier/devel/linux/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml: properties:solomon,width: 'oneOf' conditional failed, one must be fixed: '$ref' is a required property 'allOf' is a required property hint: A vendor property needs a $ref to types.yaml from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# hint: Vendor specific properties must have a type and description unless they have a defined, common suffix. from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# SCHEMA Documentation/devicetree/bindings/processed-schema.json DTEX Documentation/devicetree/bindings/display/solomon,ssd133x.example.dts /home/javier/.local/bin/dt-extract-example:75: SyntaxWarning: invalid escape sequence '\s' root_node = re.search('/\s*{', ex) /home/javier/.local/bin/dt-extract-example:79: SyntaxWarning: invalid escape sequence '\s' int_val = re.search('\sinterrupts\s*=\s*<([0-9a-zA-Z |()_]+)>', ex).group(1) DTC_CHK Documentation/devicetree/bindings/display/solomon,ssd133x.example.dtb The warning goes away if I follow the hints and add a type and description to the properties, i.e: diff --git a/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml b/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml index 880c71fdec68..0f4d9ca7456b 100644 --- a/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml +++ b/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml @@ -17,6 +17,20 @@ properties: enum: - solomon,ssd1331 + solomon,width: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Width in pixel of the screen driven by the controller. + The default value is controller-dependent. + default: 96 + + solomon,height: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Height in pixel of the screen driven by the controller. + The default value is controller-dependent. + default: 64 + required: - compatible - reg But that would duplicate information that is already present in the included solomon,ssd-common.yaml schema. Do you know what is the proper way to do this? Or maybe should I just drop the default values for the width and height properties? I just think that is good information to have in the schema. -- Best regards, Javier Martinez Canillas Core Platforms Red Hat