Re: [PATCH v4] i2c: designware-platdrv: simplify reset control and error handling

From: Andi Shyti

Date: Tue Jan 20 2026 - 08:55:34 EST


Hi Artem,

I'm sorry, but in one thread there are three versions and I don't
really know what you are addressing. May I ask you to resend it
without linking it to any thread (please don't use in-reply-to).

On Tue, Nov 11, 2025 at 05:55: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.
>
> As part of this cleanup, streamline the error handling by removing goto
> exit_reset and goto exit_probe labels, using direct returns with
> dev_err_probe() for cleaner and more linear code flow.

Can you please put this part in a separate patch? They are
logically unrelated.

Thanks,
Andi