aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/mpi/mpi-mul.c
diff options
context:
space:
mode:
authorClaudiu Beznea <[email protected]>2025-07-03 11:27:06 +0000
committerRafael J. Wysocki <[email protected]>2025-07-07 18:41:20 +0000
commitd42c7c6fd66a6e2a78ae1da666c5df6c2fde8389 (patch)
treedfaa445af19b99e13b6fde58c5414f617f54b1fa /lib/crypto/mpi/mpi-mul.c
parentPM: Don't use "proxy" headers (diff)
downloadkernel-d42c7c6fd66a6e2a78ae1da666c5df6c2fde8389.tar.gz
kernel-d42c7c6fd66a6e2a78ae1da666c5df6c2fde8389.zip
PM: domains: Add flags to specify power on attach/detach
Calling dev_pm_domain_attach()/dev_pm_domain_detach() in bus driver probe/remove functions can affect system behavior when the drivers attached to the bus use devres-managed resources. Since devres actions may need to access device registers, calling dev_pm_domain_detach() too early, i.e., before these actions complete, can cause failures on some systems. One such example is Renesas RZ/G3S SoC-based platforms. If the device clocks are managed via PM domains, invoking dev_pm_domain_detach() in the bus driver's remove function removes the device's clocks from the PM domain, preventing any subsequent pm_runtime_resume*() calls from enabling those clocks. The second argument of dev_pm_domain_attach() specifies whether the PM domain should be powered on during attachment. Likewise, the second argument of dev_pm_domain_detach() indicates whether the domain should be powered off during detachment. Upcoming changes address the issue described above (initially for the platform bus only) by deferring the call to dev_pm_domain_detach() until after devres_release_all() in device_unbind_cleanup(). The detach_power_off field in struct dev_pm_info stores the detach power off info from the second argument of dev_pm_domain_attach(). Because there are cases where the device's PM domain power-on/off behavior must be conditional (e.g., in i2c_device_probe()), the patch introduces PD_FLAG_ATTACH_POWER_ON and PD_FLAG_DETACH_POWER_OFF flags to be passed to dev_pm_domain_attach(). Finally, dev_pm_domain_attach() and its users are updated to use the newly introduced PD_FLAG_ATTACH_POWER_ON and PD_FLAG_DETACH_POWER_OFF macros. This change is preparatory. Signed-off-by: Claudiu Beznea <[email protected]> Reviewed-by: Mathieu Poirier <[email protected]> Acked-by: Wolfram Sang <[email protected]> # I2C Reviewed-by: Ulf Hansson <[email protected]> Link: https://patch.msgid.link/[email protected] [ rjw: Changelog adjustments ] Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-mul.c')
0 files changed, 0 insertions, 0 deletions