Re: [PATCH v4 12/14] gpio: regmap: Add optional runtime PM support
From: Janani Sunil
Date: Tue Aug 25 2026 - 10:06:13 EST
On 8/24/26 10:05, Andy Shevchenko wrote:
On Fri, Aug 21, 2026 at 04:07:05PM +0200, Janani Sunil wrote:DEFINED_GUARD() was added because DEFINE_GUARD_COND() extends that class and reuses its type, destructor and error helpers.
Some gpio-regmap consumers share their regmap with a parent device thatThis is not used, it's for guard()() case.
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))
Regards,
Jan