Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26172944rwd; Mon, 3 Jul 2023 06:25:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlH/21uvxNjYrn0dzovnJegbP63d3FG836t/Z4GIipee4OZO6ThLjaVrPe/H3jqmbZzDxpJk X-Received: by 2002:a17:903:32c6:b0:1b8:9598:6508 with SMTP id i6-20020a17090332c600b001b895986508mr4047320plr.18.1688390717741; Mon, 03 Jul 2023 06:25:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688390717; cv=none; d=google.com; s=arc-20160816; b=EF3vUbvKhp/7wFp0S3oedJw5BmXljRhaiAdrkj4afHFSkPxVCiY3dM3Ahd40NyjTLy op5CUUGmdpNXGnp+y828w4z06r526pI3NRy9hpN319Dx96a3yzC3frjCiSKmU7eBMFGH MI9k0l9u2k2AJ1haI/NVakiFGf1LwU2Z8+O0QLiCq7QhZqhJGD+Pm+gUyCi3XTDtxm7O jzqBOULmhchIb3F/7Ydi+9rtzAY9nGIMFcEkctcDwOh8oKhQIR/ZKNLrzzLNkMfg4qjF luYx1UhzTHvTKyX6V43eJaD1MiXNQcSyOi25MAg9OR4YaG16pwe8EwQ4YhpN/YqKBlmw YRFg== 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=KbvtwpanuwW6qJCP+fYqUb+ooGXEb/YS8TqTqotN8+8=; fh=EjrugK7tKu/PvtzoXbWhMVqmDv02azh6FSSiLn65dPA=; b=gpFuxjR46XR4WK4fAkjREGC0gdnPAhM9ET1jfUUxb4fINnkCusto4QAdcGR+sOIzSc /zq9+XvQxN9j4cQK6B70XDaaQG8fi7SrRZAQWnDU8rqofOREYQ4tpsTVKxnKH5o+lR3a 45DzphOn8Oddauwh7bhFyHS8OvkOUrK8omJ6GcGn5vbqpfWszoK+myUmHLqa9O92Hte+ bSrQAvN91W7ciuu5AALahmUYFtBRRKXpGgpmCuECcJCZJfqVNBfOQvn+FHQuHB3i8d5j RgE1PPbgFrIV+7HrpHNUUTEnmMaw/kpyau97p9oUqeNk4YsTTcqgjFh68eh00IRSvjyL /Ixg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=gr9kcHuQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u13-20020a170902e80d00b001b89b802e2dsi1616130plg.26.2023.07.03.06.25.03; Mon, 03 Jul 2023 06:25:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=gr9kcHuQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231159AbjGCND2 (ORCPT + 99 others); Mon, 3 Jul 2023 09:03:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231214AbjGCND0 (ORCPT ); Mon, 3 Jul 2023 09:03:26 -0400 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83636DD; Mon, 3 Jul 2023 06:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1688389405; x=1719925405; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KbvtwpanuwW6qJCP+fYqUb+ooGXEb/YS8TqTqotN8+8=; b=gr9kcHuQAoHVpCDeS9o3cqK8KHu4TtGi07N1D6zea6vVl6FA54wDGMYp c+ywtsIZz38HT144FCfz8tK9RUONDgAXhZ2TOC5RzC9GtMVjkJT9SeHoc cXsAn4tP29FocAAVh0rrPyu7FaRDPSxMDgzao89b1k3I3WK97O2i2BSM+ Hcn7U425UC1Iqpun7l+bwNy1/MR1AI6P5+iUfbnIY1LLUWH4Th8wirboN t936FRDnIRBOrp/KQsK7MpK4lzEfAl9rYype3wOkZiqLZztLdUFY1yXuD jLAE9F6AGaNgLbyLiTzZ11Q6Y0MSM1N94v52kIdfzMfIpVW7xp6XeEqKY w==; From: Astrid Rost To: Andy Shevchenko , Krzysztof Kozlowski , Rob Herring , "Jacek Anaszewski" , Pavel Machek , "Lee Jones" , Rob Herring , Conor Dooley CC: , Astrid Rost , , , Subject: [PATCH v3 1/2] dt-bindings: leds: Read max-brightness from devicetree Date: Mon, 3 Jul 2023 15:03:12 +0200 Message-ID: <20230703130313.548519-2-astrid.rost@axis.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230703130313.548519-1-astrid.rost@axis.com> References: <20230703130313.548519-1-astrid.rost@axis.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Normally, the maximum brightness is determined by the hardware, and this property is not required. This property is used to set a software limit. It could happen that an LED is made so bright that it gets damaged or causes damage due to restrictions in a specific system, such as mounting conditions. Note that this flag is mainly used for PWM-LEDs, where it is not possible to map brightness to current. Drivers for other controllers should use led-max-microamp. Signed-off-by: Astrid Rost --- Documentation/devicetree/bindings/leds/common.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml index 11aedf1650a1..16f08d0939ce 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -160,6 +160,18 @@ properties: For flash LED controllers with configurable current this property is mandatory for the LEDs in the non-flash modes (e.g. torch or indicator). + max-brightness: + description: + Normally, the maximum brightness is determined by the hardware, and this + property is not required. This property is used to set a software limit. + It could happen that an LED is made so bright that it gets damaged or + causes damage due to restrictions in a specific system, such as mounting + conditions. + Note that this flag is mainly used for PWM-LEDs, where it is not possible + to map brightness to current. Drivers for other controllers should use + led-max-microamp. + $ref: /schemas/types.yaml#definitions/uint32 + panic-indicator: description: This property specifies that the LED should be used, if at all possible, -- 2.30.2