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 smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.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 C08C4C25B06 for ; Sun, 14 Aug 2022 09:45:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3FFC84017E; Sun, 14 Aug 2022 09:45:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 3FFC84017E Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=kroah.com header.i=@kroah.com header.a=rsa-sha256 header.s=fm1 header.b=qAarWNTR; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=WEq9wKKY X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z6rHHx0hGOva; Sun, 14 Aug 2022 09:45:21 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 1F490400D8; Sun, 14 Aug 2022 09:45:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 1F490400D8 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id EE0BEC0032; Sun, 14 Aug 2022 09:45:20 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4C956C002D for ; Sun, 14 Aug 2022 09:45:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id DB76960709 for ; Sun, 14 Aug 2022 09:45:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org DB76960709 Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kroah.com header.i=@kroah.com header.a=rsa-sha256 header.s=fm1 header.b=qAarWNTR; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=WEq9wKKY X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id epgCooYFN4K1 for ; Sun, 14 Aug 2022 09:45:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org BD9AC60774 Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) by smtp3.osuosl.org (Postfix) with ESMTPS id BD9AC60774 for ; Sun, 14 Aug 2022 09:45:18 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id A524B2B05FDE; Sun, 14 Aug 2022 05:45:10 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 14 Aug 2022 05:45:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1660470310; x=1660477510; bh=FdFP/H49+r ZQsPEMoSpH1blp96NX4j7NVyCsnlQOwKc=; b=qAarWNTRnx4c01YwaTDmDon3cT WoeRczFOoEi+9Yn59fFevm4BDrerzL8Qlujy0xfLMkyaoQfIjNfen2HFSFBZFB0Q XNoGICGJC2sUobGRe86muQFZE/cYsqOO0j6IYwB2CS835Qsq6BPjKB+oDCW1JO6C pvpC0Mrw3QJMLQBeUlYwEfqvZK9YB3kuH9EMynjrZLBo/InM0t4Q81pjJHfQ/p5C 0GtZsBGQ50dS2bXKJjx8WZiCTf9hqEWVJ5wm05nZnJc0C5bBQAUdT1VxX2j9oC6q rMDXsGcuxb3sCu+JA4QRd5t25AOxNytA3uK+r1ikFU+3ya5x2lNxSQ3uOUHw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1660470310; x=1660477510; bh=FdFP/H49+rZQsPEMoSpH1blp96NX 4j7NVyCsnlQOwKc=; b=WEq9wKKYIAAfYldO75VsevXwtHARcaxZHLAmNnNZOXvl wHUSsxEtGpaNN3dcgybyp8V9bC3iR+WQnHsnaCSZtbGUn7WqOOE+y88ew9CrEtx5 KccnnLpEFgx2sZNnrD+2QgNax+OUTUxes3cue/UpBUigm0LVysdKx6b2edhOsgZT mtz4CGcucgfqJpkzKvq1kD0ja/cYYzlwZt12b6/okBLPFIy7Zoi8WEKLybxgSkEn qIF4eT4qV55GGWIEmLBKV3yahBmceZa5NbIFCtOF0zUHfm5JHWY+3COP2i5veLeX /JfYijRGOvc4xZPuEv0vc7RWsguBIkKbVSYcmDGkGA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehtddgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghg ucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrfgrthhtvghrnhepheegvd evvdeljeeugfdtudduhfekledtiefhveejkeejuefhtdeufefhgfehkeetnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorg hhrdgtohhm X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 14 Aug 2022 05:45:09 -0400 (EDT) Date: Sun, 14 Aug 2022 11:45:06 +0200 From: Greg KH To: Khalid Masum Subject: Re: [RFC PATCH] Soundwire: Initialize multi_link with fwnode props Message-ID: References: <20220814080416.7531-1-khalid.masum.92@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220814080416.7531-1-khalid.masum.92@gmail.com> Cc: alsa-devel@alsa-project.org, Heikki Krogerus , "Rafael J . Wysocki" , Bard Liao , linux-kernel@vger.kernel.org, Pierre-Louis Bossart , Daniel Scally , linux-acpi@vger.kernel.org, Vinod Koul , Sakari Ailus , Sanyog Kale , Andy Shevchenko , linux-kernel-mentees@lists.linuxfoundation.org, Len Brown X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" On Sun, Aug 14, 2022 at 02:04:15PM +0600, Khalid Masum wrote: > According to the TODO, In sw_bus_master_add, bus->multi_link is to be > populated with properties from FW node props. Make this happen by > creating a new fwnode_handle flag FWNODE_FLAG_MULTI_LINKED and use > the flag to store the multi_link value from intel_link_startup. Use > this flag to initialize bus->multi_link. > > Signed-off-by: Khalid Masum > --- > I do not think adding a new flag for fwnode_handle is a good idea. > So, what would be the best way to initialize bus->multilink with > fwnode props? > > -- Khalid Masum > > drivers/soundwire/bus.c | 4 ++-- > drivers/soundwire/intel.c | 1 + > include/linux/fwnode.h | 1 + > 3 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c > index a2bfb0434a67..80df1672c60b 100644 > --- a/drivers/soundwire/bus.c > +++ b/drivers/soundwire/bus.c > @@ -74,9 +74,9 @@ int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent, > > /* > * Initialize multi_link flag > - * TODO: populate this flag by reading property from FW node > */ > - bus->multi_link = false; > + bus->multi_link = (fwnode->flags & FWNODE_FLAG_MULTI_LINKED) > + == FWNODE_FLAG_MULTI_LINKED; > if (bus->ops->read_prop) { > ret = bus->ops->read_prop(bus); > if (ret < 0) { > diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c > index 505c5ef061e3..034d1c523ddf 100644 > --- a/drivers/soundwire/intel.c > +++ b/drivers/soundwire/intel.c > @@ -1347,6 +1347,7 @@ int intel_link_startup(struct auxiliary_device *auxdev) > */ > bus->multi_link = true; > bus->hw_sync_min_links = 1; > + dev->fwnode->flags |= FWNODE_FLAG_MULTI_LINKED; > } > > /* Initialize shim, controller */ > diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h > index 9a81c4410b9f..446a52744953 100644 > --- a/include/linux/fwnode.h > +++ b/include/linux/fwnode.h > @@ -32,6 +32,7 @@ struct device; > #define FWNODE_FLAG_NOT_DEVICE BIT(1) > #define FWNODE_FLAG_INITIALIZED BIT(2) > #define FWNODE_FLAG_NEEDS_CHILD_BOUND_ON_ADD BIT(3) > +#define FWNODE_FLAG_MULTI_LINKED BIT(4) What does this commit actually change? Did you test this on real hardware? thanks, greg k-h _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees