Re: [PATCH v6 1/2] i2c: designware-platdrv: simplify reset control
From: Mika Westerberg
Date: Mon Feb 02 2026 - 04:23:52 EST
On Fri, Jan 30, 2026 at 02:10:36PM +0300, Artem Shimko wrote:
> The current implementation uses separate calls to acquire and deassert
> reset control, requiring manual error handling for the deassertion
> operation. This can be simplified using the dedicated devm function that
> combines both operations.
>
> Replace devm_reset_control_get_optional_exclusive() with
> devm_reset_control_get_optional_exclusive_deasserted(), which handles both
> reset acquisition and deassertion in a single call as well as
> reset_control_put() which is called automatically on driver detach. This
> eliminates the need for explicit deassertion and its associated error
> checking while maintaining the same functional behavior through automatic
> resource management.
>
> Signed-off-by: Artem Shimko <a.shimko.dev@xxxxxxxxx>
This is nice cleanup!
Acked-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>