Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp853433pxf; Wed, 24 Mar 2021 18:35:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyt5aaqR6GWCIiMy7BNO0VLEFF4t0vXAel4VjahYuXNhlFg334foSrAkni5Cig46Pbm603D X-Received: by 2002:a17:906:f2d2:: with SMTP id gz18mr6725631ejb.454.1616636136330; Wed, 24 Mar 2021 18:35:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616636136; cv=none; d=google.com; s=arc-20160816; b=JVm1I/T/+CG1oRwE87W0yUnVwmsOD1M4mMDyWWu/Um6rVNyUrKEqO21cD/dZ4nA+r/ CF1pYpGWTcjYa83Cmqfdz1zYuYjpua/0OOolLzGeHwtrywS+zu8Tc/xXt1BxCtRNoo/R vukMXX1OLev+XNvT+gnujNthus/LxMop8ndVEvAx8PMRAUzjeoS2xyt6mYaZckgNyVRe IGTBrKs1QEgT0TIP6ER5ygCv1lD38MwUc5YQkZy/aKvPtjrx0heAIoSBlev21Jl4RnZx oW+L3pat5IP+Ou60E4K5GRnuiMTk85RG4Qdlcj2dVe6ySgmOA/BBLViIcOy/dQYT/iYw YZ2Q== 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:date:subject:cc:to:from :dkim-signature; bh=mFdWLTGtRF/mvjQCBNmal6km7ou+oaXMQ5r2PDBTfKI=; b=jpK2DUsqUOIr0DnZybwUcaQp5HWmJ0Yv3ybpR2z15t/mjdESsSqMcf9o2K0kCF4q6P uO75GKi6dBg9RyzdetiJY3WxL40lWWmAQlNlLVCrQJlceMC6/uMQABgL/cU0KcJE+NXl WfB9j81W0J4qAl6QgLC4QGDwKzjDY7fauRqjCCJTGYN/5DZkumpz+++ED20UHXxbvpqy giSUAFibl3t0m9eXXQhnVb4J2Mr15Y/SlghMdqd1NEilkMTHQlj5MR1WjQjXm6uPD290 b0t5f0FgyXtDjIvMnaF1H2pmQ7jrf4ISc9YB7T9hijvDyQpQl+qEbpSDNv++LX0woVnt Wi6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=GEbU7jKO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si2942204edp.540.2021.03.24.18.35.13; Wed, 24 Mar 2021 18:35:36 -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; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=GEbU7jKO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236057AbhCXH56 (ORCPT + 99 others); Wed, 24 Mar 2021 03:57:58 -0400 Received: from smtp2.axis.com ([195.60.68.18]:32629 "EHLO smtp2.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235974AbhCXH5d (ORCPT ); Wed, 24 Mar 2021 03:57:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1616572653; x=1648108653; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mFdWLTGtRF/mvjQCBNmal6km7ou+oaXMQ5r2PDBTfKI=; b=GEbU7jKOWpjYTH7rx6T81Kf0xbZUjKBqrRvBfYkdj74Rr3oG42xWvEU1 KiIDtkMIbW7IG9d/yXCZEB1W08LdcxVMNJLQ0MR0JuXzMiY71nWQmJWlD /ahWLGdvyU3RHb5BNzScJkn7C9JpbykCtHwU3HO2Ny8COVWoPDouzCLfh uck0GAUa082TgNRIk2jNzhrYlVXlR+q8xKUC9E/+SuUYhOJypHclqL6KV lAWe0HoJAvneMUdUb3zuKvqObGL7r5c+9ghg3DKAF4a1uZadpOoli8rOl PGiZhI9cgKa1xyND3FTauK6QtQJXY2hQZPX6Q7HJC/90CScrEUwx2S6LB Q==; From: Hermes Zhang To: , , CC: , , , , , Subject: [PATCH 2/2] dt-binding: leds: Document leds-multi-gpio bindings Date: Wed, 24 Mar 2021 15:56:31 +0800 Message-ID: <20210324075631.5004-3-chenhui.zhang@axis.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324075631.5004-1-chenhui.zhang@axis.com> References: <20210324075631.5004-1-chenhui.zhang@axis.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hermes Zhang Document the device tree bindings of the multiple GPIOs LED driver Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml. Signed-off-by: Hermes Zhang --- .../bindings/leds/leds-multi-gpio.yaml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml diff --git a/Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml b/Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml new file mode 100644 index 000000000000..6f2b47487b90 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-multi-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Multiple GPIOs LED driver + +maintainers: + - Hermes Zhang + +description: + This will support some LED made of multiple GPIOs and the brightness of the + LED could map to different states of the GPIOs. + +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. + $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>; + }; +... -- 2.20.1