Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp650108rdh; Wed, 14 Feb 2024 07:36:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW2Z/Sf6+PP6OOVqq69CiDmZ/GwzqEiKM9n7bRd4krphZ3yWLEzurE37h1IxAccMVp02jzk0/sWGbIq1kW0dCO1EgD6PWqx3ByhiGB/zw== X-Google-Smtp-Source: AGHT+IGBDKS4s9slnMonUp6cL6VXFSuMWRYKiIeAsSP5Jxf9BAKe95kB89aMGSlfd4I09JYJLQm5 X-Received: by 2002:a17:902:a3ce:b0:1db:6de7:f053 with SMTP id q14-20020a170902a3ce00b001db6de7f053mr575847plb.66.1707924994685; Wed, 14 Feb 2024 07:36:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707924994; cv=pass; d=google.com; s=arc-20160816; b=x4zFpEFCHm27OY8IsCLoa1u48f4BAsUVYs+Em+QrKAclrsVs17yedD8UHiAWrhwWvs j8X+SZDAawioGVKYB556J7Qx9RasoS8aSe2npQz1cFUgBpYn51NfEIeIWQ+fhh7zkElC i7jFpqO4PfUWJOWGasafF8EGkyisFCt9HwthfZNCzgYxBTjVtA4XrE1DiOMyCnBxEpAS XthG5GLc/+zgW+Cg2yXOsZhVOXayFYeZZyOQfHVPtB3RXeJo559MpTITFJUdKx54ZgDh DqtRfJjwI24koB99ilf8AqeMvb8sMsZgJiddfL0aLiatGvS4poyKUdtbuvcfKjSzf+md MJzw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1gWMlqv/fIoXmFXpZbnuqayGL3VjBvT/1eGCOiDrcCE=; fh=jZyYI/Z7fpTmT7k7A8FTPHPN6ykcRhzCeQfeuZ910B8=; b=x8i63CZe+pMei6XdPuzjB+yL2QJ1cEddPRFAa8zKmLWtt9zqxLPTK/Bwr4zqIxgIPS wtHLAtWh4a4i/rV3ONcjkJpZJHAkKDGsHuTppca0fHNSooqjXOnEUczOTxMH/iR/WJNM a4IZfA2P7QjyQn+RVJJX1NXe0fxhFHcbHm9p4CZH8PPTjQhtfIuzSX+C+St9qSCtMpkM sx617W0jUhq5x4TFc9ofXYNeQaix3bzdqRefpFVFBT6lQHlhlmk8dw3LAJ7Qnz3yoL9z DrJttN82ERe+HicXNQl1yUDohwJjybZI9LIbNZkqwX4957+iv3FC1xnF8onE9yr9/gxj T+gA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=icQpm+WR; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-wireless+bounces-3591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3591-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org X-Forwarded-Encrypted: i=2; AJvYcCXHsGHRiuyWlrVTHqP+UUUu/aE+g9VYzFO3N2cYBP6gQCb0e5cEcCzXbwht+a0FO5/RSrHlGPbiOSWEk0QAN+NYD8IBq3TRnFKRsp4xuA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d8-20020a170902654800b001db398d13fbsi2805340pln.264.2024.02.14.07.36.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 07:36:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=icQpm+WR; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-wireless+bounces-3591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3591-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 035182826B2 for ; Wed, 14 Feb 2024 15:34:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC9ED5C913; Wed, 14 Feb 2024 15:34:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="icQpm+WR" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 677E95C911; Wed, 14 Feb 2024 15:34:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707924861; cv=none; b=l5dbOGSG6VkEyU/Qlst8WBfMdlavVZeDDn8NpQ9VjTTX7r1inSoOEWST5NX9Kdlyy1jG6ZcHv2WjZPqBN8YRczvr9X7/eEJ9Hv/zA22aEwJpr5rYO98EbJFtMiZaUs//5S0Xhukt6kCRZW6EWJ0q1rKLf4MyMU8nwTGtAyeBloM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707924861; c=relaxed/simple; bh=RKBYgy5uDM/vBCiN9tBiPR2VpHrXnY5fjxo9XKnCKHs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OPpBQIPzdhETCMZWjvAcYR/1GtygqJBmxmgMNPy5VjB8Sm5Q5pc6CGT6xiVr3pbgJr12y4gTL7tHVoeNeet6U6ukd0LZSlwreNDOyjAwxxHwjiMvWVArzlFmwOp6ZYrd8Rt2hudaYOTQfrAaoPArWQPVPFtigeVhP/ZrvNRMSkE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=icQpm+WR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FB29C433C7; Wed, 14 Feb 2024 15:34:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1707924860; bh=RKBYgy5uDM/vBCiN9tBiPR2VpHrXnY5fjxo9XKnCKHs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=icQpm+WRIBCwFmc6GMZyzD7hfrgvougrzlFkQQkENhX2hhFv4tKvrybec2LZPF0p2 g4w+i5vJ2cylBctHyW7nrVqW6KPr/tAxRaWjizo57DBTGi3DOfHaFJKv8GA3osWQx5 zkW+b+wjJITdz0ojCZY2Ccjx1teFWK8MymvaLyFA= Date: Wed, 14 Feb 2024 16:34:17 +0100 From: Greg Kroah-Hartman To: Bartosz Golaszewski Cc: Bjorn Andersson , Kalle Valo , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Konrad Dybcio , Catalin Marinas , Will Deacon , Bjorn Helgaas , Heiko Stuebner , Jernej Skrabec , Chris Morgan , Linus Walleij , Geert Uytterhoeven , Arnd Bergmann , Neil Armstrong , =?iso-8859-1?Q?N=EDcolas_F_=2E_R_=2E_A_=2E?= Prado , Marek Szyprowski , Peng Fan , Robert Richter , Dan Williams , Jonathan Cameron , Terry Bowman , Lukas Wunner , Huacai Chen , Alex Elder , Srini Kandagatla , Abel Vesa , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Bartosz Golaszewski Subject: Re: Re: Re: [PATCH 4/9] PCI: create platform devices for child OF nodes of the port node Message-ID: <2024021413-grumbling-unlivable-c145@gregkh> References: <20240117160748.37682-1-brgl@bgdev.pl> <20240117160748.37682-5-brgl@bgdev.pl> <2024011707-alibi-pregnancy-a64b@gregkh> <2024011836-wok-treadmill-c517@gregkh> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Feb 07, 2024 at 05:32:38PM +0100, Bartosz Golaszewski wrote: > On Fri, Feb 2, 2024 at 11:02 AM Bartosz Golaszewski wrote: > > > > On Fri, Feb 2, 2024 at 1:03 AM Bjorn Andersson wrote: > > > > > > > [snip] > > > > > > > > > > > > I believe I missed this part of the discussion, why does this need to be > > > > > a platform_device? What does the platform_bus bring that can't be > > > > > provided by some other bus? > > > > > > > > > > > > > Does it need to be a platform_device? No, of course not. Does it make > > > > sense for it to be one? Yes, for two reasons: > > > > > > > > 1. The ATH11K WLAN module is represented on the device tree like a > > > > platform device, we know it's always there and it consumes regulators > > > > from another platform device. The fact it uses PCIe doesn't change the > > > > fact that it is logically a platform device. > > > > > > Are you referring to the ath11k SNOC (firmware running on co-processor > > > in the SoC) variant? > > > > > > Afaict the PCIe-attached ath11k is not represented as a platform_device > > > in DeviceTree. > > > > > > > My bad. In RB5 it isn't (yet - I want to add it in the power > > sequencing series). It is in X13s though[1]. > > > > > Said platform_device is also not a child under the PCIe bus, so this > > > would be a different platform_device... > > > > > > > It's the child of the PCIe port node but there's a reason for it to > > have the `compatible` property. It's because it's an entity of whose > > existence we are aware before the system boots. > > > > > > 2. The platform bus already provides us with the entire infrastructure > > > > that we'd now need to duplicate (possibly adding bugs) in order to > > > > introduce a "power sequencing bus". > > > > > > > > > > This is a perfectly reasonable desire. Look at our PMICs, they are full > > > of platform_devices. But through the years it's been said many times, > > > that this is not a valid or good reason for using platform_devices, and > > > as a result we have e.g. auxiliary bus. > > > > > > > Ok, so I cannot find this information anywhere (nor any example). Do > > you happen to know if the auxiliary bus offers any software node > > integration so that the `compatible` property from DT can get > > seamlessly mapped to auxiliary device IDs? > > > > So I was just trying to port this to using the auxiliary bus, only to > find myself literally reimplementing functions from > drivers/of/device.c. I have a feeling that this is simply wrong. If > we're instantiating devices well defined on the device-tree then IMO > we *should* make them platform devices. Anything else and we'll be > reimplementing drivers/of/ because we will need to parse the device > nodes, check the compatible, match it against drivers etc. Things that > are already implemented for the platform bus and of_* APIs. > > Greg: Could you chime in and confirm that it's alright to use the > platform bus here? Or maybe there is some infrastructure to create > auxiliary devices from software nodes? Note, I HATE the use of the platform bus here, but I don't have a better suggestion. I'd love for the auxbus to work, and if you can create that from software nodes, all the better! But I don't think that's possible just yet, and you would end up implementing all the same stuff that the platform bus has today for this functionality, so I doubt it would be worth it. thanks, greg k-h