Re: [PATCH 1/2] i2c: add subsys_i2c_driver() macro

From: Wolfram Sang

Date: Tue Dec 01 2026 - 17:50:33 EST


On Tue, Dec 01, 2026 at 05:45:51PM +0800, Peng Fan wrote:
> From: Peng Fan <peng.fan@xxxxxxx>
>
> Add subsys_i2c_driver() and subsys_i2c_driver_probe() macros so that
> I2C drivers registered at the subsys_initcall() level can avoid the
> open-coded init/exit boilerplate.
>
> subsys_i2c_driver() replaces subsys_initcall() plus module_exit() for
> drivers that need an unregister path. subsys_i2c_driver_probe() replaces
> subsys_initcall() for drivers without an exit callback.
>
> Signed-off-by: Peng Fan <peng.fan@xxxxxxx>

Acked-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

Applied to my for-andi branch, thanks!