From patchwork Thu Mar 7 14:38:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_Kundr=C3=A1t?= X-Patchwork-Id: 10843247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D4111390 for ; Thu, 7 Mar 2019 15:39:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B9832E99E for ; Thu, 7 Mar 2019 15:39:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FA3C2E9AA; Thu, 7 Mar 2019 15:39:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E9AD2E99E for ; Thu, 7 Mar 2019 15:39:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726294AbfCGPjv (ORCPT ); Thu, 7 Mar 2019 10:39:51 -0500 Received: from office2.cesnet.cz ([195.113.144.244]:47656 "EHLO office2.cesnet.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbfCGPjv (ORCPT ); Thu, 7 Mar 2019 10:39:51 -0500 Received: from localhost (unknown [IPv6:2001:718:1:2c:9077:1a3:d51f:f1d6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id DE1FA40005D; Thu, 7 Mar 2019 16:39:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2; t=1551973189; bh=jjI2R2SughRNoKxB2KtIIfgI0iNmF5kwLLNB/3k4YmU=; h=Resent-Date:Resent-From:Resent-To:Resent-Cc:In-Reply-To: References:From:Date:Subject:To:Cc; b=YpsquLhYPbpbwbBfei3puUeG8CODQpndd+uSfyDl8RMUHFOROww9UZMAdLbfdvm3r V+ijlP9RtdrsdLYiFk2v1/paUiUpTkdSsgyaQic5zSnyeyQrD8zoqHsaMolw2+LSK4 FhBtJp4p3AIfH8HtQQuuYWx2YF7QBbmNsBHWj548= Message-Id: <36a76356d1ff2e08ebfd43fdfbe6360d5b979e35.1551971833.git.jan.kundrat@cesnet.cz> In-Reply-To: References: From: =?utf-8?q?Jan_Kundr=C3=A1t?= Date: Thu, 7 Mar 2019 15:38:35 +0100 Subject: [PATCH 2/3] spi: orion: Support spi_xfer->word_delay_usecs MIME-Version: 1.0 To: linux-spi@vger.kernel.org, Mark Brown , Jonas Bonn Cc: Kosta Zertsekel , Baolin Wang , Chris Packham Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Jan Kundrát --- drivers/spi/spi-orion.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c index 7822fd73e0b9..eb70a9dc31ac 100644 --- a/drivers/spi/spi-orion.c +++ b/drivers/spi/spi-orion.c @@ -470,6 +470,8 @@ orion_spi_write_read(struct spi_device *spi, struct spi_transfer *xfer) if (orion_spi_write_read_8bit(spi, &tx, &rx) < 0) goto out; count--; + if (xfer->word_delay_usecs) + udelay(xfer->word_delay_usecs); } while (count); } else if (word_len == 16) { const u16 *tx = xfer->tx_buf; @@ -479,6 +481,8 @@ orion_spi_write_read(struct spi_device *spi, struct spi_transfer *xfer) if (orion_spi_write_read_16bit(spi, &tx, &rx) < 0) goto out; count -= 2; + if (xfer->word_delay_usecs) + udelay(xfer->word_delay_usecs); } while (count); }