Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1887550yba; Tue, 2 Apr 2019 18:51:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4raAVWz7tRcIbTmYRFCC7gNUNVwMBMs5mU0OiFL1uERwDyHV7tP3by77LvYHGn+8Ta52U X-Received: by 2002:a63:6883:: with SMTP id d125mr69942647pgc.324.1554256274805; Tue, 02 Apr 2019 18:51:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554256274; cv=none; d=google.com; s=arc-20160816; b=Z408LptstJKrLgKlkx1SZXRKjYdItKWLt2Sbu629IhIscAC8dcjPJOWYBlM6wK0D1n ta7LpSa1yngWk3kK6nWvMkq3nmA+Xr+UlqYjpQlPk85OpAniQthjQTHeV/qzfWHyE0T9 3KXEg4RH5PzBAsuhiONA8EM9e21BQyG4wC7oLb6/5c3k7bjqRh5/LOROJPqmX10XA0ay IHuM1ptL5H7aRfg78y9Uzb+ghp1zgPhQQ3r3773ZvgOo28QQDLtpqE90wUYjNZ/zbstX krzTGFy/syvKAGMckB5PL4KoHb0R8svR8tMMfbQJscUQWW4GSWncKbV9MW1NterA3KaP 6ltw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=mt125S3GYjDMpQGa0eHcfLV6vUxGVoEdGYkmSEUz6lI=; b=S+qnZqPagEjThRGqbNUD/Uv/Q9vsi8CXkBscDy39HQboM3th6Nga7L3tdqqOrKnijC M3y3yLn1CdqHlAV0y9LHqxB2FU99uZJVDrlUNXdn/tVjXzzjnieNJOWjcjYtCmhdD5u7 r6622KzbqoOCwcPdBee1y/K/UxNzSn8jCodmqRmwMY0LWSeYEqJEDwPLNl03YotDcEI9 jBT1CPUIuhTQhXBYrl1llgrJtXU+oQoarhQH/iBSBxMqvkP5odPPk/j4vru1h8wcgOha Q+UslFGY1iOEe6g+d3jRWBV/cJkOwmy6DU2F87pbP3OLkp/wA27bNimTLBqdbGeBKKbn VKiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=h8kU3tRd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d19si12300694pgk.115.2019.04.02.18.50.59; Tue, 02 Apr 2019 18:51:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=h8kU3tRd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726615AbfDCBuX (ORCPT + 99 others); Tue, 2 Apr 2019 21:50:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:56362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726071AbfDCBuX (ORCPT ); Tue, 2 Apr 2019 21:50:23 -0400 Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9B26521738; Wed, 3 Apr 2019 01:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554256221; bh=TtWGvWAmN1BpaQMjj2UUvEHqjIdpAkMpht5VQedYTT8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=h8kU3tRdb9dAQygZmpRYQwEQjqjWuvWxSLiKROVFyXrWhnzdTQU7hfR0SyxlJ/FeG Fy7Q59VfU5M1x6ho6gpspws4tsjGUv5/my0tq+WuDDtorzMslYndpdkXiASP1YAF7D 5rLw/BaUOmIWPCNiN4w9Jbu2ETjl9KpY4oxJ6S5w= Received: by mail-qt1-f175.google.com with SMTP id k2so17765113qtm.1; Tue, 02 Apr 2019 18:50:21 -0700 (PDT) X-Gm-Message-State: APjAAAVU3VDpbYoAXJ7bV9iUy5LoJl/llnjiFf00ti1T8ZDFLevw3l6s vKhb8ehFr8lcnuQ9vzAR7Nc6gPF8dCkB0z6lIg== X-Received: by 2002:a0c:958d:: with SMTP id s13mr59915247qvs.205.1554256220768; Tue, 02 Apr 2019 18:50:20 -0700 (PDT) MIME-Version: 1.0 References: <20190401103034.21062-1-masneyb@onstation.org> <20190401103034.21062-3-masneyb@onstation.org> <68229e7f-4749-cde5-f541-793ab614084d@ti.com> <20190402132440.GA10359@basecamp> In-Reply-To: <20190402132440.GA10359@basecamp> From: Rob Herring Date: Tue, 2 Apr 2019 20:50:09 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/3] dt-bindings: backlight: add lm3630a bindings To: Brian Masney Cc: Dan Murphy , Lee Jones , Daniel Thompson , Jingoo Han , Jacek Anaszewski , Pavel Machek , Mark Rutland , Bartlomiej Zolnierkiewicz , dri-devel , Linux LED Subsystem , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Linux Fbdev development list , Jonathan Marek Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 2, 2019 at 8:24 AM Brian Masney wrote: > > On Tue, Apr 02, 2019 at 07:56:55AM -0500, Dan Murphy wrote: > > This would connect control bank B to control bank A. Or just use a flag to denote to connect them > > and not use led-sources. But led-sources is the property of choice. > > > > led@0 { > > reg = <0>; > > led-sources = < 0 1 >; > > label = "main-lcd"; > > default-brightness = <200>; > > max-brightness = <255>; > > }; > > OK, I see. I wondered how we could do that in device tree. > > > > + properties: > > > + label: > > > + description: | > > > + The label for this LED. If omitted, the label is taken from the node > > > + name (excluding the unit address). It has to uniquely identify a > > > + device, i.e. no other LED class device can be assigned the same label. > > > + > > > + led-sources: > > > + description: | > > > + List of device current outputs the LED is connected to. > > > + allOf: > > > + - $ref: /schemas/types.yaml#/definitions/uint32-array > > > + - minItems: 1 > > > + maxItems: 2 > > > + items: > > > + minimum: 0 > > > + maximum: 1 > > > + > > > > label and led-sources are already defined in the common.txt no need to redefine them here. > > If I'm going to use the new-style bindings, then I'll need to convert > common.txt over to use the new format as well so that the automated > schema validations will work. I'm willing to do that work if there is > interest from the LED / backlight maintainers. The main issue is that > there are 62 references to the file common.txt in the directory > Documentation/devicetree/bindings/leds/. Would the maintainers prefer: That would be awesome. > - Once common.txt is converted to common.yaml, make common.txt only > have a line stating that the common bindings were moved into > common.yaml. We can remove this file once all of the other bindings > are converted to the new-style format. > > - Update all references to common.txt to common.yaml. (1 patch or 62 > patches?) I'd probably go with the former if I had to pick. The real complication here is there's some other changes in flight. > > - Or, just go with the older-style binding format for now. I'm okay if you write it with the assumption that the common properties have a schema even if they don't yet. All that means is you don't need to define the type, but only the additional constraints. There doesn't have to be a reference back to the common property (those references tend to get broken as we can see here). With everything as structured data, we could even generate references or have some tool that can lookup the common definitions. Rob