Re: [PATCH v2 2/2] iio: gyro: mpu3050-core: use pm_runtime_resume_and_get()

From: Linus Walleij

Date: Sat Feb 07 2026 - 16:43:50 EST


On Mon, Feb 2, 2026 at 3:57 PM Antoniu Miclaus
<antoniu.miclaus@xxxxxxxxxx> wrote:

> Replace pm_runtime_get_sync() with pm_runtime_resume_and_get() in
> mpu3050_read_raw() and mpu3050_buffer_preenable(). Unlike
> pm_runtime_get_sync(), the usage count is not incremented on error.
>
> In preenable, call pm_runtime_put_autosuspend() if set_8khz_samplerate()
> fails since postdisable won't be called on preenable failure.
>
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx>

Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

Yours,
Linus Walleij