From patchwork Thu Dec 10 08:24:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 340973 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp5329457jai; Thu, 10 Dec 2020 00:25:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxREqYEH960q9lUi48RM6w8Kkg9TCFWU31y4QEX+CR7VaW8siGpsUCsPI4Ajnog7guR9WUu X-Received: by 2002:a17:906:3553:: with SMTP id s19mr5216830eja.95.1607588756061; Thu, 10 Dec 2020 00:25:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607588756; cv=none; d=google.com; s=arc-20160816; b=H7FKI2eDA26uwRbTF0FRD4d5SmPeySMFXR/qDS2rKDwdQJ3/XKbV4vadJ7a8iREuc8 oXP331GzysRMcPaFXklCuT/WUd4jIfguJVpD2lp397SimfeZelvmNacvkfY8OhtPC5iE TEwMu9GyWZ2HIqm1GQfd1YevGiKqsgYiajjA0bi6JhFy+NCitSG1iuTcXGzF+HfX4OVN PfaqqJjbxc5kac4hdWoe6g+CZblwgoLGP/Xqltgchh8xPxz6mKHPY7XKM9sIvlMS6TC/ vzlG1OEM5c5lH+/uecupDpPhLFBKJUN6QB17jO/mmMRUAIE4q3KtXIjM/uHjhBOaEzGS RgSw== 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=WAhMiurFGcN8lmdrtgL19tRIfj++8c+t8lu8Ts8kGNs=; b=TViko7hxWgqCP90eVae56zrosxvdCW5f/vqb6i1Cn6PkwMlZy+8rh7mxIlto69AaQs WNxKk9ZJC8rM08StvrZIokXUTBePrt/4f84EmYyhndNj+FKfVvbN+UuDJYQkxZwcb8y7 4WPN/S6acZEw6TAaK/O/L8dvX2/7o8+uznH6/XmMTPBdgg/vfznSAKzSxJwUceAnh8gN ItJfQJFrFHQCd9/jMcJOEDQAAjfjlxgAy3puSZmVbb+VrgH5taLD0RYpMYQNoQpmdz+G zGfbSD/Px0fGgD+aSB+PQz6O/o3Tqs/uJjm3WvrPcM597J5NdQzMqtZwaLPbOZuV7UYB /Uyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w5YXTYLp; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s1si2031332ejq.292.2020.12.10.00.25.55; Thu, 10 Dec 2020 00:25:56 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-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 header.i=@linaro.org header.s=google header.b=w5YXTYLp; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387999AbgLJIZm (ORCPT + 6 others); Thu, 10 Dec 2020 03:25:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387970AbgLJIZl (ORCPT ); Thu, 10 Dec 2020 03:25:41 -0500 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15A0FC061793 for ; Thu, 10 Dec 2020 00:25:01 -0800 (PST) Received: by mail-pg1-x542.google.com with SMTP id o4so3552992pgj.0 for ; Thu, 10 Dec 2020 00:25:01 -0800 (PST) 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=WAhMiurFGcN8lmdrtgL19tRIfj++8c+t8lu8Ts8kGNs=; b=w5YXTYLpRbieEZHw1ZdD0M8phTYwkJ/rFVgcgNYu9+jLkMl5Yuuy2pFCe9Xaz6s7T7 WVRaZCm+m+T/Lc4EtwVAtoQ1/Ft+3+RBMpGdyz04XpewoN7jZADyz2a1MxbBaJGwKwfU m/lQ2BpU2JA7rdxex+2lPqv7Gt7iDTWE3WqfXJ+U98G4SPevEgiRmh4TTx0P936bwxUZ YHcxRFtB1u7xeRjRzfCf5H3GjaJv4L5WUAZU0M1F2TmtbSO526DJ8YqF4WE/NbQ3DgSr 7Z6C8TwjZl7gNAqgpRBcdq/GyXg+B7i8nrZ/06RtWaKvmh7Yg9ABWzTJHeV22xlbBt1a ozFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WAhMiurFGcN8lmdrtgL19tRIfj++8c+t8lu8Ts8kGNs=; b=ObtOK0tbAag9Rg9SW7Fm0VDtE6bAxC3Q97oJ4Jd/PQ7kZlUjOQoWjicHnPw/0IdyFk vT38UdplUHbRJDxcjxbHhiK3bB6Z2fwvzzayAvIvXeCImRD5xolpPvPjoKMdPvlN0gt4 c7QsTbQBJy/MENyI/NYxo1lPoNk/JHiNgxf2OnKTFemOr4CkEhgvqQgeCt3TnW3VD2hq DWQsVj3PsboTG1Pi2TrOdxBtNkKVu/UQBmTTQpmWbaBG+qUHyqJBoRUxlNl+VTp3uCK+ wlcO8kVHcG1NlrAMsDYFcbuYZ0xYFoyN1b/zqRnX+ey3ogA3XWTZcZfNv8qdil3teiA6 jFcA== X-Gm-Message-State: AOAM533YUR+s+UerXCN1RCpizX9BEH+dE/rEl+lwR+r634lOppazquI/ coCRIIh7qcaOpjyh7y/V5uMb X-Received: by 2002:a65:4582:: with SMTP id o2mr5656104pgq.97.1607588700271; Thu, 10 Dec 2020 00:25:00 -0800 (PST) Received: from localhost.localdomain ([103.59.133.81]) by smtp.gmail.com with ESMTPSA id e8sm2303861pfn.176.2020.12.10.00.24.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 00:24:59 -0800 (PST) From: Manivannan Sadhasivam To: jacek.anaszewski@gmail.com, pavel@ucw.cz, dmurphy@ti.com, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, thunder.leizhen@huawei.com, Manivannan Sadhasivam Subject: [PATCH v2] dt-bindings: leds: Document commonly used LED triggers Date: Thu, 10 Dec 2020 13:54:49 +0530 Message-Id: <20201210082449.30586-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This commit documents the LED triggers used commonly in the SoCs. Not all triggers are documented as some of them are very application specific. Most of the triggers documented here are currently used in devicetrees of many SoCs. While at it, let's also sort the triggers in ascending order. Signed-off-by: Manivannan Sadhasivam --- Changes in v2: * Added more triggers, fixed the regex * Sorted triggers in ascending order .../devicetree/bindings/leds/common.yaml | 78 ++++++++++++++----- 1 file changed, 60 insertions(+), 18 deletions(-) -- 2.25.1 Tested-by: Zhen Lei diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml index f1211e7045f1..3c2e2208c1da 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -79,24 +79,66 @@ properties: the LED. $ref: /schemas/types.yaml#definitions/string - enum: - # LED will act as a back-light, controlled by the framebuffer system - - backlight - # LED will turn on (but for leds-gpio see "default-state" property in - # Documentation/devicetree/bindings/leds/leds-gpio.yaml) - - default-on - # LED "double" flashes at a load average based rate - - heartbeat - # LED indicates disk activity - - disk-activity - # LED indicates IDE disk activity (deprecated), in new implementations - # use "disk-activity" - - ide-disk - # LED flashes at a fixed, configurable rate - - timer - # LED alters the brightness for the specified duration with one software - # timer (requires "led-pattern" property) - - pattern + oneOf: + - items: + - enum: + # LED indicates mic mute state + - audio-micmute + # LED indicates audio mute state + - audio-mute + # LED will act as a back-light, controlled by the framebuffer system + - backlight + # LED indicates bluetooth power state + - bluetooth-power + # LED indicates activity of all CPUs + - cpu + # LED will turn on (but for leds-gpio see "default-state" property in + # Documentation/devicetree/bindings/leds/leds-gpio.yaml) + - default-on + # LED indicates disk activity + - disk-activity + # LED indicates disk read activity + - disk-read + # LED indicates disk write activity + - disk-write + # LED indicates camera flash state + - flash + # LED "double" flashes at a load average based rate + - heartbeat + # LED indicates IDE disk activity (deprecated), in new implementations + # use "disk-activity" + - ide-disk + # LED indicates MTD memory activity + - mtd + # LED indicates NAND memory activity (deprecated), + # in new implementations use "mtd" + - nand-disk + # No trigger assigned to the LED. This is the default mode + # if trigger is absent + - none + # LED alters the brightness for the specified duration with one software + # timer (requires "led-pattern" property) + - pattern + # LED flashes at a fixed, configurable rate + - timer + # LED indicates camera torch state + - torch + # LED indicates USB gadget activity + - usb-gadget + # LED indicates USB host activity + - usb-host + - items: + # LED indicates activity of [N]th CPU + - pattern: "^cpu[0-9]{1,2}$" + - items: + # LED indicates power status of [N]th Bluetooth HCI device + - pattern: "^hci[0-9]{1,2}-power$" + - items: + # LED indicates [N]th MMC storage activity + - pattern: "^mmc[0-9]{1,2}$" + - items: + # LED indicates [N]th WLAN Tx activity + - pattern: "^phy[0-9]{1,2}tx$" led-pattern: description: |