Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp739966pxf; Wed, 24 Mar 2021 15:00:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIRKxe7dMmvbRMhmjx75cia1hVEaRncRcWxPyTJeRYsB2WJ4KBDFzWOHP31XO+JenMBK8z X-Received: by 2002:a50:f113:: with SMTP id w19mr5617149edl.226.1616623202979; Wed, 24 Mar 2021 15:00:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616623202; cv=none; d=google.com; s=arc-20160816; b=RY/xqw8UDo+p5stWTd+Fyy23UDfYqgJxH72dLpdZ9PJJMF/PTy4tI9EErDGhOoCzvi bGKYBpUhz/gjgoqzU2QOb+OSE/psKvG7os04MveKxf/uZvMZZty14+i7V58YS+YAra4+ dDvqjxLdmCoPb05Owy+OjFLvm0o6wqTUkjRyF9m3IjVoNM/EE925Ec9RafMkdehePV6i mf/eHCmSxTRerT42/LOnt2V4iD1M4WQAtXemcj/M3Zt3M17kdgoeDZMDgzsgR2YwVk+j C+YREWqz25zRBA9Iowc6D7fKQffVwSpP7Svc/HUgZUlruJVMadCp2vRf+rEyvD7/VLED j2Fw== 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=FqYAXGat8wOi5xlTyUYf8sCt90mXXCBzUhow40r7ORM=; b=0ZnMGuVLGETmFQVdLsiDGWBWGYjX48JPP9OvVUr9tPgNP5x5SSk0SjFbmVxlr/A8Hl NlxpetodfuNLc5Fqt7K4cN5W6clKcgmlc3ndPCSWTe60YmGdByUqq0UbzmzfIepfBkSW SHOzZpb/6bpQLj0LiiTtgG0WUzd5SP9fTYlcYADCwJhRDSgx6dxWUVaBqVw05EQb3hGS UMolSbbVJmBdV+nJ+oPVzm2DUVIKBZMNRI6uQU1C4u0Y0/ibahCGkc1Ec1vUgOXSS5mr AKOrhuSKprb/bzgVW/qK4ZK7jMK3MMe6DvbAsJNVgJkrZ4iFLM5Lf6yrLTgxPp35J1s0 nAXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=nzC26m4Y; 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 kf17si2658409ejc.308.2021.03.24.14.59.39; Wed, 24 Mar 2021 15:00:02 -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=nzC26m4Y; 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 S234929AbhCXCto (ORCPT + 99 others); Tue, 23 Mar 2021 22:49:44 -0400 Received: from smtp2.axis.com ([195.60.68.18]:36850 "EHLO smtp2.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232078AbhCXCtY (ORCPT ); Tue, 23 Mar 2021 22:49:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1616554164; x=1648090164; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=FqYAXGat8wOi5xlTyUYf8sCt90mXXCBzUhow40r7ORM=; b=nzC26m4YHXgL/Kl7zG9OEXOAYqIsCML15OprSSllzpV5FbIwY3rH767N JhUanOYHpa2PXilMFznlHZgtO27WG/zmdIePP1u2kDVK00K4buu3wWz6N CgyZqBOzHUf14kdCvuxMnm/JTFmhhZZ7XCYHJcECCCmqwDuNC+DGmIVnJ P5TGTtmtmDrSmDtVxFEsXrsTb40lMFRxbMnnPtU0m89jW+7WcuKC5CmrO ZVBfqllXjM84oRl9EFc1I2OgfG77EzF1rq64CJHHyEc2oyC6A8sJma5v0 SdbANUiD6Tr+558Jp+nCJdN00+oSq3gg/BuvCkme0suvelbOsrBGf8V1O Q==; From: Hermes Zhang To: Pavel Machek , Dan Murphy , Rob Herring , Hermes Zhang CC: , , , Subject: [PATCH v3] dt-binding: leds: Document leds-multi-gpio bindings Date: Wed, 24 Mar 2021 10:48:43 +0800 Message-ID: <20210324024844.15796-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: Add maxItems .../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