Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1249566rdb; Fri, 9 Feb 2024 15:37:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVMvZ6cg7iXJPIatEu6EzIjFrc/xhtBtbti5KHbDg4A0O8e7kiBpVLtexJ53daDwJ8NhleLMLc+bZvvYpzQ6Rf/y2mG59zG9jRgnQcW1w== X-Google-Smtp-Source: AGHT+IEh7pZNfib3+OfEffeXGIcD/3iBc3uKjIHTmt0YEOkZKm+w8fmWbEyitXiFB+hok7Q/4xok X-Received: by 2002:a17:907:7671:b0:a3b:c4c3:c660 with SMTP id kk17-20020a170907767100b00a3bc4c3c660mr339463ejc.47.1707521836914; Fri, 09 Feb 2024 15:37:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707521836; cv=pass; d=google.com; s=arc-20160816; b=FsbEr2u/L+pBT6pZ7iG7k5ajmn1Bm3s8LLNeSLOJ0vA8TKLmAhlu5x2LUQknpPdNlG 1yv4Ore/r9HE1UOTb4Tm26czHtDswsMEUR2nLXFxTl3TM/apv9N6kZPM/9yktFhlDmqf klhFeG1k1k+Icn8R6be/0mhPdo5nh4OwUwc9up6AQkRRZ9oXACapY4JWQYBsheolSPbf beVitl71B8jpdMXVp/gW2xyOoBpTA5jxf1GExyk3lyAm14tAi9p9LrlAlqOvkDafzafx hYPrAvBAF9pyNgTr+4OAe/R5kf8vBtkdv05u1UtOMTfXfYMhE8rjCILDhDLVtRpraEVt gMoQ== 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=/An2QJU533w7ov3VBF1ERfsAXGLgITdEPkEFzDG4KrQ=; fh=2xT122jaK+wgiPhuVJN4KuW1YiF2u7VbQB+Lvhdx3qE=; b=wgJA+GLVAd2aT/6cKNSV1wzZyJcX8sjX4kazFz/DKMuX8faMUDADmLS3RxOWm16seF nztOZDP4ZxsDt+UzoAvd8ae5BrVsltnIzaNrQ3R2tY/U82VZ6ydIuvKPKVN7W3kvY8Gb n+uaxpGz8JRS/raSu3uYlnVQpIUtlkGIjovqbpQP8YoHHXsCf+NDCLKNd9z7v7ckBxlF /95FbGzucFkkuYUlks0MI6gUxNz1dky/DIGVylixvyLPSMHaRJQZwrBzJo7RtjrweNdU G8ZUKOiMRNVNgZ7vZfA8bRIiTfEhhTh5Sb2OvqOtvbIvrJjSc9N4iGv7p2fz3gW88kSv 33GQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oLrmi2Ug; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-1734-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1734-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCVwLTmwUWdvldJkNnbECKpevIWnsbbCZckCbnFETTJKIb6gpXmRAkD4j/kOivJDswuengZCA6RQ7atQUYcWw6cY6SFXyrThyjLirlcJUw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h21-20020a1709063c1500b00a384c329a42si1370357ejg.684.2024.02.09.15.37.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 15:37:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-1734-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oLrmi2Ug; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-1734-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1734-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9FA771F213F0 for ; Fri, 9 Feb 2024 23:37:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4797638FB2; Fri, 9 Feb 2024 23:37:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oLrmi2Ug" X-Original-To: linux-bluetooth@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 83ACF38DE2; Fri, 9 Feb 2024 23:37:04 +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=1707521824; cv=none; b=WFfBX9S3MzyEss4+/oXy68eEHa12w6tysbuhrZ9kq96gMfdv1v6dY/Bfm0I1HE+uM49JbRAzyV5VobLMJj8GJMx1ZsYNkzPZGOpqaIRHsD4PsROE/3tsJwAVoIt4XEj6KPwRtA1NgxWcgNf1Sl1wWGuV1jhQy5imCTVoHeszOdE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707521824; c=relaxed/simple; bh=vab66JaH+98JX7uwKvF0gxBwsDwHTA+LMjKxktqFBFI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tCMh8gIzVWyF0QsqPwornGl6bScGVlXBqAiT3zsHcRHeWymPNi5JhWCnnflz4zprt3VpzkLO3InEuW9Zl+YBwUEfbbtA5EiEeHt25LRr/smEp/0n2J14xm9biolVw023wwPpLB7t+jj/PxPux/OdUoJ/PFRdU97h01xNY4eCGQY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oLrmi2Ug; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46BEFC433F1; Fri, 9 Feb 2024 23:37:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707521823; bh=vab66JaH+98JX7uwKvF0gxBwsDwHTA+LMjKxktqFBFI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oLrmi2UgocGnOO/gap5TAGTQkug/s/k067+bvJPqRjk02YmbV1+nxy3sDJAyB1HvK 14++nREuC0sMSTr+hpQhKlx2HG/LjbOM2lb4MK/wfkzlqlP3P8F3iDxChowgCJCeZy FKKXv2Sgu/LzYTvr5OiH6nz0xyW8+ybUsRv9HM+mcC6OaC8BHzlADy/kXvXMM2pKxH nKkxd1vCgAvIa7WkQv/dvw6Sq7Mn/5GWVhmzkze32/ZZJZD3fmBIL+fPh1D/k6NiSt 3hB62JPL7qL2Sd/RFwUJq6s9V4x9xd3YXVquvrU47evSzfphB8Sz5bQY9WTnCxaI/n bjBR24cpsmSZg== Date: Fri, 9 Feb 2024 17:37:00 -0600 From: Bjorn Andersson To: Bartosz Golaszewski Cc: Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Marcel Holtmann , Luiz Augusto von Dentz , Bjorn Helgaas , Neil Armstrong , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman , Arnd Bergmann , Abel Vesa , Manivannan Sadhasivam , Lukas Wunner , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-pci@vger.kernel.org, Bartosz Golaszewski Subject: Re: Re: [RFC 9/9] PCI/pwrctl: add a PCI power control driver for power sequenced devices Message-ID: References: <20240201155532.49707-1-brgl@bgdev.pl> <20240201155532.49707-10-brgl@bgdev.pl> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Feb 02, 2024 at 02:05:59PM +0100, Bartosz Golaszewski wrote: > On Fri, Feb 2, 2024 at 5:03 AM Bjorn Andersson wrote: > > > > On Thu, Feb 01, 2024 at 04:55:32PM +0100, Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > > > > > > Add a PCI power control driver that's capable of correctly powering up > > > devices using the power sequencing subsystem. For now we support the > > > ath11k module on QCA6390. > > > > > > > For a PCI device which doesn't share resources with something on another > > bus, the whole power sequencing would be implemented in a driver like > > this - without the involvement of the power sequence framework. > > > > Yes, this is what I did in the previous incarnation of this code[1]. > > (I know, I should have linked it here. My bad, I will do it next time). > > > I think it would be nice to see this series introduce a simple > > pci_pwrctl driver, and then (in the same series) introduce the power > > sequence framework and your PMU driver. > > > > I disagree. I was initially annoyed by Dmitry asking me to do a lot > more work than anticipated but he's right after all. WLAN and BT > consuming what is really the PMU's inputs is simply not the actual > representation. That's why we should make it a pwrseq user IMO. > If the PMU registers the "internal" output regulators, then PCI device would consume the PCI outputs of the PMU, the BT device would consume the BT outputs of the PMU. The PMU requests inputs enabled and drives BT_EN and WLAN_EN according to which subset of these output regulators are enabled. Pretty much exactly as "regulator-fixes" isn't a pwrseq device. Regards, Bjorn > > One case where such model would be appropriate is the XHCI controller > > (uPD720201) on db845c. Today we describe vddpe-3p3-supply as a supply on > > the PCI controller, but it should have been vdd33-supply, vdd10-supply, > > avdd33-supply on the PCI device. > > Sounds like a good second user then! > > > > > That would provide an example for how a simple PCI power control driver > > can/should look like, and we can discuss the PCI pieces separate from > > the introduction of the new power sequence framework (which is unrelated > > to PCI). > > I agree it's unrelated and it could possibly go upstream separately > but the particular use-case on RB5 (and other Qcom platforms) requires > both the PCI and generic power sequencing to be addressed. > > Bart > > [snip] > > [1] https://lore.kernel.org/netdev/20240117160748.37682-7-brgl@bgdev.pl/T/#m72f52254a52fcb8a8a44de0702cad1087d4bcfa1