Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3749284pxf; Mon, 29 Mar 2021 10:18:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtxbua51mxGP9rU2ubvhBNbhShmzpZEAIafEAbtrMCGJ2xj/6ZywFAVKeFU9aJ+atC7b/O X-Received: by 2002:a17:906:1c41:: with SMTP id l1mr29209428ejg.299.1617038303189; Mon, 29 Mar 2021 10:18:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617038303; cv=none; d=google.com; s=arc-20160816; b=amUPCLpAkFu60w9Ax0HHlMmpRTOnRbkhc7WOGW6ZGkPBZniBZ/MfkKIp4qbVBPf441 76myjM7lEaHV6616VESVHOekyvDz7B48Y5Y7AXraojjt6JSqNB5gW3Uch+fGaYUuPHg+ uaDUyG2D7cU5xgcWZ5qNqI8hgYaMw1dn8481fQdUkrBb65QKhQwlG+FYB33Q3IF3w1fZ cVoqmC0mCNi+2Ie8rK77bIuy8iizbdGcB8Zr6sjr4bO/pApARdlbp6YvDl2SteQJnl3k mu3WUabyvOiOFvRf2aZwHh8Zf+ejdrL1G2Ws9y4EPdECpv71IgTph/F7AZtc2CgiSg8r u1SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qJ096tUKZWKCvvfbrMdEUUNZ1CwHIZ0Ey/HiJ9JjIOs=; b=f9y3WG+1OKmp48aUVS2w5GgMXi54N5WYZSjAJ22N396430Fu2UvQRRv6uGVYRTyCkx VeTZYt11yeW7uJ8LXiafIY1oHsIRcE37UDP3T72JpxnxhFMawnzYczVCIEBstW9KdPDD /QfPLbKCreC5+5mjze5u3B+CyrYAZ5Wbr+FbHuN+D8JwMtjxE9gbE1tYZnv+BZkYVXOB +nhIdBbLy92EfmCkbmxwbwyIcwR4Q6xCrj7zhm90Q3OTOBLghfFXkqJ0330v5A5OUE5U DFSmNkQBLG2f6Hm/KMvH1nXNm3sAn85Q4wAWvJVQ5K+Wz4Z1b0O1ioYuGaCQ7MOGQdgW 8ffw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mH1go9hm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h28si15096111edj.546.2021.03.29.10.18.01; Mon, 29 Mar 2021 10:18:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mH1go9hm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231150AbhC2RQj (ORCPT + 99 others); Mon, 29 Mar 2021 13:16:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:49920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231341AbhC2RQZ (ORCPT ); Mon, 29 Mar 2021 13:16:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9D5C66192C; Mon, 29 Mar 2021 17:16:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617038185; bh=lOk2rEpOBpmcphuPTnLaYGl/F2yce+3XWy8O2WeWrLU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mH1go9hmGq6rFQJXrykFffRlR5xbIrdEHI+q0sevwDLEOnC1tz8apgB9ANemB05J2 Fs38WiXXMS1oaK5QkZMnFcUWSGssuNhPvwdhyOcFNQkZejLHhMyz8DTUR7zkYU/bzx hzou/tnxu0IB1VSf4unI80Xyy9Bo+FwJ/MTDLbsafyk/z04oFhnzs8vcA18gV4AsVp VgPqABCtUUGNIDDPDAHeKjGbeWArRyMAUPQ4gcDyDGfYx13IAncmYtiVNZKQeo1yvR Kh3wGxNkHY4sCI3+uKWpQAf5VH8tYM9pz8Fj1Ho2DUNJ9L2hQWFkkNATpKxnpvCZzM 1zcpBPMEK9PXQ== Date: Mon, 29 Mar 2021 18:16:13 +0100 From: Mark Brown To: Jim Quinlan Cc: linux-pci , Nicolas Saenz Julienne , Rob Herring , bcm-kernel-feedback-list , Jim Quinlan , Lorenzo Pieralisi , Bjorn Helgaas , Florian Fainelli , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , open list Subject: Re: [PATCH v3 2/6] PCI: brcmstb: Add control of EP voltage regulators Message-ID: <20210329171613.GI5166@sirena.org.uk> References: <20210326191906.43567-1-jim2101024@gmail.com> <20210326191906.43567-3-jim2101024@gmail.com> <20210329162539.GG5166@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="J+eNKFoVC4T1DV3f" Content-Disposition: inline In-Reply-To: X-Cookie: Never give an inch! User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --J+eNKFoVC4T1DV3f Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 29, 2021 at 12:39:50PM -0400, Jim Quinlan wrote: > On Mon, Mar 29, 2021 at 12:25 PM Mark Brown > > Here you are figuring out a device local supply name... > > > + /* > > > + * Get the regulators that the EP devianswerces require. We cannot use > > > + * pcie->dev as the device argument in regulator_bulk_get() since > > > + * it will not find the regulators. Instead, use NULL and the > > > + * regulators are looked up by their name. > > > + */ > > > + return regulator_bulk_get(NULL, pcie->num_supplies, pcie->supplies); > > ...and here you are trying to look up that device local name in the > > global namespace. That's not going to work well, the global names that > > supplies are labelled with may be completely different to what the chip > > designer called them and there could easily be naming collisions between > > different chips. > "devm_regulator_bulk_get(pcie->dev, ...)"; is your concern about the > NULL for the device and if so does this fix it? If not, what do you > suggest that I do? If you use the struct device for the PCIe controller then that's going to first try the PCIe controller then the global namespace so you still have all the same problems. You really need to use the struct device for the device that is being supplied not some random other struct device you happened to find in the system. As I said in my earlier reply I think either the driver core or PCI needs something like Soundwire has which lets it create struct devices for things that have been enumerated via software but not enumerated by hardware and a callback or something which lets those devices take whatever steps are needed to trigger probe. --J+eNKFoVC4T1DV3f Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmBiC10ACgkQJNaLcl1U h9DUJwf/VqPUciW9k3R4OCtAkqo9U5IDvuxu7r6XmO6YhMfYpZsdRQjZ7WVq2kd4 g12beRu3Qrwd9rxNX4pPNrk8QX/FdG14s5Ontfo0CczozmMfHCdMal9KjYr28Vfn ls3Efc9obaW5PIvMXfk6D2om5EKueR171Sp3Do5HbHGap+KeZ0NTXEMmG3+n49h6 nn60OESqTZkS6tISfAWOVYx9JgCVomtWNOklGG4Bv9I1i/PZ+ta4i9/ajTFDZRCv HC48/0pzLorlGSY04FsfQ3hXGFN1Oi332GOaJF4p0uaEKh0jNjYWdYAEpRkWG4zJ 7BX/ON0quzuXskns96Qfl7ISw89Hbw== =+Rlm -----END PGP SIGNATURE----- --J+eNKFoVC4T1DV3f--