Article View: linux.kernel.netdev
Article #23138Re: [PATCH net-next 3/3] net: dsa: lan9303: add LED mode configuration
From: Andrew Lunn
Date: Thu, 26 Nov 2026 15:04
Date: Thu, 26 Nov 2026 15:04
33 lines
9832 bytes
9832 bytes
On Thu, Nov 26, 2026 at 03:13:45PM +0100, Paul Louvel wrote: > The LED function of the LAN9303 and LAN9354 is selected by a single > LED_FUN field that applies to all six LED pins of the two external > ports. > > On some boards the LED straps double as configuration straps for other > functions, such as the PHY address or the EEPROM size, so the desired > LED mode cannot be strapped and has to be programmed by the driver. > > The LED subsystem is not used here: it models each LED independently, > while this hardware has one function field for all LEDs. Ah. This should of been in the cover letter... [Goes and looks at the data sheet] https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/00002308A.pdf So you have the choice of using the pin as a GPIO. So you can implement pure on/off. That gives you the minimum you need for /sys/class/leds. TABLE 12-1: LED OPERATION AS A FUNCTION OF LED_FUN[1:0] The functions are rather scattered all over the place, but i don't see a blocker to supporting hardware offload. It will be messy, yes, but possible. We have been pushing back on vendor properties for LEDs for a number of years, so i don't really want to add one now. Andrew
Technical Details
Message-ID:
<4d2a5db3-2829-4383-8f8d-05cf7c94fddc@lunn.ch>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372184-linux-kernel-netdev=dewy.ruReferences:
<20261126-lan9303-leds-v1-0-a96731317859@bootlin.com> <20261126-lan9303-leds-v1-3-a96731317859@bootlin.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372184-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 3/3] net: dsa: lan9303: add LED mode configuration Date: Thu, 26 Nov 2026 16:04:57 +0100 Organization: Usenet Network Message-ID: <4d2a5db3-2829-4383-8f8d-05cf7c94fddc@lunn.ch> References: <20261126-lan9303-leds-v1-0-a96731317859@bootlin.com> <20261126-lan9303-leds-v1-3-a96731317859@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="493097"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Dk51uI/ZZSaOna3OpebeVeqOHuc= sha256:rRRHDSZTljZdd6Yb8m3u9U+AKh9mrESNbPn30f7dAlU= sha1:F0NLF4IsngSEdJ2tTD54sZkOwB4= sha256:uvx9fetLBeQVN3rCXdx71ZdV/CWgxtoSQhCaB2W5/ts= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id AC614125EE1; Thu, 26 Nov 2026 18:06:31 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=lunn.ch X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xT-9-Ec9Ioj9; Thu, 26 Nov 2026 18:06:27 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-372184-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 59C08125EDF; Thu, 26 Nov 2026 18:06:19 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 14B67478FB; Thu, 26 Nov 2026 15:05:29 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795705519; b=RWn/AnhtU5LiiYf4Z+fa3RN9HpkgpjxfMX6i1/OR0RHG7C8OlTYPrtDdUnZTVxMAZTZ3 Rzh5wi5IV8aAKmYhFO/RdHPqtytYIUV1q9Ud+gvLx+KjmSU3ZVZy5E/iU9lkiEMNVK4i5 +FBELpsrkAIQQtsb+wAByo+UpneOPEeYlETL0/K4Wa4pJE+ebeUy6fUw2S7ecvorN3X2m q1shgAthmRGNzDEvOYGAPrKu8TYrhCGO/5rgQBc8O/BnoDPPl38SEi540x+uNV0eKwrBA AK6zVj8RoSK4m5FyBmfGp0/712a88FU216f8uNrCnZuCtIQIrHSotFo7MczMgbGhcbw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795705519; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date: From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=xgw9Cs2alF68ttVVZEfnYrUIUiuSk8K9/fzAeapHAI0=; b=rjhbskQwnYhchwGeqZrh+iRVHlzpgtUtBxPsv9DYsyr9/UGF4DRc6K79yfOqvjFtVCTE u/uQjL9joUvbNL5aU9GUnjkWtjcueumO+rS1i5P1LWAvWIFQFzJcBOS3rjRwso4CyU9fX wgYAjWokuoe5RLV1FzFJgh5ozNud2hk+wEqYtqh/UIBm26Vr2dbchT9JnNMiy+hjSCYXP V0IQJTg0mCe/VRpd/7pFE0kQMpKRjQTl7zlAG9QI1aLd6ASENta/ITlcpo2e7uvM/ZywL qcb671ST4tJT648sGoK1LjdlqAtjyLsDNfVHm6rFzCRYoYxMnyBCtiK215n2ryx0WKQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=Q9LTg0t5; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB6D9606A337; Thu, 26 Nov 2026 15:05:19 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=Q9LTg0t5 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795705513; b=T/xk/flqqAyRZZepMNOe3ABVxHDdkl5D00M/oe6mgHiwlwB0c29MAhSAY4Rnkw7zs0/a z+Yg83aZZPzN9pyQW0mCsbmX0AA4x5nFe92prwg/xKO4XTLRmA+8WSPaeIP+IzRQnhX/A 8WVub8r/wLz3bPv4XpOmibQYx/LNjtE4BW56pikTMtk8TLKni0mrxayhzTUFT4eoBXRSv sf7HV1pzw6dHN+scevFByjvE+aCiDc0VXlrhavnaPAbpqqQosFW7YV9tLRoP0PcJDjjb+ /JaPMMY7x7pg08eITeKnsrtb/+dLL9RL0Rv3ASo7xD15bFQz9AtNiB1U7fvidFCTUiw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795705513; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=xgw9Cs2alF68ttVVZEfnYrUIUiuSk8K9/fzAeapHAI0=; b=k/VS513WVp0ZyW1NeUpHZrthUpYgtrXDoiwKJ4qXarBAyCq8n4YVbJ3bMDbJ8kiGS8z2 q07EgBzuzHg9dGMsgqeMzFH7NLyHTCS4GBAQnWI90Y1Qkke2QVi+qGRUywGizmFybuKWd 0vXlp04ZVKxm36PWeMKKPsjInCf2R4ygGRuwLf2uBNpcAouaWA4OCbhAAIetgRQobVy83 3Ky24nMn4gI5pU+dv0C6R9FMM7GiQhCKJf2lljSKngn0Pr5+Uxy+VdN04+uMIY9J6IZvH pR4M82kJT6OpaYQPJDwrqMYXF5hH/fTHqW+t9j7df9mhvloejl14leV9d96fMTBySbQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=Q9LTg0t5; arc=none smtp.remote-ip=156.67.10.101 X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98DEB606A686; Thu, 26 Nov 2026 15:05:13 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 98DEB606A686 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=xgw9Cs2alF68ttVVZEfnYrUIUiuSk8K9/fzAeapHAI0=; b=Q9LTg0t5iwzwxgjRUfXVDnEo0J MUIpnGoWGKz4SAnB8COXr7XcVrFzr/3nAygrnbM5+/7izsjYvd5Nwh4Z6HHnPOzNZ/FuAJcFS+b8s uoXOYVuGcF6WjEULHnr+J4Owqm+yQJObnSLJwI4D0U9BcQKTkQZQ7hZa8LDnA6gtywhA=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xWb1t-001b7K-5c; Thu, 26 Nov 2026 16:04:57 +0100 X-Cc: Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org>, Frank Li <Frank.Li@nxp.com>, Jerry Ray <jerry.ray@microchip.com>, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bo Mellberg <bo.mellberg@se.com>, Pascal Eberhard <pascal.eberhard@se.com>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Miquel Raynal <miquel.raynal@bootlin.com> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261126-lan9303-leds-v1-3-a96731317859@bootlin.com>