From patchwork Thu May 5 13:55:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12839628 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3025EC433F5 for ; Thu, 5 May 2022 13:56:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=1eRIklsyX+iDR6NegMnpjRstsTQw5l5E2b/jbH2i5/U=; b=JcrAX902E3tsGs Ew4df6usUtmDqSWHEWjKHtOPvyus8GMH+WDSp9WCCOyQ/b2I4O/HibNoq5idfEMNpctV2c8xNMJ7I YGkkO7W8f4XThSx6oTu4Lpt7tiAQb+snrgZGnBhtprzl9Ix3c27oe7FBOBLHMwTl9iwaItF79Sudv SxpXvi4oaV2nYdv3WXu7dFNBVxvSAiLCoca9uuf+Ev5W5emakoVJaxHcTHBAG4VebC142iHSe4F/R 2GEZn47HbR+iJ9lFoXWLzFIvml5OghWAfHbyf9vL6JoX5CLlN1XQZ5jxZjByH/r/GUvgpGr9Bgtul D/ql4Td1zD47wjoSRfNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmbx5-00GCd4-J3; Thu, 05 May 2022 13:55:32 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmbwv-00GCXX-E6 for linux-arm-kernel@lists.infradead.org; Thu, 05 May 2022 13:55:22 +0000 Received: by mail-ej1-x62d.google.com with SMTP id n10so8900317ejk.5 for ; Thu, 05 May 2022 06:55:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yEHOMcuhZdD8iiVryYSYsQQJvPICrzWTzhkdXbqbOh4=; b=f0oe8b34qhyHBhRStMC/F4qC80Gsw+fZFC2Ma/awi+7RWzk5h1+3HRlfNufs6nAMS8 7rIeRKou7pZ79oJx1CXV/FEgXdNFiURLRIn7gWMheU+a3IYR6whf27aLpqu/1YLgGWa/ 7vMMQmkCL45KIR0LRq9xa9XnlheqZIy9GWcbfTqGJvNyRkmAcxUhj77BnXsEy0z4QbH3 hCs5XxwTQQehukEcWpaZ2MSgSs7HI/CVXdzhihcSZ9Gtg2QgAwFvR8pkSl/T+QxLHOSq BIhklJ5fsYzBW+yDzpmOTx7WUYjUjaAZQM0jj75FmUEHFANokGeIIW4tiLE/TeeagWbi K+0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yEHOMcuhZdD8iiVryYSYsQQJvPICrzWTzhkdXbqbOh4=; b=vkRnL7ConMTdl5LFOb16YMj/5+AWnguPJGmMvbK3jfVQmTFR/Vadi9D0DxWQeF41Ob vtEZtegUI/DHoSSaogLY/7svED+HdcidPJ25tymABEd5bMJL5xjuou6cSFrI2K3V/WXZ zByLwxUlYIly/81Dx2sFaZPNTJP7Atu6C5YadqPLW6vDwNdmX8lLb9yLM0hK95P3KvdB hNa33BPjLV2d+CrZlYD5EgXBDCHdhEJ09ABzqXRTJeORMb6kvMAr4hU790L+YTKSGJzM ZNxa0fj3S7D3lAeNBK/J5RG06V4lnJHJxnsuQMju+J2qI86GFguKmz7Oxcsfm5kYgI8P AnQg== X-Gm-Message-State: AOAM531JpROK4/pmBoe5njg8YXnr+rVEaKf7Y/PNS6CiC0caCUXCeddO eUO/qPJqKNxMazUcCkHoBSw= X-Google-Smtp-Source: ABdhPJxktlUW+KP6G/s7o+RKbaEpK2t+eFGt0AQo9Buyj9Kw3iqH3RtqwEM0hoyWgp102NXkAmi8bg== X-Received: by 2002:a17:906:3ce9:b0:6ef:a8aa:ab46 with SMTP id d9-20020a1709063ce900b006efa8aaab46mr26563882ejh.579.1651758919171; Thu, 05 May 2022 06:55:19 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id e15-20020a50e44f000000b0042617ba63c7sm877949edm.81.2022.05.05.06.55.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 06:55:18 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Krzysztof Kozlowski Cc: Pavel Machek , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Florian Fainelli , Hauke Mehrtens , Jacek Anaszewski , devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, ansuelsmth@gmail.com, andrew@lunn.ch, vivien.didelot@gmail.com, Vladimir Oltean , Jonathan Corbet , John Crispin , linux-doc@vger.kernel.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH RESEND 0/5] dt-bindings: support Ethernet devices as LED triggers Date: Thu, 5 May 2022 15:55:07 +0200 Message-Id: <20220505135512.3486-1-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220505_065521_523938_233898D3 X-CRM114-Status: GOOD ( 13.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki Some LEDs are designed to represent a state of another device. That may be USB port, Ethernet interface, CPU, hard drive and more. We already have support for LEDs that are designed to indicate USB port (e.g. light on when USB device gets connected). There is DT binding for that and Linux implementation in USB trigger. This patchset adds support for describing LEDs that should react to Ethernet interface status. That is commonly used in routers. They often have LED to display state and activity of selected physical port. It's also common to have multiple LEDs, each reacting to a specific link speed. Patch 5/5 is proof of concept and is not meant to be applied yet. Rafał Miłecki (5): dt-bindings: net: add bitfield defines for Ethernet speeds dt-bindings: net: allow Ethernet devices as LED triggers dt-bindings: leds: add Ethernet triggered LEDs to example ARM: dts: BCM5301X: Add triggers for Luxul XWR-1200 network LEDs leds: trigger: netdev: support DT "trigger-sources" property .../devicetree/bindings/leds/common.yaml | 21 +++++++++++++++ .../bindings/net/ethernet-controller.yaml | 3 +++ arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 22 +++++++++++---- drivers/leds/trigger/ledtrig-netdev.c | 26 ++++++++++++++++++ include/dt-bindings/net/eth.h | 27 +++++++++++++++++++ 5 files changed, 94 insertions(+), 5 deletions(-) create mode 100644 include/dt-bindings/net/eth.h