From patchwork Thu Oct 10 12:53:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 13830067 X-Patchwork-Delegate: kuba@kernel.org Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 633391C2DC0; Thu, 10 Oct 2024 12:54:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728564848; cv=none; b=Ur6EIvx9I2/HYDsHvRyvWZNp7clwiORrNogKB8Nnjop09I5xAv4sMZiVw09Q7W5K8BuJMtn5GxCCxPBq+OI0iWavCr+d7LLLuh7fQigD7WIk8QEdUasdT76FhXcuj/cviYMgfh82bAAOuP5rv1tO6GjuXWutAiaLP7CVsuilIxA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728564848; c=relaxed/simple; bh=VgdWPTW7P0L+QIKLU0QKp4uLoRUrGlFZO6w8Mmj3fHU=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=GynSQKPt6siEddTV1Hl4yCL5HC5VBpUDCOTlIcNNfdppRvWotCGsDyCIo53+ZUSB3avNrkHeZ4Kx/J99Y39Ry9F3dWHBd/+SYx3p0uiFUc88KWbforXAUx4zOKq0OAcbLSVxf1rCCnX7iRAnN/5UZxhNyj9p1HDKzrBpz9GG9ek= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.98) (envelope-from ) id 1sysfn-0000000039J-2wnk; Thu, 10 Oct 2024 12:53:43 +0000 Date: Thu, 10 Oct 2024 13:53:36 +0100 From: Daniel Golle To: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Xu Liang , Christian Marangi , Bartosz Golaszewski , Daniel Golle , Robert Marko , Russell King , Jacek Anaszewski , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH net-next v2 1/5] dt-bindings: leds: add 'active-high' property Message-ID: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-Patchwork-Delegate: kuba@kernel.org Other than described in commit c94d1783136e ("dt-bindings: net: phy: Make LED active-low property common") the absence of the 'active-low' property means not to touch the polarity settings which are inherited from reset defaults, the bootloader or bootstrap configuration. Hence, in order to override a LED pin being active-high in case of the default, bootloader or bootstrap setting being active-low an additional property 'active-high' is required. Document that property and make it mutually exclusive to the existing 'active-low' property. Signed-off-by: Daniel Golle Reviewed-by: Krzysztof Kozlowski --- v2: fix commit sha truncation in commit message Documentation/devicetree/bindings/leds/common.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml index bf9a101e4d42..7c3cd7b7412e 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -202,6 +202,12 @@ properties: #trigger-source-cells property in the source node. $ref: /schemas/types.yaml#/definitions/phandle-array + active-high: + type: boolean + description: + Makes LED active high. To turn the LED ON, line needs to be + set to high voltage instead of low. + active-low: type: boolean description: @@ -225,6 +231,14 @@ properties: Maximum timeout in microseconds after which the flash LED is turned off. Required for flash LED nodes with configurable timeout. +allOf: + - if: + required: + - active-low + then: + properties: + active-high: false + additionalProperties: true examples: