Thread (39 messages) flat view 39 messages, 6 authors, 22d ago

Re: [PATCH v4 12/14] gpio: regmap: Add optional runtime PM support

From: Janani Sunil <hidden>
Date: 2026-08-25 13:51:02
Also in: linux-devicetree, linux-gpio, linux-iio, lkml

On 8/24/26 10:05, Andy Shevchenko wrote:
On Fri, Aug 21, 2026 at 04:07:05PM +0200, Janani Sunil wrote:
quoted
Some gpio-regmap consumers share their regmap with a parent device that
may be runtime suspended. GPIO register accesses must resume that device
first.

Add an optional pm_dev field and acquire it before register translation
or access. Release it using runtime autosuspend after each operation.
Keep the device active across the complete direction-output sequence and
propagate failure when setting the initial output value.
+DEFINE_GUARD(gpio_regmap_runtime, struct gpio_regmap *,
+	     gpio_regmap_runtime_get(_T), gpio_regmap_runtime_put(_T))
This is not used, it's for guard()() case.
DEFINED_GUARD() was added because DEFINE_GUARD_COND() extends that class and reuses its type, destructor and error helpers.

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