From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F0F8723BD18; Wed, 12 Mar 2025 10:52:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741776751; cv=none; b=HjBT78ueomYsWpE/5avzFoBqQhWeQ+C7rFYtwiRj3xMOmULM+IRGoyzpDOxsleJCqDT97MgPXZJGHYiSgsBeKlMaDrprkLGG3Ou3SR7L7KyQjcUBuejD6YX1bhoANlOFElO8OU5OkqNaNBY8bTvwUwfoZZMOmisbVvWmozMkHxs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741776751; c=relaxed/simple; bh=OQO01dbBKNI3Cu+axMDEKWJ+YCTB6DThiDmi4U2btuM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Bs+whJWPEHUwikL5xkXWsUDAFYJ7n1l6y5awixKtAWOqz4zt1HBnjRUPH+ERqZ7fskFda0LuZfmIh3HuUHl/cRv1oPH1iEVmKO+MRNsDy/VYYdkioIr91hH7npewVbXhusUeXNNiJc5vrqGwrKQJUzBi0RgyDJcBCoDXR3QHe5s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com; spf=none smtp.mailfrom=foss.arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=foss.arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 22DF71515; Wed, 12 Mar 2025 03:52:40 -0700 (PDT) Received: from bogus (e133711.arm.com [10.1.196.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6CF123F694; Wed, 12 Mar 2025 03:52:26 -0700 (PDT) Date: Wed, 12 Mar 2025 10:52:23 +0000 From: Sudeep Holla To: Peng Fan Cc: "Peng Fan (OSS)" , Sudeep Holla , Cristian Marussi , Saravana Kannan , Greg Kroah-Hartman , Linus Walleij , Aisheng Dong , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer , "arm-scmi@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "imx@lists.linux.dev" Subject: Re: [PATCH 1/4] firmware: arm_scmi: bus: Bypass setting fwnode for scmi cpufreq Message-ID: References: <20250218133619.GA22647@nxa18884-linux> Precedence: bulk X-Mailing-List: linux-gpio@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: On Tue, Mar 11, 2025 at 11:23:12AM +0000, Sudeep Holla wrote: > On Tue, Mar 11, 2025 at 11:12:45AM +0000, Peng Fan wrote: > > > > So it is clear that wrong fw_devlink is created, it is because scmi cpufreq device is > > created earlier and when device_add, the below logic makes the fwnode pointer points > > to scmi cpufreq device. > > if (dev->fwnode && !dev->fwnode->dev) { > > dev->fwnode->dev = dev; > > fw_devlink_link_device(dev); > > } > > > > Thanks, looks like simple way to reproduce the issue. I will give it a try. > I could reproduce but none of my solution solved the problem completely or properly. And I don't like the DT proposal you came up with. I am not inclined to just drop this fwnode setting in the scmi devices and just use of_node. -- Regards, Sudeep