Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp978225rdb; Fri, 2 Feb 2024 09:31:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IEsOysFNjr4NQ2KZrSbzTZRP/ftx9zy8iFyfgUhrWgo4xL6mQQsChOdWd9sPiQmy9oDB0PH X-Received: by 2002:ac8:5f0c:0:b0:42b:ebbd:861d with SMTP id x12-20020ac85f0c000000b0042bebbd861dmr2715624qta.23.1706895114867; Fri, 02 Feb 2024 09:31:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706895114; cv=pass; d=google.com; s=arc-20160816; b=dHjqLiSBNv5gdfDa57SS9i6F0WeGOOEAPeAb/ONTY8B1x6r0EfOchqN1qktlvmalWf Sl29DShMfSIQITiLMv/xYWuNhqEEMjZTRE2Ao5Zb32VsMOrCagqhzniYk91A5nz2RG5p g3uNhVeeGgKQd0qGQY27pmi+Q7pESnVP6TsGAYI4jGtDMUMco7uH/MYiAnHMXX6pib4i abFB1/IfJ9F4e8QaA167dCcIoS9KgHFma7poo/vWdJVzFyPsJ96zdTAcr3cu4OLMW5x4 B1bxo8M6UHxRmyoGnazTlPVdyPbluFx+ofsOxB137vCnsdt1peuzfFmZtzTQL5rGPMxO usZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=SrWGzRDXFcq0Pr0rVOE+6OznEblUBFj2izYzbtEY5sc=; fh=hPFF2THR+vo/6YdyNgrJ/4TjVdTfIZRxZnyY2KyM9NE=; b=De3N/ucpwyXAg95BIucICdDMOUzIZeYiHdvWz8tIw0kqv/HrDf0otdVY+o0QSdrhk1 gWas5fESdTzZIvFzjEKLGq/ArM5cn8SSl0d7+YCfXb19KNlAig/KH2tc0K1FbPubfWT5 rKUZmtkmxReKAFFbqLfISe4F8YbEMin0th/b4B6T58RcAWTbkTMXhH3HAqfIrWe5FcLf cQMXMKwbFjptnoq0HmcNRrkzwl2G6+qKHEv3jcvMO54si5w8WrqiQftLGcxWT9I4Sy8t xGXc+XklTwW0WvhmlDQy6pwnz3KLCXnSb9X8xd7drmq8bA1lyABRu3J51Ls6dGgOTi4Q hKsw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=0AwoUNqs; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-50236-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk X-Forwarded-Encrypted: i=1; AJvYcCXd1MX+cE0Pn3V/Nsj50CTtwVM9wIcsj6RVN2pJqdPbA5TbMVw/Wn63DCo9ordXh0VIxwQHtX4J68Hkt8p+ZdXp2zSJEOOlj2os3aqqHg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a18-20020a05622a065200b0042bb00c9583si2320764qtb.673.2024.02.02.09.31.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 09:31:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50236-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=0AwoUNqs; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-50236-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 0540E1C28B46 for ; Fri, 2 Feb 2024 17:31:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C13114C583; Fri, 2 Feb 2024 17:30:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="0AwoUNqs" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F91B14AD0E; Fri, 2 Feb 2024 17:30:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706895038; cv=none; b=M8Exid2i1sA1sz+nBfphsYssCvNqwp58QUrWGCXCEZdgMAVVpy3rM4hdW05c43yuAiHUsOQLByHYzdLmTN+yXMyF9wTZ+nGapfxnQeFvl+74VTDgPM+oMOtrjfP//khG9kG2qbArSn+UnCKQxI+aWpDvYrqZ5iMiJDiy08c3t48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706895038; c=relaxed/simple; bh=BlIMjuEgLbBMCBsdwCAz1BdgaPd0WZtrspP0SKES5qc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sMFLskLzp2jBJsBrTlS3387YvysmFpKmziwAjaXJdDWqeQRMV/W+KXjn7X/NNqlbfwAJAeBZrM678t8nX9cm0QN+Fi05KsYnE1YXQoqNjNa8IC+hn9Trun9SeX79e3T1sq+XVi9FfvSSWDlIzGo4AbqwB8BTCNfn03DlIqTXIjY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=0AwoUNqs; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=SrWGzRDXFcq0Pr0rVOE+6OznEblUBFj2izYzbtEY5sc=; b=0AwoUNqsmMIvSNZVVt2Ksny2HI 2B5XEYr2LYd/flO3suuyWPhfyFHs2cxroDQtly9R9OOcgLEjCK1+R5EKBmxZoCxDAWIvGNK0+Uy4g V+4GFZnOLkDF3m2cW4wWtYvZUuk8/vrdCJK9Na+dg0S4YTkHkF0CDS8JRqYGD+z5B7NKSYdsBG06h LYxKRw4uSybfu8NTu8NtIKnzKM4LPbH1SQ11PT8llc8Mohx7qRcsmU2YFRbQfK3qtNfdkViOVBP77 JBqp6ThbzqdM8m5CH+4n54DACeQhzIOainmjNQO0o8N5GbRVmhtbgepEO0kUPZ1bWj39QOEEcBkbO KNNFVdbw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55012) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rVxMw-0006Gu-03; Fri, 02 Feb 2024 17:30:26 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rVxMt-0008U5-Nw; Fri, 02 Feb 2024 17:30:23 +0000 Date: Fri, 2 Feb 2024 17:30:23 +0000 From: "Russell King (Oracle)" To: Andrew Lunn Cc: Christian Marangi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Heiner Kallweit , Frank Rowand , Robert Marko , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [net-next PATCH v5 9/9] net: phy: qca807x: add support for configurable LED Message-ID: References: <20240201151747.7524-1-ansuelsmth@gmail.com> <20240201151747.7524-10-ansuelsmth@gmail.com> <46085abf-8e82-4fd9-95b8-95cbfde6e5c2@lunn.ch> <65bd1af9.df0a0220.c0618.9f8d@mx.google.com> <8bbff46a-f316-49b7-82f8-44dbdd452b0d@lunn.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8bbff46a-f316-49b7-82f8-44dbdd452b0d@lunn.ch> Sender: Russell King (Oracle) On Fri, Feb 02, 2024 at 06:08:33PM +0100, Andrew Lunn wrote: > On Fri, Feb 02, 2024 at 05:40:21PM +0100, Christian Marangi wrote: > > On Fri, Feb 02, 2024 at 02:43:37AM +0100, Andrew Lunn wrote: > > > > + > > > > + phydev->drv->led_brightness_set = NULL; > > > > + phydev->drv->led_blink_set = NULL; > > > > + phydev->drv->led_hw_is_supported = NULL; > > > > + phydev->drv->led_hw_control_set = NULL; > > > > + phydev->drv->led_hw_control_get = NULL; > > > > > > I don't see how that works. You have multiple PHYs using this > > > driver. Some might have LEDs, some might have GPOs. But if you modify > > > the driver structure like this, you prevent all PHYs from having LEDs, > > > and maybe cause a Opps if a PHY device has already registered its > > > LEDs? > > > > > > > God you are right! Off-topic but given the effects this may cause, why > > the thing is not const? > > I would like it to be, but its not easy. There are fields in the > driver structure that phylib needs to modify. e.g. mdiodrv.driver gets > passed to the driver core when registering the driver, and it modifies > it. mdiodrv.flags is also manipulated. So we cannot make the whole > structure const. We can make phy_device's drv pointer const though, which would have the effect of catching code such as the above. That doesn't impact the driver model nor the mdio layer. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!