Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7f6a572 authored by Sean Nyekjaer's avatar Sean Nyekjaer Committed by Greg Kroah-Hartman
Browse files

can: m_can: tcan4x5x: add required delay after reset



commit 60552253e29c8860ee5bf1e6064591b0917c0394 upstream.

According to section "8.3.8 RST Pin" in the datasheet we are required to
wait >700us after the device is reset.

Signed-off-by: default avatarSean Nyekjaer <sean@geanix.com>
Acked-by: default avatarDan Murphy <dmurphy@ti.com>
Cc: linux-stable <stable@vger.kernel.org> # >= v5.4
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a73cf89a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -354,6 +354,8 @@ static int tcan4x5x_parse_config(struct m_can_classdev *cdev)
	if (IS_ERR(tcan4x5x->reset_gpio))
		tcan4x5x->reset_gpio = NULL;

	usleep_range(700, 1000);

	tcan4x5x->device_state_gpio = devm_gpiod_get_optional(cdev->dev,
							      "device-state",
							      GPIOD_IN);