Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3821912pxb; Wed, 13 Oct 2021 13:46:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHMcSpcrVq5+WQPDQB5F87gaqffvpQ3l7mJGkO8pZPSBQxFokS+zS9wCZSkqwQyiXgfpbi X-Received: by 2002:a17:906:5a47:: with SMTP id my7mr1737306ejc.128.1634157997599; Wed, 13 Oct 2021 13:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634157997; cv=none; d=google.com; s=arc-20160816; b=U+i6bYzIAzbcFXs89DcCB1f4ifMlECOTA+wcR1JoQz28uWmq2fUMVZvJxHfa+uSrQf QTjWz7TeYIEWDK62q3PliUBgymPDEbXKcXavQ11uVzm/NDS9sf6N/lOAZJu2xagUt4wX zIh0vF0ZW+8GNKSof39xsPK/J52NbLzaUPQ+aJk0PUvZ94y82QG/vyR3ZFlknvpl/LKw arWpR87QB33dFTBa13kfRIwv1nc29EkuecpjpYfd0F3TK5JxquLLUwsNjPWYHy4v1BRv TVi3EdPAMEz8xty28ZsCAZAsdRXCeTOt3mBudwUbuz0a2/xf7u8wRZEaNUdPlnGKFLEE AwLg== 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=T96Efl9eT6XvwJpmMkF7ikBRyyYuu2gQBRttoMvDpVg=; b=rRWSvDQoLtaOmFDcrSIwCkjsMgTr2apx3ASfCf1G+kA517JL76tZGPCTRgth6MI4B5 n4yvsbRCsEAVrvgSv4dw/5Z+MkvBtt7O/IIdHTQdGWhCaSm2dk22KcceYcOOxD8w9FBv dgTusiAOaPQ08MloVOHjOfUrhF2s6wCYHTnOtF2HKZGUG6FjzkW4Tq47GiffXZUEcyUK DvNiRottRJYlohQunkTqwv1RrRvDM7jk8W9fTElPSeIdI5a3+ZPqOFZJND4741gNimTI LsjLfHu7cE2ACTCnBzAvr6o5hmMT7czEZPtUqbbj9cUsNLFn0rsWckD9ojC4lICHze/0 NZrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c9d3dO8k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ji21si1187331ejc.604.2021.10.13.13.46.14; Wed, 13 Oct 2021 13:46:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=k20201202 header.b=c9d3dO8k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229788AbhJMUqf (ORCPT + 99 others); Wed, 13 Oct 2021 16:46:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:55936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbhJMUqf (ORCPT ); Wed, 13 Oct 2021 16:46:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B052461100; Wed, 13 Oct 2021 20:44:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634157871; bh=+nyIx/R6AQMNziqWAKrYxDgrkE93NytBCbo06ykWGBQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c9d3dO8k7IiOiaQbcX0quv5rCIRxwco4AqXgsZBLR81lElcBef+iwOFb/9tW2HN+7 1viPYszJDYokoefB3WVx099DA0vtVkrnNx9sEpbF+h7WE7I+MgfH9uqiatHhHouVFE 2xLidHcchoF3ECIgBObt0xlbMCyJ1ClTs449IlIOwAdfnocfapVra65hBzU6yt+qDf WiiB8GTnI7iZyCSrs+5iTOY/fPUS9XvRY//qVuHD8HKUBB4mo7pMemvsoqEVFdh8Cp ACTcNXjuS/BDFC7ZNYbQKRjhdc92k9NtrCWfH/14+mFPam/m71ux2EERBKYk1z4DJC HEK5jmqHxO0fw== From: =?UTF-8?q?Marek=20Beh=C3=BAn?= To: devicetree@vger.kernel.org, linux-leds@vger.kernel.org, pavel@ucw.cz, Andrew Lunn Cc: robh+dt@kernel.org, Jacek Anaszewski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH 2/3] dt-bindings: leds: Add `excludes` property Date: Wed, 13 Oct 2021 22:44:23 +0200 Message-Id: <20211013204424.10961-2-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211013204424.10961-1-kabel@kernel.org> References: <20211013204424.10961-1-kabel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some RJ-45 connectors have LEDs wired in the following way: LED1 +--|>|--+ | | A---+--|<|--+---B LED2 With + on A and - on B, LED1 is ON and LED2 is OFF. Inverting the polarity turns LED1 OFF and LED2 ON. So these LEDs exclude each other. Add new `excludes` property to the LED binding. The property is a phandle-array to all the other LEDs that are excluded by this LED. Signed-off-by: Marek BehĂșn --- Documentation/devicetree/bindings/leds/common.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml index a19acc781e89..03759d2e125a 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -59,6 +59,14 @@ properties: deprecated - use 'function' and 'color' properties instead. function-enumerator has no effect when this property is present. + excludes: + description: + List of LEDs that are excluded by this LED: if this LED is ON, the others + must be OFF. This is mostly the case when there are two LEDs connected in + parallel, but inversely: inverting the polarity of the source turns one + LED ON while the other OFF. There are RJ-45 connectors with such wiring. + $ref: /schemas/types.yaml#/definitions/phandle-array + default-state: description: The initial state of the LED. If the LED is already on or off and the -- 2.32.0