summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Nyekjaer <sean@geanix.com>2019-12-06 16:29:22 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2019-12-08 12:22:01 +0100
commit60552253e29c8860ee5bf1e6064591b0917c0394 (patch)
tree8ce308b2e14a2281ae9e4b91d9e5787d1af848c6
parent048e3a34a2e7669bf475eb56c7345ad9d8d2b8e3 (diff)
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 <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>
-rw-r--r--drivers/net/can/m_can/tcan4x5x.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/can/m_can/tcan4x5x.c b/drivers/net/can/m_can/tcan4x5x.c
index 3db619209fe1..d5d4bfa9c8fd 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);