Thread (30 messages) 30 messages, 6 authors, 2025-08-28

Re: [PATCH 00/16] gpio: Use modern PM macros

From: Bartosz Golaszewski <hidden>
Date: 2025-08-28 13:40:07
Also in: linux-gpio, linux-omap, lkml

On Wed, Aug 20, 2025 at 5:58 PM Jisheng Zhang [off-list ref] wrote:
Use the modern PM macros for the suspend and resume functions to be
automatically dropped by the compiler when CONFIG_PM or
CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards or
__maybe_unused.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Almost all drivers are converted, only gpio-tegra and gpio-mlxbf are
left as is, because the memory for saving HW context is not trivial,
if we convert them, then the two drivers' users may complain for
!CONFIG_PM && !CONFIG_PM_SLEEP case. So I didn't touch them.

patch to gpio-dwapb.c is tested on real HW, others are compile-tested only.
This doesn't apply on top of my gpio/for-next branch, can you rebase
and resend please?

Bart
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help