From patchwork Mon Apr 4 20:35:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 556092 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83670C433EF for ; Mon, 4 Apr 2022 21:18:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358392AbiDDVTw (ORCPT ); Mon, 4 Apr 2022 17:19:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380594AbiDDUjY (ORCPT ); Mon, 4 Apr 2022 16:39:24 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0806E25EB8 for ; Mon, 4 Apr 2022 13:37:27 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id by7so14606396ljb.0 for ; Mon, 04 Apr 2022 13:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8EWmhxYeescuoCv2qecY489ZApW2YrepMt4Bje0oQts=; b=XtRO6Fx/fmKs2i6b1ODuN/x3OlLed4vBIORJcGplwAGpxWw1rTqHE8UGCgrUN6hJWf DCEaidi9c2pAkn5SVhtyfdipWkxcmjvxYAVykmNvQDF4t+dcl86bCqT4ihxGyflR7vVh wiUyBLZL4hn6C+hm4UE/lSH2UYTmhBKe/+3Q2vsraTDfwC7wIXbfKRa/xRPxcMxI2Q9Y gat4fx2S4J7ToOZI01e9+EDDozAzFFA3pfcZ2UvnVjaAXUnr2wslwNx+2LHwQnPlblq3 QYwu0Xb2X2/k/kawMBA0Qui59ToLuOkunJj2DOxlXE7GAi9SuekrgVjD2ibAdq74hjqK B3jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8EWmhxYeescuoCv2qecY489ZApW2YrepMt4Bje0oQts=; b=bNJU0Hf/Wew/E9xzIjdG7pv8g6lfpgYwnDAPluI9AK5cZUpIegF6BwR5CiuS/2EkQB xvD7dOHxvUtzNEzDOOs/kkVzD7hn5twVNgurAF5A+DACZHjZgQksB9+2q7L5OvsEjaz7 ornjVkeUfKwYsE6B97d9fhXkyOsDzNoQd93bkMtc6QmnKAiDWQ5JY3AmpQ3xIYHHMCKo GrqjNpTE7LmbJsKuUqsLk6tWXKyihOawxv2tW+sGlmKHtx5vC/N7a5Kxk0SBM4re8KJ9 a0HkGnN5NUtR+TE5hYq8IEH6vY1TH6D6MmCwvj1b+WZUQNwp9xtloAxko1VyHKnQOnQz sSag== X-Gm-Message-State: AOAM532YUj7WrIrIl47EhU4G6EdIthAZ9ekVuF75f9xILQIcq1ceS4J9 OzuKGseysp8q+Tj0OIo1+y3ypw== X-Google-Smtp-Source: ABdhPJzKHkHsEZI8v4wcxTfaqUyEuS0DxyKN3vdpdKdh60ERXh+ofmvpzf8iLoQyxkGPpsmsri1Z5g== X-Received: by 2002:a2e:a408:0:b0:246:35dd:c242 with SMTP id p8-20020a2ea408000000b0024635ddc242mr842848ljn.197.1649104645175; Mon, 04 Apr 2022 13:37:25 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id m14-20020a2eb6ce000000b0024afbbbb0c3sm1154650ljo.70.2022.04.04.13.37.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 13:37:24 -0700 (PDT) From: Linus Walleij To: Pavel Machek Cc: linux-leds@vger.kernel.org, Linus Walleij , devicetree@vger.kernel.org, Antonio Ospite , Rob Herring Subject: [PATCH 1/3] dt-bindings: leds: Add regulator-led binding Date: Mon, 4 Apr 2022 22:35:20 +0200 Message-Id: <20220404203522.2068071-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The regulator is a LED connected directly to a regulator and with its brightness controlled by the voltage of the regulator. Cc: devicetree@vger.kernel.org Cc: Antonio Ospite Reviewed-by: Rob Herring Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Collect Rob's ACK - Rebase on v5.18-rc1 --- .../bindings/leds/regulator-led.yaml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/regulator-led.yaml diff --git a/Documentation/devicetree/bindings/leds/regulator-led.yaml b/Documentation/devicetree/bindings/leds/regulator-led.yaml new file mode 100644 index 000000000000..3e020d700c00 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/regulator-led.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/regulator-led.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Device Tree Bindings for Regulator LEDs + +maintainers: + - Linus Walleij + +description: | + Regulator LEDs are powered by a single regulator such that they can + be turned on or off by enabling or disabling the regulator. The available + brightness settings will be inferred from the available voltages on the + regulator, and any constraints on the voltage or current will need to be + specified on the regulator. + +allOf: + - $ref: common.yaml# + +properties: + $nodename: + pattern: '^led.*$' + + compatible: + const: regulator-led + + vled-supply: + description: + The regulator controlling the current to the LED. + + function: true + color: true + linux,default-trigger: true + default-state: true + +required: + - compatible + - vled-supply + +additionalProperties: false + +examples: + - | + #include + + led-heartbeat { + compatible = "regulator-led"; + vled-supply = <®ulator>; + function = LED_FUNCTION_STATUS; + color = ; + linux,default-trigger = "heartbeat"; + }; +...