From patchwork Fri Jun 16 09:23:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 776637 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3wpw0L4lX3z9sCX for ; Fri, 16 Jun 2017 19:23:30 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753366AbdFPJX3 (ORCPT ); Fri, 16 Jun 2017 05:23:29 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:55458 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753272AbdFPJX3 (ORCPT ); Fri, 16 Jun 2017 05:23:29 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id E8F2B45320; Fri, 16 Jun 2017 11:23:27 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id thIpMu_JkJwr; Fri, 16 Jun 2017 11:23:18 +0200 (CEST) From: Stefan Roese To: linux-i2c@vger.kernel.org Cc: Wolfram Sang Subject: [PATCH] i2c: ocores: Add missing wake_up() call upon state change to STATE_DONE Date: Fri, 16 Jun 2017 11:23:17 +0200 Message-Id: <20170616092317.584-1-sr@denx.de> Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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 Cc: Wolfram Sang --- 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; } }