devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Nyekjaer <sean@geanix.com>
To: mkl@pengutronix.de, dmurphy@ti.com, linux-can@vger.kernel.org,
	robh+dt@kernel.org
Cc: Sean Nyekjaer <sean@geanix.com>,
	devicetree@vger.kernel.org, martin@geanix.com
Subject: [PATCH 1/2] net: m_can: tcan4x5x: add required delay after reset
Date: Fri,  6 Dec 2019 16:29:22 +0100	[thread overview]
Message-ID: <20191206152923.470980-1-sean@geanix.com> (raw)

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>
---
 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);
-- 
2.24.0


             reply	other threads:[~2019-12-06 15:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06 15:29 Sean Nyekjaer [this message]
2019-12-06 15:29 ` [PATCH 2/2] dt-bindings: can: tcan4x5x: reset pin is active high Sean Nyekjaer
2019-12-06 15:33 ` [PATCH 1/2] net: m_can: tcan4x5x: add required delay after reset Dan Murphy
2019-12-06 15:34 ` Dan Murphy
2019-12-07 13:03 ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191206152923.470980-1-sean@geanix.com \
    --to=sean@geanix.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=linux-can@vger.kernel.org \
    --cc=martin@geanix.com \
    --cc=mkl@pengutronix.de \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).