From patchwork Wed Dec 27 09:02:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 183439 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1319806dyb; Wed, 27 Dec 2023 01:03:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHLTtpN55Uvmrq+R+u9DvXOFJ+GUHLY1rTXRVOvL+6jvmUbzaRiCRliklyjuziNSUvAEkJ0 X-Received: by 2002:a05:6358:99a0:b0:16b:fe18:27fc with SMTP id j32-20020a05635899a000b0016bfe1827fcmr10243209rwb.31.1703667831746; Wed, 27 Dec 2023 01:03:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703667831; cv=none; d=google.com; s=arc-20160816; b=07sgUcLrOkKSIJ4GetddkoDm8Ly+km6FZj6BCezdxiRfEBdGSvrjmNrdZFq+a2UnaV OGuXs470qlmfCQbNsn/nYaqClkYp6czulR6J33dZ8+qMNCHN9W6xK1you82v06orrrbh maPht52uwSFT787j6C7tDSWqLIzbf6ozgEsbAMviWPjEWMuvoL8fbjco+GsK00fM9Ps6 eIWkTiOs7RCy2BJ1xq0qmRZedMXJt3fS/XKfqdVKWFkyRKUc3TP3Mzr75tAuAFQUcwdj 4LZ4MoU5a/35CKFQzMIgBCwkSnSNMQ7euf4VP6eQtwIeUKL419U8nndehsvAhIwnF/tn LUhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=HEHmC5iKOCQu4l12DtoKmZcnhnrMLLjw+Ox9XPLFhKQ=; fh=t/rEUYZBrjIVtJtvItkK7O2t2zLyO6TH9UCXgO6Lsag=; b=sGHtGIPHVWIYtj52eTcMVwu9ivJv0bek4e935ccTAk0lcwUFwq994qcB+VprdMDzXu e0rD8iaubbzSKV9oxCnRRWHsDVk7O/8niQmjHz2VNUy3qz/oT7vlvX6X5atX2bhhkRcX 4WEHAdkdrkVSJBMJeKJUptBpwLg1mgjzaxkNfJF8zepvQbuHnkJOx4NlPSEDuCnADGli mEvbArS+I3CDWsvAiEtgUsPXaaaW+gUXrODT5FGXSLo+wiO3WEoWZtrbZvFxQ15HJNR3 pZCzobwF2X7O6P9qfp4IpsklnSZSpU290BPpueWbyAY7ZMeS1whHigkOk3m60sHQmvW6 HdHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TuuNf1il; spf=pass (google.com: domain of linux-kernel+bounces-11916-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11916-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k13-20020a63560d000000b005c6251da182si10918000pgb.226.2023.12.27.01.03.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 01:03:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11916-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TuuNf1il; spf=pass (google.com: domain of linux-kernel+bounces-11916-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11916-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7BAA028362C for ; Wed, 27 Dec 2023 09:03:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 663FB2D791; Wed, 27 Dec 2023 09:03:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TuuNf1il" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CFDF250F9; Wed, 27 Dec 2023 09:03:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-336c5b5c163so934709f8f.1; Wed, 27 Dec 2023 01:03:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703667786; x=1704272586; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=HEHmC5iKOCQu4l12DtoKmZcnhnrMLLjw+Ox9XPLFhKQ=; b=TuuNf1il+1qZAXeeO4Rle/pYVzw01gNKNlnVsSEdLKJ0BCP0ofgOYFGA+xf0RP6PJp +muZ1vpGHS7Rb/r4aXct0ak5pqRuH110UKyMWfzVI2PgmX6REU0m6cHHVH9XyMFpGbPt EklsOmRAsLhj1Rup8Y8ECW3XQcxf259Q5F/kYA/xq9S9t551/OvByxSkokku53DFbQW7 O3IpSSv8EBFZBYJQH/R7ND7D9iF6T2OafLDyIp5xtspImD8GV1fuBlsJs2yYGLPGSPUi CxKgObPuI1XB2b9XFSrQaHYqX783DyT7hcGzQVwhCJOKBZErDewZueAMwmjhBHkn/mx0 mVXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703667786; x=1704272586; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HEHmC5iKOCQu4l12DtoKmZcnhnrMLLjw+Ox9XPLFhKQ=; b=uU0lvo1za5vuq/oymAfFLZJ4KS+Xm/Gp9YQS+WY3+qh/OBb2NRkAM5/lB14QOZ/804 Wr0UkO0HTCKSkFQAAvhriK+UIBizt8/ndW7HEwpUMlA5lXovKCxKzwd5mXUG7OTxo2f/ Unn7tKBhI6MZkCaMoM61gSqlmAdnpHBOUtXiSoXEpR+EqdCdy46pyM6R9LwU/TuQzaz6 lbasVuLAB2OQFPNgDOowLR18DRfRwGE5aF8zFC0wOrTgm+muKLPreSRwnM77M1oIEvgq qpH3w89h0q05IBW934FGdrAJMV+G43L4FrtYTyHnav5Np4AknSHkwXv4qZgj7EROL3zw /neQ== X-Gm-Message-State: AOJu0Yw5e+6Q6qRUEDkqFl8fG2XlWQ4X92I01foEZhGUJyY0x1tHXYJu krNW76ozJ2EvpSaIfZOBjHY= X-Received: by 2002:adf:9bcc:0:b0:336:5499:47dd with SMTP id e12-20020adf9bcc000000b00336549947ddmr4499910wrc.6.1703667786095; Wed, 27 Dec 2023 01:03:06 -0800 (PST) Received: from localhost.localdomain (host-95-250-248-68.retail.telecomitalia.it. [95.250.248.68]) by smtp.googlemail.com with ESMTPSA id c9-20020a056000104900b003368849129dsm13616525wrx.15.2023.12.27.01.03.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 01:03:05 -0800 (PST) From: Christian Marangi To: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , William Zhang , Anand Gore , Kursad Oney , Florian Fainelli , =?utf-8?b?UmFmYcWCIE1p?= =?utf-8?b?xYJlY2tp?= , Broadcom internal kernel review list , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Heiner Kallweit , Russell King , Jacek Anaszewski , =?utf-8?q?Fern=C3=A1ndez_Roj?= =?utf-8?q?as?= , Sven Schwermer , Christian Marangi , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org Subject: [net-next PATCH v5 1/5] dt-bindings: net: phy: Make LED active-low property common Date: Wed, 27 Dec 2023 10:02:27 +0100 Message-Id: <20231227090231.4246-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231227090231.4246-1-ansuelsmth@gmail.com> References: <20231227090231.4246-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786425199894436147 X-GMAIL-MSGID: 1786425199894436147 Move LED active-low property to common.yaml. This property is currently defined multiple times by bcm LEDs. This property will now be supported in a generic way for PHY LEDs with the use of a generic function. With active-low bool property not defined, active-high is always assumed. Signed-off-by: Christian Marangi --- Changes v5: - Make active-low generic Changes v4: - Drop support for global active-low - Rework to polarity option (for marvell10g series support) Changes v3: - Out of RFC Changes v2: - Add this patch Documentation/devicetree/bindings/leds/common.yaml | 6 ++++++ Documentation/devicetree/bindings/leds/leds-bcm63138.yaml | 4 ---- Documentation/devicetree/bindings/leds/leds-bcm6328.yaml | 4 ---- Documentation/devicetree/bindings/leds/leds-bcm6358.txt | 2 -- .../devicetree/bindings/leds/leds-pwm-multicolor.yaml | 4 ---- Documentation/devicetree/bindings/leds/leds-pwm.yaml | 5 ----- 6 files changed, 6 insertions(+), 19 deletions(-) diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml index c8d0ba5f2327..f5b40df6b421 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -200,6 +200,12 @@ properties: #trigger-source-cells property in the source node. $ref: /schemas/types.yaml#/definitions/phandle-array + active-low: + type: boolean + description: + Makes LED active low. To turn the LED ON, line needs to be + set to low voltage instead of high. + # Required properties for flash LED child nodes: flash-max-microamp: description: diff --git a/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml b/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml index 52252fb6bb32..bb20394fca5c 100644 --- a/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml +++ b/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml @@ -52,10 +52,6 @@ patternProperties: maxItems: 1 description: LED pin number - active-low: - type: boolean - description: Makes LED active low - required: - reg diff --git a/Documentation/devicetree/bindings/leds/leds-bcm6328.yaml b/Documentation/devicetree/bindings/leds/leds-bcm6328.yaml index 51cc0d82c12e..f3a3ef992929 100644 --- a/Documentation/devicetree/bindings/leds/leds-bcm6328.yaml +++ b/Documentation/devicetree/bindings/leds/leds-bcm6328.yaml @@ -78,10 +78,6 @@ patternProperties: - maximum: 23 description: LED pin number (only LEDs 0 to 23 are valid). - active-low: - type: boolean - description: Makes LED active low. - brcm,hardware-controlled: type: boolean description: Makes this LED hardware controlled. diff --git a/Documentation/devicetree/bindings/leds/leds-bcm6358.txt b/Documentation/devicetree/bindings/leds/leds-bcm6358.txt index 6e51c6b91ee5..211ffc3c4a20 100644 --- a/Documentation/devicetree/bindings/leds/leds-bcm6358.txt +++ b/Documentation/devicetree/bindings/leds/leds-bcm6358.txt @@ -25,8 +25,6 @@ LED sub-node required properties: LED sub-node optional properties: - label : see Documentation/devicetree/bindings/leds/common.txt - - active-low : Boolean, makes LED active low. - Default : false - default-state : see Documentation/devicetree/bindings/leds/common.txt - linux,default-trigger : see diff --git a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml index bd6ec04a8727..5edfbe347341 100644 --- a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml +++ b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml @@ -41,10 +41,6 @@ properties: pwm-names: true - active-low: - description: For PWMs where the LED is wired to supply rather than ground. - type: boolean - color: true required: diff --git a/Documentation/devicetree/bindings/leds/leds-pwm.yaml b/Documentation/devicetree/bindings/leds/leds-pwm.yaml index 7de6da58be3c..113b7c218303 100644 --- a/Documentation/devicetree/bindings/leds/leds-pwm.yaml +++ b/Documentation/devicetree/bindings/leds/leds-pwm.yaml @@ -34,11 +34,6 @@ patternProperties: Maximum brightness possible for the LED $ref: /schemas/types.yaml#/definitions/uint32 - active-low: - description: - For PWMs where the LED is wired to supply rather than ground. - type: boolean - required: - pwms - max-brightness