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