Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3274585pxf; Mon, 22 Mar 2021 02:20:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywX8QCkEdCbZrhGl001ut7BYMwgClHF9yf20r87/SeWZwcauEGjHb0lBlzDOisxShNWFU2 X-Received: by 2002:a17:906:5797:: with SMTP id k23mr18651324ejq.515.1616404843099; Mon, 22 Mar 2021 02:20:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616404843; cv=none; d=google.com; s=arc-20160816; b=BNYhVtAyv/ESX6/MeJD1SGjNWHorhPEu0nlkjIBmEcjTXBRxR0SFlcCqNJbDHXvF4D 0Oyy1xzTUg98knJccYDGXQFOOiNGIZxLnsLD+1ZHMG4hphlwZNU9H4krI1++pmwxuNTg uiiy+mb73kzsMiyPMKo6o+bLgxVBqfahNITRfCVsyXYwYuGZWIhs/9MpzDtgaXCf3vtC jsdb8On9jB7w51Tzv10hDoF/2IAu+Tcxv1ZQSSn6KkJG1gicZh6erm2Wvu6bl+hXy3kX tCJWaB/OhMF0IIdwBCz3oynbIT0H8TUf7PhJTw4s4KSLizE4XJV67m/c2k/+Y7niWztc Mgvw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=g5tYG87gKb/YXICTkOJmjh+gZmp5GtwbsSdRRWsGes4=; b=a5LVojb4HFWLUlY6STqiL91ZrJGwcS9RK9HS8qTm/ssmrLHiYA7w2gUE1MPjDWl0h6 72JzaBayjvkfm4N7d06qaMSagQJvmXGY/LBwg1OwD5cRgRQ9IRFQj7dkkscgblk2ApLM Fggb2SP5RM3z3gq+Sj0mzUIqIKRQUxXX/3CcnfzCqo6T+UHtPMvAh1ABFg4Li6/zScEy t3erM4hTI9irroqOKWjbzNmmnygSPx4Y+AYgQvRYNB+Ik56Yq07rGd4+jnof5ndFCinp WN5wh6x8QUKjgfFXq44OiggmNmZBBPeJCLC266YXzwwIP2W5Chiyt6K0sB6PUeiFvHrr ZW9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=pilaUFKz; 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 y2si10731585edu.245.2021.03.22.02.20.20; Mon, 22 Mar 2021 02:20:43 -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=pilaUFKz; 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 S229871AbhCVJS7 (ORCPT + 99 others); Mon, 22 Mar 2021 05:18:59 -0400 Received: from smtp1.axis.com ([195.60.68.17]:11422 "EHLO smtp1.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229715AbhCVJSy (ORCPT ); Mon, 22 Mar 2021 05:18:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1616404734; x=1647940734; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=g5tYG87gKb/YXICTkOJmjh+gZmp5GtwbsSdRRWsGes4=; b=pilaUFKz7saTXddNEHstUqFZy8NhCaHEfpLqE8wMf5faDd1f3zZM/FMl EecydCIj5Rjz8fMftaEt7P124WEaQAIYIIxCFbsNDuxFF7XiBGLnSkW/l 6I4GqkhkPTXQsj39KB+ENBKhxs0gxDft5rJGT7kyGiajJ5FSHybhea6Fq Rn2mhUDRIEHtohcI9lCr6Arjxfykcdc3TR45CiZmMTA0KCe9XHANQXfDT H4OejXw7r3DgugQM0NsW4Pejrn/MMaGJR6u23gN3rbpZyvH36mUXGvAG6 9D5n2ShCTcYYqSh7VoeggAIqSRSc4ffnostCP0B+0MQws8OKINVqlnOi1 A==; From: Hermes Zhang To: Pavel Machek , Dan Murphy , Rob Herring , Hermes Zhang CC: , , , Subject: [PATCH v2] dt-binding: leds: Document leds-multi-gpio bindings Date: Mon, 22 Mar 2021 17:18:19 +0800 Message-ID: <20210322091819.29119-1-chenhui.zhang@axis.com> X-Mailer: git-send-email 2.20.1 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 --- Notes: Fix typo and missing item .../bindings/leds/leds-multi-gpio.yaml | 49 +++++++++++++++++++ 1 file changed, 49 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..bc19d1758d92 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml @@ -0,0 +1,49 @@ +# 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 + +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