Re: [PATCH v4 12/14] gpio: regmap: Add optional runtime PM support
Janani Sunil <[email protected]>
| Newsgroups | org.kernel.vger.linux-gpio,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-doc,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 8/24/26 10:05, Andy Shevchenko wrote: > On Fri, Aug 21, 2026 at 04:07:05PM +0200, Janani Sunil wrote: >> 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