Re: [PATCH 1/2] net: m_can: tcan4x5x: add required delay after reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sean

On 12/6/19 9:29 AM, Sean Nyekjaer wrote:
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@xxxxxxxxxx>
---
  drivers/net/can/m_can/tcan4x5x.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/drivers/net/can/m_can/tcan4x5x.c b/drivers/net/can/m_can/tcan4x5x.c
index 6e37c3fd87af..cb5fdb695ec9 100644
--- a/drivers/net/can/m_can/tcan4x5x.c
+++ b/drivers/net/can/m_can/tcan4x5x.c
@@ -367,6 +367,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);

Acked-by: Dan Murphy <dmurphy@xxxxxx>

Thanks for the patch.  My data sheet was old and did not have the timing diagrams in them.
I downloaded the latest data sheet.

Dan




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux