]> www.infradead.org Git - users/jedix/linux-maple.git/commit
reset: rzg2l-usbphy-ctrl: Move reset controller registration
authorBiju Das <biju.das.jz@bp.renesas.com>
Mon, 10 Jun 2024 16:48:45 +0000 (17:48 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 21 Jun 2024 13:57:30 +0000 (15:57 +0200)
commitb081f13c11500bceb8ab504797a48cc7751de4b5
tree399aca28ca04001c9f1792a8c7289c40a5d2059a
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
reset: rzg2l-usbphy-ctrl: Move reset controller registration

As soon as the reset controller is registered, it could be used by a
reset consumer. That means hardware setup to be done first and then the
registration of the reset controller. So move the registration of reset
controller at the end of probe().

While at it, fix the issue that the reset is not re-asserted in case
devm_reset_controller_register() fails and also use goto statements to
simplify the error path in probe().

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240610164845.89666-1-biju.das.jz@bp.renesas.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/reset/reset-rzg2l-usbphy-ctrl.c