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 867E1C433FE for ; Mon, 23 May 2022 15:30:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237890AbiEWPad (ORCPT ); Mon, 23 May 2022 11:30:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237797AbiEWPac (ORCPT ); Mon, 23 May 2022 11:30:32 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AB3E5FF17 for ; Mon, 23 May 2022 08:30:31 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id p4so24805587lfg.4 for ; Mon, 23 May 2022 08:30:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=11tx15XOReGzewyuScT08wDXVdYnhOX55HUlYSxbVO4=; b=I/gaifkPbRc3Ya6NQFwpk6ISV+74r16YxnkKExnrHD9IOzX28AQ+kmze2NkWbcajxc rHv5gQJ/FdqRvV/VnJLO1m+Wq65NeJ5loZDsTILiCsV+vsO5PvBRb4dAJgDL0iLSKvoS lwH00d024zvK+H4pvhqXRV1DuSqckrOl1deEwV5NBKp+SsgFonev9Rh5nzfhHu4bVffz kdh7vdf76mU5/m8oAi7lTVKXdn1K0OT5IWwaQgFsqrMT7hl7TBlsM83gxD4/EEXnbVAw 1Ekt/995jl2/70M1BYGcUi0EzUGeIq1oLrVv0ObfSdovQG3LLkcYbkm0cZI6SR8aHt6u ph3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=11tx15XOReGzewyuScT08wDXVdYnhOX55HUlYSxbVO4=; b=nL4pT8joPueEbSFEdOe52W365WqLRQPy1nvppq79rbGLjrlRkBDMcTQucrDR/m/dBX mVIdL1Ed9u+lgY1zXE6wz9v9qi40FzC5x3ZIT6yPw+ABRUftST+b2xvNzGIDWBMtSB/6 oJDJaXojVlyjLWGtwFcygp4os6SYXWUWLmjG2pzuERlPzc1zRWHIrH02OoC6vgD9gzs+ Ik9fV87xfflp64xKAvXzb5Uu+ZS7kOBrvjg793K8MELnPnQcWvZQu3hR3IZZTUyXUbEM keWYV8Yow4f5MjBxw7f+p260UkazaYJG+10B/zz2PSPPcnxdKWO6AYh29oKFFNsoR9iV CKzA== X-Gm-Message-State: AOAM533FIfL5IBtxA/hBxPABM8h/dpER1rz2OUwhtSsdKOCWN4/vtxOk NmwCTKTa41OoZvcNlBVF/CrfDg== X-Google-Smtp-Source: ABdhPJyJRlA+mwgV/0/+nj51fLL4x7OsYjBS85WmiP6FyM/mBP3cLnw06RZ5gqPSuvgLQC0gSa9pXQ== X-Received: by 2002:a19:7106:0:b0:478:68b5:86d9 with SMTP id m6-20020a197106000000b0047868b586d9mr6052561lfc.417.1653319829319; Mon, 23 May 2022 08:30:29 -0700 (PDT) Received: from [192.168.0.17] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id z5-20020a056512308500b0047255d211e9sm1888943lfd.280.2022.05.23.08.30.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 May 2022 08:30:28 -0700 (PDT) Message-ID: <4f766cdb-a33b-2470-5b2e-3945c821ce6c@linaro.org> Date: Mon, 23 May 2022 17:30:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 1/3] dt-bindings: leds: Add bindings for the TLC5925 controller Content-Language: en-US To: Jean-Jacques Hiblot , Pavel Machek , Rob Herring , Krzysztof Kozlowski Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220523084958.2723943-1-jjhiblot@traphandler.com> <20220523084958.2723943-2-jjhiblot@traphandler.com> <0e1e417a-6444-ddb5-5c48-c89bd78c5fe8@traphandler.com> From: Krzysztof Kozlowski In-Reply-To: <0e1e417a-6444-ddb5-5c48-c89bd78c5fe8@traphandler.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 23/05/2022 17:16, Jean-Jacques Hiblot wrote: > > On 23/05/2022 12:14, Krzysztof Kozlowski wrote: >> On 23/05/2022 10:49, Jean-Jacques Hiblot wrote: >>> Add bindings documentation for the TLC5925 LED controller. >>> >>> Signed-off-by: Jean-Jacques Hiblot >> Thank you for your patch. There is something to discuss/improve. >> >>> --- >>> devicetree@vger.kernel.org >>> .../bindings/leds/leds-tlc5925.yaml | 100 ++++++++++++++++++ >>> 1 file changed, 100 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/leds/leds-tlc5925.yaml >>> >>> diff --git a/Documentation/devicetree/bindings/leds/leds-tlc5925.yaml b/Documentation/devicetree/bindings/leds/leds-tlc5925.yaml >>> new file mode 100644 >>> index 000000000000..156db599d5a1 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/leds/leds-tlc5925.yaml >> Filename: vendor,device >> so "ti,tlc5925-leds.yaml" for example. >> >> >> >>> @@ -0,0 +1,100 @@ >>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/leds/leds-tlc5925.yaml# >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>> + >>> +title: LEDs connected to TI TLC5925 controller >>> + >>> +maintainers: >>> + - Jean-Jacques Hiblot >>> + >>> +description: | >>> + The TLC5925 is a low-power 16-channel constant-current LED sink driver. >>> + It is controlled through a SPI interface. >>> + It is built around a shift register and latches which convert serial >>> + input data into a parallel output. Several TLC5925 can be chained to >>> + control more than 16 LEDs with a single chip-select. >>> + The brightness level cannot be controlled, each LED is either on or off. >>> + >>> + Each LED is represented as a sub-node of the ti,tlc5925 device. >>> + >>> +properties: >>> + compatible: >>> + const: ti,tlc5925 >>> + >>> + shift_register_length: >>> + maxItems: 1 >> No... >> 1. Did you test your bindings with dt_binding_check? This fails >> obviously... please, do not send untested bindings. >> >> 2. vendor prefix, no underscores, proper type, maxItems look wrong here >> >>> + description: | >>> + The length of the shift register. If several TLC5925 are chained, >>> + shift_register_length should be set to 16 times the number of TLC5925. >>> + The value must be a multiple of 8. >>> + >>> + "#address-cells": >>> + const: 1 >>> + >>> + "#size-cells": >>> + const: 0 >>> + >>> + output-enable-b-gpios: >>> + description: | >>> + GPIO pins to enable/disable the parallel output. They describe the GPIOs >>> + connected to the OE/ pin of the TLC5925s. >> maxItems > > There is no limitation in the driver itself. The actual number of items > here really depends on the number of chips and how they are wired. So you could daisy chain 4 billion of devices? Because by not using any limit you claim that 4 billion is doable? > >> >> >>> + >>> +patternProperties: >>> + "@[a-f0-9]+$": >> How many LEDs you can have here? Usually it is limited, so the pattern >> should be narrowed. > > There is no limitation here either. The chips can be chained to augment > the number of LEDs. > > The max number of LED is equal to the length of the shift-register. Best regards, Krzysztof