Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp22287pxf; Wed, 24 Mar 2021 19:37:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiHNZ5ZbWl4CC4D7iB+GpjEaC9dw3WyVj/l0rFYpv23TvtvYl2YNCvbgyyV9mWrPUivC9L X-Received: by 2002:a17:907:162b:: with SMTP id hb43mr7005679ejc.41.1616639862087; Wed, 24 Mar 2021 19:37:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616639862; cv=none; d=google.com; s=arc-20160816; b=P75FGHd16DIy0vUdSvyhSvbnxlsiUAD/XHx7NAnqTrE1fZ3JS8VkWckR2mE1MlPK77 WvN126QRGEn/ZXWDIcXQVpcDHFX/ZkgbQTkIS51vDUL0ZSMvUnq8J+Wn3JazZ5Y9yz4h 1BgthvMxys9PK02jIhd8Qn3LM2Q2xKvJjEmVPEjliAQU+zVGzmerAP21gk5HwjIobWXM FT0LCXfQKvXwg7MUTRgABaaOSHqI8DqVITLeUIK9ZYW0JqKmXWG/gzu/8/fDPhlG+XLh AoLbHFYAUN9WD6Cw5F9h3IhdZBgqw4I2v5orrwglTnmnD6aljchZA7q2VgeDyA+kZtTF 2Jrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=qiqpMwxWNSTo8brfltD1saReeVghsUy0YcIHhNsNaCg=; b=Tv5op1Uq6SZxOHwKQ7YTH+K/LFgE/f2Ow02D7X8Ff/YBFfwQ/zHHkrBkrnXrjAoFxN NZcv63IYcd0L1/Nzx/6qedwuflODsY960LQXP1381r2rDJnkRoz8jZxgbvmfl4aja5Fp Fpb0N88l3qP7HJQOTEd1i7OuVOOztcW8WMvXwvEg9MPfqN0fFXBFNJcPMchF8cIKQXVL 7FS+wbX0Ln/CQIpot0riyBW2Uu0GCTKIkg0JwNI5VvKFJ/nQXcMizIgPdoPhUOxTzxry mWkdCXEcRlnObWt6ENJ08qDyGfGQal9O8HhANCV6LZ9Mg6njEr8QPAe7RnyQi2FDvGPk kxIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nic.cz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z13si2872109edc.6.2021.03.24.19.37.18; Wed, 24 Mar 2021 19:37:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nic.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236223AbhCXJlK (ORCPT + 99 others); Wed, 24 Mar 2021 05:41:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232788AbhCXJkh (ORCPT ); Wed, 24 Mar 2021 05:40:37 -0400 X-Greylist: delayed 361 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 24 Mar 2021 02:40:36 PDT Received: from mail.nic.cz (lists.nic.cz [IPv6:2001:1488:800:400::400]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2190C061763; Wed, 24 Mar 2021 02:40:36 -0700 (PDT) Received: from thinkpad (unknown [IPv6:2a0e:b107:ae1:0:3e97:eff:fe61:c680]) by mail.nic.cz (Postfix) with ESMTPSA id 1354F1409CA; Wed, 24 Mar 2021 10:40:33 +0100 (CET) Date: Wed, 24 Mar 2021 10:40:31 +0000 From: Marek Behun To: Hermes Zhang Cc: , , , , , , , , Subject: Re: [PATCH 2/2] dt-binding: leds: Document leds-multi-gpio bindings Message-ID: <20210324104031.10c6216c@thinkpad> In-Reply-To: <20210324075631.5004-3-chenhui.zhang@axis.com> References: <20210324075631.5004-1-chenhui.zhang@axis.com> <20210324075631.5004-3-chenhui.zhang@axis.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-100.0 required=5.9 tests=SHORTCIRCUIT,URIBL_BLOCKED, USER_IN_WELCOMELIST,USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.nic.cz X-Virus-Scanned: clamav-milter 0.102.2 at mail X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 24 Mar 2021 15:56:31 +0800 Hermes Zhang wrote: > From: Hermes Zhang > > Document the device tree bindings of the multiple GPIOs LED driver > Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml. The dt-binding should come before the actual driver. Otherwise there will be a commit with the driver existing but no documentation for its bindings. > +description: > + This will support some LED made of multiple GPIOs and the brightness of the > + LED could map to different states of the GPIOs. Don't use future tense. Don't mention drivers in device tree binding documentation, if it can be helped. The device tree binding documentation should describe devices and their nodes... (and I see that I did a similar mistake for the cznic,turris-omnia-leds.yaml binding, I will have to fix that). Instead the description should be something like this: This binding represents LED devices which are controller with multiple GPIO lines in order to achieve more than two brightness states. > + > +properties: > + compatible: > + const: multi-gpio-led > + > + led-gpios: > + description: Array of one or more GPIOs pins used to control the LED. > + minItems: 1 > + maxItems: 8 # Should be enough > + > + led-states: > + description: | > + The array list the supported states here which will map to brightness > + from 0 to maximum. Each item in the array will present all the GPIOs > + value by bit. Again future tense... > + $ref: /schemas/types.yaml#/definitions/uint8-array > + minItems: 1 > + maxItems: 16 # Should be enough > + > +required: > + - compatible > + - led-gpios > + - led-states > + > +additionalProperties: false > + > +examples: > + - | > + gpios-led { > + compatible = "multi-gpio-led"; > + > + led-gpios = <&gpio0 23 0x1>, > + <&gpio0 24 0x1>; > + led-states = /bits/ 8 <0x00 0x01 0x02 0x03>; > + }; > +...