From patchwork Fri Jun 30 09:22:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Astrid Rost X-Patchwork-Id: 698225 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 A2EEBEB64DA for ; Fri, 30 Jun 2023 09:23:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232465AbjF3JXJ (ORCPT ); Fri, 30 Jun 2023 05:23:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231140AbjF3JWz (ORCPT ); Fri, 30 Jun 2023 05:22:55 -0400 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F97535AF; Fri, 30 Jun 2023 02:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1688116975; x=1719652975; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Jp23SoY0A89Wy3Z2zA4/6qa4NlchrQutGkx1p0uuPYk=; b=qLirsg7ufImVJ9OJleQz85WTnEKRlIG5N/akCRiU2OnciJB7vsPPRFfT tFrx2djsweiz+M5+dP5iZakxZpARNU9XyvKT9JdBaSiPNorkT+BR2NeFK 5ZFBR7wFoHWRSPhg8ukemSoO1/oA4Xq0efgKR+GtEVURpcv6rHTVYSC13 uwlX4HvGFIgTy+MP/ZlllUlgymZcd8X3Ac8BjCyVtxf09hUANUMq1iYQM g9O7TX3kF3UDiflzOUnnGUaciTadi7JV1ltcDpnwjdh3/NeGxl5bh54gd uLFG3KZ0AeFrJQNEh+MfkJMz2A5ELm/GDPhZqQLu44HQfL2RMwqAhYeQi 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 v2 2/2] dt-bindings: leds: Read max-brightness from devicetree Date: Fri, 30 Jun 2023 11:22:47 +0200 Message-ID: <20230630092248.4146169-3-astrid.rost@axis.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230630092248.4146169-1-astrid.rost@axis.com> References: <20230630092248.4146169-1-astrid.rost@axis.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add max-brightness in order to reduce the current on the connected LEDs. 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 led-max-microamp should be preferably used, if it is supported by the controller. Signed-off-by: Astrid Rost Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/leds/common.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml index 11aedf1650a1..603a5630fc3d 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -160,6 +160,16 @@ 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 led-max-microamp should be preferably used, + if it is supported by the controller. + $ref: /schemas/types.yaml#definitions/uint32 + panic-indicator: description: This property specifies that the LED should be used, if at all possible,