From: Sean Nyekjaer Date: Fri, 6 Dec 2019 15:29:22 +0000 (+0100) Subject: can: m_can: tcan4x5x: add required delay after reset X-Git-Tag: v5.15~4840^2~76^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60552253e29c8860ee5bf1e6064591b0917c0394;p=platform%2Fkernel%2Flinux-starfive.git can: m_can: tcan4x5x: add required delay after reset 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: Sean Nyekjaer Acked-by: Dan Murphy Cc: linux-stable # >= v5.4 Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/m_can/tcan4x5x.c b/drivers/net/can/m_can/tcan4x5x.c index 3db6192..d5d4bfa 100644 --- a/drivers/net/can/m_can/tcan4x5x.c +++ b/drivers/net/can/m_can/tcan4x5x.c @@ -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);