2024-06-12 11:58:01

by Bartosz Golaszewski

[permalink] [raw]
Subject: [PATCH v9 0/5] PCI/pwrctl: initial implementation and first user

From: Bartosz Golaszewski <[email protected]>

I'm sending the PCI part separately to keep the history on the list.
Bjorn acked all of them so I'll pick them up later today into the pwrseq
tree.

Changelog:

Since v8:
- split out the PCI patches into their own series
- improved commit messages (added rationale for the PCI pwrctl and the
powrseq driver for QCOM QCAxyz, start with a capital letter)
- pick up Acks from Bjorn
- Link to v8: https://lore.kernel.org/r/[email protected]

Since v7:
- added DTS changes for sm8650-hdk
- added circular dependency detection for pwrseq units
- fixed a KASAN reported use-after-free error in remove path
- improve Kconfig descriptions
- fix typos in bindings and Kconfig
- fixed issues reported by smatch
- fix the unbind path in PCI pwrctl
- lots of minor improvements to the pwrseq core

Since v6:
- kernel doc fixes
- drop myself from the DT bindings maintainers list for ath12k
- wait until the PCI bridge device is fully added before creating the
PCI pwrctl platform devices for its sub-nodes, otherwise we may see
sysfs and procfs attribute failures (due to duplication, we're
basically trying to probe the same device twice at the same time)
- I kept the regulators for QCA6390's ath11k as required as they only
apply to this specific Qualcomm package

Since v5:
- unify the approach to modelling the WCN WLAN/BT chips by always exposing
the PMU node on the device tree and making the WLAN and BT nodes become
consumers of its power outputs; this includes a major rework of the DT
sources, bindings and driver code; there's no more a separate PCI
pwrctl driver for WCN7850, instead its power-up sequence was moved
into the pwrseq driver common for all WCN chips
- don't set load_uA from new regulator consumers
- fix reported kerneldoc issues
- drop voltage ranges for PMU outputs from DT
- many minor tweaks and reworks

v1: Original RFC:

https://lore.kernel.org/lkml/[email protected]/T/

v2: First real patch series (should have been PATCH v2) adding what I
referred to back then as PCI power sequencing:

https://lore.kernel.org/linux-arm-kernel/2024021413-grumbling-unlivable-c145@gregkh/T/

v3: RFC for the DT representation of the PMU supplying the WLAN and BT
modules inside the QCA6391 package (was largely separate from the
series but probably should have been called PATCH or RFC v3):

https://lore.kernel.org/all/CAMRc=Mc+GNoi57eTQg71DXkQKjdaoAmCpB=h2ndEpGnmdhVV-Q@mail.gmail.com/T/

v4: Second attempt at the full series with changed scope (introduction of
the pwrseq subsystem, should have been RFC v4)

https://lore.kernel.org/lkml/[email protected]/T/

v5: Two different ways of handling QCA6390 and WCN7850:

https://lore.kernel.org/lkml/[email protected]/

Bartosz Golaszewski (5):
PCI: Hold the rescan mutex when scanning for the first time
PCI/pwrctl: Reuse the OF node for power controlled devices
PCI/pwrctl: Create platform devices for child OF nodes of the port
node
PCI/pwrctl: Add PCI power control core code
PCI/pwrctl: Add a PCI power control driver for power sequenced devices

MAINTAINERS | 8 ++
drivers/pci/Kconfig | 1 +
drivers/pci/Makefile | 1 +
drivers/pci/bus.c | 9 ++
drivers/pci/of.c | 14 ++-
drivers/pci/probe.c | 2 +
drivers/pci/pwrctl/Kconfig | 17 +++
drivers/pci/pwrctl/Makefile | 6 ++
drivers/pci/pwrctl/core.c | 137 +++++++++++++++++++++++++
drivers/pci/pwrctl/pci-pwrctl-pwrseq.c | 89 ++++++++++++++++
drivers/pci/remove.c | 3 +-
include/linux/pci-pwrctl.h | 51 +++++++++
12 files changed, 333 insertions(+), 5 deletions(-)
create mode 100644 drivers/pci/pwrctl/Kconfig
create mode 100644 drivers/pci/pwrctl/Makefile
create mode 100644 drivers/pci/pwrctl/core.c
create mode 100644 drivers/pci/pwrctl/pci-pwrctl-pwrseq.c
create mode 100644 include/linux/pci-pwrctl.h

--
2.40.1



2024-06-12 14:34:45

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [PATCH v9 0/5] PCI/pwrctl: initial implementation and first user

From: Bartosz Golaszewski <[email protected]>


On Wed, 12 Jun 2024 10:20:13 +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <[email protected]>
>
> I'm sending the PCI part separately to keep the history on the list.
> Bjorn acked all of them so I'll pick them up later today into the pwrseq
> tree.
>
> Changelog:
>
> [...]

Applied, thanks!

[1/5] PCI: Hold the rescan mutex when scanning for the first time
commit: 5799eba8eeabe79a476016f22a7aea57467b7638
[2/5] PCI/pwrctl: Reuse the OF node for power controlled devices
commit: 62c953f0f4fb0b5f67b0ad3096ab38f5c5712d75
[3/5] PCI/pwrctl: Create platform devices for child OF nodes of the port node
commit: 8fb18619d9102e8f4f6184cdac482422d9293b48
[4/5] PCI/pwrctl: Add PCI power control core code
commit: 4565d2652a37e438e4cd729e2a8dfeffe34c958c
[5/5] PCI/pwrctl: Add a PCI power control driver for power sequenced devices
commit: 6140d185a43daa298d43453929560388d6d49b6e

Best regards,
--
Bartosz Golaszewski <[email protected]>