linux_dsm_epyc7002/drivers
Ulf Hansson 82e12d9e0b PM / Domains: Add dev_pm_domain_attach_by_id() to manage multi PM domains
The existing dev_pm_domain_attach() function, allows a single PM domain to
be attached per device. To be able to support devices that are partitioned
across multiple PM domains, let's introduce a new interface,
dev_pm_domain_attach_by_id().

The dev_pm_domain_attach_by_id() returns a new allocated struct device with
the corresponding attached PM domain. This enables for example a driver to
operate on the new device from a power management point of view. The driver
may then also benefit from using the received device, to set up so called
device-links towards its original device. Depending on the situation, these
links may then be dynamically changed.

The new interface is typically called by drivers during their probe phase,
in case they manages devices which uses multiple PM domains. If that is the
case, the driver also becomes responsible of managing the detaching of the
PM domains, which typically should be done at the remove phase. Detaching
is done by calling the existing dev_pm_domain_detach() function and for
each of the received devices from dev_pm_domain_attach_by_id().

Note, currently its only genpd that supports multiple PM domains per
device, but dev_pm_domain_attach_by_id() can easily by extended to cover
other PM domain types, if/when needed.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-06-06 09:09:22 +02:00
..
accessibility
acpi Power management updates for 4.18-rc1 2018-06-05 09:38:39 -07:00
amba Power management updates for 4.18-rc1 2018-06-05 09:38:39 -07:00
android
ata for-4.18/block-20180603 2018-06-04 07:58:06 -07:00
atm
auxdisplay
base PM / Domains: Add dev_pm_domain_attach_by_id() to manage multi PM domains 2018-06-06 09:09:22 +02:00
bcma dma-mapping updates for 4.18: 2018-06-04 10:58:12 -07:00
block Merge branch 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-04 10:00:01 -07:00
bluetooth
bus
cdrom
char Merge branch 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-04 13:57:43 -07:00
clk
clocksource
connector
cpufreq Merge branches 'pm-cpufreq-sched' and 'pm-cpuidle' 2018-06-04 10:41:07 +02:00
cpuidle
crypto
dax
dca
devfreq
dio
dma dma-mapping updates for 4.18: 2018-06-04 10:58:12 -07:00
dma-buf
edac
eisa
extcon
firewire
firmware Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-06-04 16:31:06 -07:00
fmc
fpga
fsi
gpio
gpu Power management updates for 4.18-rc1 2018-06-05 09:38:39 -07:00
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c Power management updates for 4.18-rc1 2018-06-05 09:38:39 -07:00
ide dma-mapping updates for 4.18: 2018-06-04 10:58:12 -07:00
idle
iio
infiniband
input Merge branch 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-04 10:00:01 -07:00
iommu dma-mapping updates for 4.18: 2018-06-04 10:58:12 -07:00
ipack
irqchip
isdn Merge branch 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-04 13:57:43 -07:00
leds
lightnvm
macintosh
mailbox
mcb
md dm: Use kzalloc for all structs with embedded biosets/mempools 2018-06-05 08:47:43 -06:00
media
memory
memstick
message Merge branch 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-04 10:00:01 -07:00
mfd hwmon updates for v4.18 2018-06-04 11:25:15 -07:00
misc Merge branch 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-04 10:00:01 -07:00
mmc Power management updates for 4.18-rc1 2018-06-05 09:38:39 -07:00
mtd spi: Updates for v4.18 2018-06-04 11:34:06 -07:00
mux
net Merge branch 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-04 13:57:43 -07:00
nfc
ntb
nubus
nvdimm
nvme Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-06-04 15:54:04 -07:00
nvmem
of dma-mapping updates for 4.18: 2018-06-04 10:58:12 -07:00
opp
oprofile
parisc dma-mapping updates for 4.18: 2018-06-04 10:58:12 -07:00
parport
pci Power management updates for 4.18-rc1 2018-06-05 09:38:39 -07:00
pcmcia
perf
phy
pinctrl
platform Changes to chrome-platform for v4.18 2018-06-04 11:28:58 -07:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-06-04 20:27:54 -07:00
sbus
scsi dma-mapping updates for 4.18: 2018-06-04 10:58:12 -07:00
sfi
sh
siox
slimbus
sn
soc Power management updates for 4.18-rc1 2018-06-05 09:38:39 -07:00
soundwire
spi Power management updates for 4.18-rc1 2018-06-05 09:38:39 -07:00
spmi
ssb
staging Merge branch 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-04 13:57:43 -07:00
target for-4.18/block-20180603 2018-06-04 07:58:06 -07:00
tc
tee
thermal
thunderbolt
tty
uio
usb Merge branch 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-04 10:00:01 -07:00
uwb
vfio Merge branch 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-04 13:57:43 -07:00
vhost Merge branch 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-04 13:57:43 -07:00
video
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen
zorro m68k updates for 4.18 2018-06-04 15:50:22 -07:00
Kconfig
Makefile