From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 47F91378803; Tue, 24 Feb 2026 10:29:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771928988; cv=none; b=f+/npB+N1BgTrdJ78U6zlcVr2Uchr5fC1IbZWBmiEoX3wEz829l6eYmlFURK74kylEm2Sbi96IXJORiVEfk8Sj+xq6D8eoDhnQVKpMa9A9wCgxlHi8BYK1pC7V7HM1vhfF7KhYzWjy5aFsA3pjt5WVmv7i7zLqYESzSAcCPa5kA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771928988; c=relaxed/simple; bh=GNqN7EPXAOQa1OHTwy1jFX9pHGrz2But+AqpMLaeWT8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=M3iY1iCDGPcMS+3X8ueUQ2kzrxjJ6CAFYksCOGQUQfAXZBeNU02+hrbmXu1juNCrliQgwaFtzRfUpl+zekYcuIuomPhJyZmbOzSlYzgFjufFyYh1eOkpW9JHj40v/QCeMSu4ML2WLY0zjcUxaRxah14R90krXrBq2j/2HmqIw2I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=djirx+/c; arc=none smtp.client-ip=192.198.163.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="djirx+/c" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1771928987; x=1803464987; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=GNqN7EPXAOQa1OHTwy1jFX9pHGrz2But+AqpMLaeWT8=; b=djirx+/ceS1UqmwmVWQalgY3aeUmnVyL4+XPSdjasG8CJw+hT/humnyt nfwAYX7bGR8e3SlUhys2URPAPeHAuBZjJg5hc+GYTAb/oSZYXTQ/5qcEZ 5hIr+KL1PJBWmMYcgNoPKUOxik/+wJyVJOKS2avds5mWJ+pqpfZ+LViuD e4V8HbqfPJIBPuH+WpJrw4TTJejGlari/qgb3N2X0IW3otlCziBkm0kH5 NUYESPs8YAjJ2k76Ro9/eZLgY5N3lsncalSh51auFTqHsNUEkOP7e/Q8R cWK3wGlW/LaglWOdYEkP/WBcVZpTzMKscBeCYm6DwzLIbyrSrr+HPBauh g==; X-CSE-ConnectionGUID: ydpjVBgiSsS2Mwvh6+6vQw== X-CSE-MsgGUID: nVfwyuAGSUekOVLolnNX7A== X-IronPort-AV: E=McAfee;i="6800,10657,11710"; a="73002824" X-IronPort-AV: E=Sophos;i="6.21,308,1763452800"; d="scan'208";a="73002824" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2026 02:29:46 -0800 X-CSE-ConnectionGUID: +vXMxhPqTcCAisY8daAkZw== X-CSE-MsgGUID: N92Jve2VQWG5lyEL6OMctw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,308,1763452800"; d="scan'208";a="219958680" Received: from egrumbac-mobl6.ger.corp.intel.com (HELO localhost) ([10.245.244.146]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2026 02:29:40 -0800 Date: Tue, 24 Feb 2026 12:29:36 +0200 From: Andy Shevchenko To: Bartosz Golaszewski Cc: manivannan.sadhasivam@oss.qualcomm.com, Manivannan Sadhasivam via B4 Relay , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-pm@vger.kernel.org, Stephan Gerhold , Dmitry Baryshkov , linux-acpi@vger.kernel.org, Hans de Goede , Rob Herring , Greg Kroah-Hartman , Jiri Slaby , Nathan Chancellor , Nicolas Schier , Hans de Goede , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Mark Pearson , "Derek J. Clark" , Manivannan Sadhasivam , Krzysztof Kozlowski , Conor Dooley , Marcel Holtmann , Luiz Augusto von Dentz , Bartosz Golaszewski Subject: Re: [PATCH v5 2/9] serdev: Add an API to find the serdev controller associated with the devicetree node Message-ID: References: <20260224-pci-m2-e-v5-0-dd9b9501d33c@oss.qualcomm.com> <20260224-pci-m2-e-v5-2-dd9b9501d33c@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-bluetooth@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: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Tue, Feb 24, 2026 at 02:16:17AM -0800, Bartosz Golaszewski wrote: > On Tue, 24 Feb 2026 06:30:48 +0100, Manivannan Sadhasivam via B4 Relay > said: > > > > Add of_find_serdev_controller_by_node() API to find the serdev controller > > device associated with the devicetree node. ... > > +struct serdev_controller *of_find_serdev_controller_by_node(struct device_node *node) > > +{ > > + struct device *dev = bus_find_device_by_of_node(&serdev_bus_type, node); > > + > > + return (dev && dev->type == &serdev_ctrl_type) ? to_serdev_controller(dev) : NULL; > > +} > > +EXPORT_SYMBOL_GPL(of_find_serdev_controller_by_node); > > I'm not sure if I commented on it before but there's no reason for this to be > OF-centric. It would work equally well as (I think the same should keep the > "serdev" prefix too for correct namespacing): > > struct serdev_controller *serdev_find_controller_by_fwnode(struct > fwnode_handle *fwnode) > { > struct device *dev = bus_find_device_by_fwnode(); > > ... > } > > It would be more flexible and users can always use to_of_node(). IIRC it was discussed already and the fact of use only in DT overlays and absence of the user for all this time makes it feel like solving non-existing problem. So OF-centric in this case seems to be fine. -- With Best Regards, Andy Shevchenko