Re: [PATCH v3 3/4] i2c: designware: Convert platform driver to use shutdown hook

From: Andy Shevchenko

Date: Tue May 05 2026 - 03:41:47 EST


On Mon, May 04, 2026 at 08:15:04PM +0000, William A. Kennington III wrote:
> Convert the platform driver to use the new i2c_dw_shutdown() hook,
> allowing the controller to gracefully NACK master requests during
> system shutdown.

...

> +static void dw_i2c_plat_shutdown(struct platform_device *pdev)
> +{
> + struct dw_i2c_dev *i_dev = platform_get_drvdata(pdev);
> +
> + if (!i_dev)
> + return;

Follow better style.

> + pm_runtime_disable(&pdev->dev);
> + if (!pm_runtime_status_suspended(&pdev->dev))
> + i2c_dw_shutdown(i_dev);
> +}

--
With Best Regards,
Andy Shevchenko