From patchwork Wed Jan 3 14:12:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 184859 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp5311505dyb; Wed, 3 Jan 2024 15:06:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdJkN9kh3sh0jCMqp0ie40Aw0pbbtKa1rvnOCvKy1bmiv9j+KXHNxHoNHd7bDn4enHS5qQ X-Received: by 2002:a6b:e40d:0:b0:7ba:7c57:f19e with SMTP id u13-20020a6be40d000000b007ba7c57f19emr25908677iog.14.1704323188110; Wed, 03 Jan 2024 15:06:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704323188; cv=none; d=google.com; s=arc-20160816; b=eo12uWiphlIAIEzg2LSWCwSXGXlxfRS1mrdeHPLvAzMZ7emJMQtTQjgpy4xxzOVE75 FwI3yZkiJiTMShc1KdbAULdMTbE1JWoymJMxblyyTI52dWrZ0g/rbX6AuPFBg2eEYIAx zI3OCKyiJbsH/F1xJTG01elnP3Og9FyXk9b7KdOccYwZVKCcFotxKdnh9i0iy8CTrhkw PWAERvq+EMf88Aqk+oS/wGl809x0pG/NwdY7D9xteC+7Tx2+G2fMZnCdzIDN18NESw64 44oZJo3Vzcx6ZBJW82FkTFwGWRyIfF+7WQ5tlmmBdFojZMPzlKcZ4fvSPwIS39cNvDjc /xkw== 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=h5mxLkh2hEgcMvbfMMh1KibA3U7+O5yTNHMAUzMLGy8=; fh=t/rEUYZBrjIVtJtvItkK7O2t2zLyO6TH9UCXgO6Lsag=; b=uN8Be2YsASelQpY9SNfn83XeHcZPIJW7MT00dAwkjqKc07xcgwQ93JEKeHQO6X0uP8 mtTP/GZm1mgJ6WK7b32fWeytXSaPw9XtcyeC1YgTR8+jUL2yCN00m36I6ZH20LiRywZ+ HLbm+AvTrMVZIb48YQ0hH6fgG+4lUtTHvRdMktwmSMiwGEtheePmgObPZUSTjQmxw6DL DcV44bGSsFHkoBSDasi2hOQMb7qRZvcbH+d2ucvqBKzUc+L1v0DoBs2bL0EE0/vsUoIp LPp8B9AJGvGy2ucW7+QXL2Huz4cUQMkT4ES5CWyp+FQQyHt3rYPVaqTMyVDGRLuHahbM 6/nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UM9pj0wD; spf=pass (google.com: domain of linux-kernel+bounces-16099-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16099-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id by33-20020a056a0205a100b005cddb743bc7si20004985pgb.709.2024.01.03.15.06.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 15:06:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16099-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UM9pj0wD; spf=pass (google.com: domain of linux-kernel+bounces-16099-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16099-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6F96DB23F15 for ; Wed, 3 Jan 2024 23:05:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E63C9200DD; Wed, 3 Jan 2024 23:04:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UM9pj0wD" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 A9B5A1EB4D; Wed, 3 Jan 2024 23:04:55 +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-wm1-f53.google.com with SMTP id 5b1f17b1804b1-40d8991f1acso30176745e9.1; Wed, 03 Jan 2024 15:04:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704323094; x=1704927894; 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=h5mxLkh2hEgcMvbfMMh1KibA3U7+O5yTNHMAUzMLGy8=; b=UM9pj0wDPp7q7hu6peH7kQvotbkNn5y6McrJLMb7zmHdcOwjINfXX1k28C6ADKVdXW DtwlgFLU2WmAwlMzkmI0IRNchcSh9EhI/OPJWw9nZTeaDoH0vOw+AuK0EeuB0tnIrTrG SJ/9Dw6fWWrB85nsBkvhvYvPrTM62yCGFcjuvAjvxjIP8ePO52k/ofyu6hnzS6JrzIxG fAQ6b50Gtq4vjJOimEiVMVWdU1NEcY9qkaxKjwvohvN0NCu7OQ1zHmsmJnsGPK4BGqws RNgS60BqNfZHQMa9yWDwrTkk9F3EJdaZm7BieCkifgfmvJOFX8UVHcUUa/b6se9gdgzT SjoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704323094; x=1704927894; 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=h5mxLkh2hEgcMvbfMMh1KibA3U7+O5yTNHMAUzMLGy8=; b=D5veB5JqOn1rcg9y/6jjqeEtjCPEfC9KWMeIWFhnH/u0JK6WZNU+savDUiaTvDNhFr AVvhYfrATlfqW44QZPnpA70olfIpyDTA+BOgkje/ZjDdINlbov55C8wt7qsgdcgblFW5 Ij1WLiiPvPhjloJ4+cSStdpuqqcxXdZBaG2/Q2eGKk/zCFcfgtsAbFYPvotOMqnUQG1P qFyvPJVHoEI7vx7I8UigpOxifgnOd04I4oWLo099+/5lsVIWjkGB4mDANaGvSC87cCWi xEPaaF6GA5Xfbe8xCsQyF5wkwjbLcg75Cnawh9LKoH3LZcQuIVf6jW8deYri9L1gkuZU NdyA== X-Gm-Message-State: AOJu0YyDL60bN3h+9zGs8mRP603xmVBSBDUE4/OlqUeiFHFCilzjDhkR Dlv9ufWiq2YzNbmw0PpSbv8jeDOnJBY= X-Received: by 2002:a05:600c:474b:b0:40d:7247:2846 with SMTP id w11-20020a05600c474b00b0040d72472846mr5192909wmo.110.1704323093646; Wed, 03 Jan 2024 15:04:53 -0800 (PST) Received: from localhost.localdomain (host-80-116-159-187.retail.telecomitalia.it. [80.116.159.187]) by smtp.googlemail.com with ESMTPSA id w13-20020a05600c474d00b0040c46719966sm3740969wmo.25.2024.01.03.15.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 15:04:53 -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 v7 1/5] dt-bindings: net: phy: Make LED active-low property common Date: Wed, 3 Jan 2024 15:12:34 +0100 Message-ID: <20240103141251.23446-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240103141251.23446-1-ansuelsmth@gmail.com> References: <20240103141251.23446-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: 1787112390919854929 X-GMAIL-MSGID: 1787112390919854929 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