]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: mediatek: add bus regulator control for power saving
authorAdlavinitha Reddy <adlavinitha.reddy@mediatek.com>
Wed, 18 Mar 2026 08:46:16 +0000 (16:46 +0800)
committerAndi Shyti <andi.shyti@kernel.org>
Tue, 14 Apr 2026 22:54:34 +0000 (00:54 +0200)
commitfaed986de5250e1cd1296e82d1fcb4c03997e02a
treed7fc9f239d563c399155ccf6d86f10710b5f48b5
parent60c8a400fbef3592b8d718dc49f92914a9c8d762
i2c: mediatek: add bus regulator control for power saving

Add conditional bus regulator enable/disable in mtk_i2c_transfer()
to support I2C bus power gating for platforms that require it.

This implementation:
- Enables bus_regulator before clk_bulk_enable() if vbus-supply is defined
- Disables bus_regulator after clk_bulk_disable()
- Only activates when vbus-supply is provided in device tree
- Has no impact on platforms without vbus-supply defined

This approach provides power savings for platforms with an extra I2C bus
regulator, while avoiding runtime PM complexity.

Tested on MT8188.

Signed-off-by: Adlavinitha Reddy <adlavinitha.reddy@mediatek.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260318084621.4127757-2-adlavinitha.reddy@mediatek.com
drivers/i2c/busses/i2c-mt65xx.c