can: m_can: tcan4x5x: add required delay after reset
authorSean Nyekjaer <sean@geanix.com>
Fri, 6 Dec 2019 15:29:22 +0000 (16:29 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 8 Dec 2019 11:22:01 +0000 (12:22 +0100)
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 <sean@geanix.com>
Acked-by: Dan Murphy <dmurphy@ti.com>
Cc: linux-stable <stable@vger.kernel.org> # >= v5.4
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/tcan4x5x.c

index 3db619209fe199ee8f39cb59987e439c0c50f99c..d5d4bfa9c8fd7a2f3ca8e253f34c20f372fb12b7 100644 (file)
@@ -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);