From: Stefan Roese <sr@denx.de>
To: linux-i2c@vger.kernel.org
Cc: Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH] i2c: ocores: Add missing wake_up() call upon state change to STATE_DONE
Date: Fri, 16 Jun 2017 11:23:17 +0200 [thread overview]
Message-ID: <20170616092317.584-1-sr@denx.de> (raw)
I've noticed that this driver adds a timeout pause of 1 second after
each xfer. This is due to the wait_event_timeout() call in ocores_xfer()
using a "HZ" timeout value and a missing call to wake_up() in
ocores_process() called by the interrupt handler when the state changes
to STATE_DONE at the end of the frame.
This patch adds the missing call resulting in the removal of this 1
second timeout delay after each xfer.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfram Sang <wsa@the-dreams.de>
---
drivers/i2c/busses/i2c-ocores.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index 34f1889a4073..5f8395ea0106 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -191,6 +191,7 @@ static void ocores_process(struct ocores_i2c *i2c)
} else {
i2c->state = STATE_DONE;
oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_STOP);
+ wake_up(&i2c->wait);
return;
}
}
--
2.13.1
next reply other threads:[~2017-06-16 9:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 9:23 Stefan Roese [this message]
2017-06-16 12:52 ` [PATCH] i2c: ocores: Add missing wake_up() call upon state change to STATE_DONE Peter Korsgaard
2017-06-16 13:04 ` Stefan Roese
2017-06-16 13:26 ` Peter Korsgaard
2017-06-22 10:53 ` Stefan Roese
2017-06-23 18:29 ` Wolfram Sang
2017-06-26 21:30 ` Peter Korsgaard
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=20170616092317.584-1-sr@denx.de \
--to=sr@denx.de \
--cc=linux-i2c@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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