Re: [PATCH v5 3/6] i2c: designware: Add dedicated algorithm for AMD NAVI

From: Andy Shevchenko

Date: Tue Jan 20 2026 - 04:39:54 EST


On Tue, Jan 20, 2026 at 10:28:03AM +0100, Benoît Monin wrote:
> Apart from runtime PM, there is nothing in common between i2c_dw_xfer()
> and amd_i2c_dw_xfer_quirk(), so give AMD NAVI controller its own algorithm
> instead of calling the quirk from i2c_dw_xfer().
>
> Add runtime PM handling to amd_i2c_dw_xfer_quirk() and a dedicated
> i2c_algorithm for AMD NAVI controllers. The adapter algorithm is set
> during probe based on the device model.
>
> This way we avoid checking for the device model at the start of every
> transfer.

...

> + ACQUIRE(pm_runtime_active_auto_try, pm)(dev->dev);
> + if (ACQUIRE_ERR(pm_runtime_active_auto_try, &pm))
> + return -ENXIO;

There are PM_ACQUIRE_*() macros available now.

--
With Best Regards,
Andy Shevchenko