Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1034927pxf; Thu, 25 Mar 2021 22:35:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOQ6TKilzkjwKYTxML5YYmgfz1dij6aWfGTAQrEbsdchaJrX+00zW9LzeUsVqkmnMbD2Iw X-Received: by 2002:aa7:c1d5:: with SMTP id d21mr12634283edp.167.1616736949777; Thu, 25 Mar 2021 22:35:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616736949; cv=none; d=google.com; s=arc-20160816; b=rWd13P3ejOPCLKkL+Hg3TDP9wQQ81rhk1oAyPph44hpVM+kmYF96ggcAuJzWDALNPF vaTiQlt9CBML2HR/40jifFlKSVy4hyX0Xajwsx51olFoGkhMuFOnqBmIe7iO1vTN6M2Q +vO6qQW92n6JXuzvPWyAW3sxaE+bl319gdADErs+/IOT6lSTBDuEyad9iyAwGa2uR2hO hk5Y9Ev4tirlkOdtaC+ZIaPBd3XyGB/vgH7IyXmMS1qZc0yk2+KBEOt42UiV3FsSNiJV EqoW7a35r6UTfCVafCUGyA7IXMb/F88B4E27puWlcgUaiR4ts2QLx5SLfpSh0iTiYsRS Jv5A== 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=12+QAqTdS5qEp89208RDidsj2Q1eud0YTGtFQmVg0vo=; b=YOJfmlV9ztKvywPRhXX4sovpDALldKh7RlYo1dj2sygTkCkIaYdhcVYOhtqVibpaV7 AarW7yJRh6ZPXiQTRlfBPNUyF7q/oIwpLs9STkMoap8UWQR1JW+/wCwYk+/WNP833655 7f2XOFm5IBk4nJlg3yJwBmiEhpW84J67gXONqogEuaiKZDMpfEuW7SqYAjuLXLnY3B7f dDIce9mmopiTgoGw4MiqUDcJs31k22NLnOUgrJ9P9jWl6+jLEFz+d+XTVigX4ACiMoYO VYEvCVPqsNfl2NfgDM/6ffBBgi1Nr8zgzjz6EqVlNdiiweAXyjV7aXZpE0VKAky5o4+W OmJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=JcZMiBPm; 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 ka21si5885111ejc.323.2021.03.25.22.35.27; Thu, 25 Mar 2021 22:35:49 -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=JcZMiBPm; 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 S229906AbhCZF27 (ORCPT + 99 others); Fri, 26 Mar 2021 01:28:59 -0400 Received: from smtp1.axis.com ([195.60.68.17]:33596 "EHLO smtp1.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229768AbhCZF2u (ORCPT ); Fri, 26 Mar 2021 01:28:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1616736530; x=1648272530; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=12+QAqTdS5qEp89208RDidsj2Q1eud0YTGtFQmVg0vo=; b=JcZMiBPmA9/qy007eOFDfD0y9dirLnQh+es/BeUW4BSToRB23rHkjkFe 91AjoMBsaUBTTEOeQNvDZMC+mQxIKtI0rAbTv/QFlWZKEcPO7x5EOuGVX QJxO35PRAaJ8R9fVfo33Om8ZAYdJuX/x8R1uWwVnYw/Zgo4OXGfOokBUI gJVVGLv2Nu3pyMxI/cQY628mZmUL7JUrqtx4yv7WIQkNndvHzcJcNqLQC VU4ruOsZJK67k+ojyBkk761mC4nizwnmFfUOJXfdorgYiFN4+GMISd9os R40mw6upGfNAQr/fwmroVcHX2cV8fSqthEsFA2Q/WHKMx/OiIbZaYn+iK g==; From: Hermes Zhang To: , , CC: , , , , , Subject: [PATCH v2 1/2] dt-binding: leds: Document leds-multi-gpio bindings Date: Fri, 26 Mar 2021 13:28:00 +0800 Message-ID: <20210326052801.17666-2-chenhui.zhang@axis.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210326052801.17666-1-chenhui.zhang@axis.com> References: <20210326052801.17666-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 This binding represents LED devices which are controller with multiple GPIO lines in order to achieve more than two brightness states. 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..1549f21e8d6e --- /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: 256 # 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