From patchwork Thu Aug 16 12:54:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 144391 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2043031ljj; Thu, 16 Aug 2018 05:55:30 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxerlW1c6dTS+WO4keiSlJGnpKVd37g8ZpNF1D5H39IYgLUnJjD3AbYP7Gu3KUzQXgHornu X-Received: by 2002:a63:115e:: with SMTP id 30-v6mr29201358pgr.53.1534424130525; Thu, 16 Aug 2018 05:55:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534424130; cv=none; d=google.com; s=arc-20160816; b=VsURZscDw3uhEfNCHjF8owFSkFNOZj7nBEQUuOaMvsXunIg221YGwQdmAnhBI2K/Rg 5Dkpl5eud2B+jhEDhZrmCjFzatZFPfAxHwXGlzUzpEuU8bGVTdCoGSOnh92iNR0f5AhG TwKV3bwpAvC3HEf1MlCZY0fU5RBASYd3OVif6bcTU8d7UJFWUdX9KxhSGNO0jiF+lhnt pnKrs945t7wgJcUTl5eVwWvACpMIEtXU/JVCHwEKgtIu1NVmcUr6dR9Y2HI18JUqmxTD RiT3kUcxTMdSlsCnRyyXVeFf7+4GHSU8lhtIUOIW4ZYHv0GtIxzQUqLsQJY1fA41cZDi uRDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=cvX4bf2n4cCtLSLi1usDuICrAMQwoBzNjS22rozmeSs=; b=MXpr27vhbqarUnX3qA0Sia+6Fi2zxogn9NJo3AHoTRmc9/CFZ83tlDu3V6iJi5pO9C R13az9F37BWZA9kE9McNVy5MSy3AuaTF6+YOgCgPGqf/9lVWGXRRZuDqvYdnMOJInlEY z5BkVVccPl8vW32zIWgoWOofwg3FhV0y4nsQe884V6J83dCyuF6JfLmY5qUcRt1g5ds9 At2nmxvAbjzAErjHq3KCdDuFiDDgMDNGP1ujDoMojzry0C5cpAOaUP3m2Jc1dnemfDJO qlgKGRz35lJkObB10/bElZe7axm1JW+pp9Bz6qwKGAiFDG6hEq6sk3T+Bi18OjnAlGwf nGtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PTIDQoH5; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f91-v6si22198176plf.376.2018.08.16.05.55.30; Thu, 16 Aug 2018 05:55:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PTIDQoH5; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391464AbeHPPxy (ORCPT + 1 other); Thu, 16 Aug 2018 11:53:54 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:35865 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389341AbeHPPxy (ORCPT ); Thu, 16 Aug 2018 11:53:54 -0400 Received: by mail-pl0-f67.google.com with SMTP id e11-v6so2074218plb.3 for ; Thu, 16 Aug 2018 05:55:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=cvX4bf2n4cCtLSLi1usDuICrAMQwoBzNjS22rozmeSs=; b=PTIDQoH5Cmu8XzHr5m0+VtUI3H+FKVgyPdUSKOwErZgUrGqO7l+5I1wslMzqkJKnvK IQeNBSpaLINAbL6Cs6s3uSVDRYXhYUfL820sSCb1wB6CnqtDMZG0f4xOSSWqXHarZVPu +WAShEEDabkKa1TPKTlpcivLTrlF3LotCh2zM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=cvX4bf2n4cCtLSLi1usDuICrAMQwoBzNjS22rozmeSs=; b=NUR0GFnO8JKKQkcpMF5gd9YYWlOaPDN1gO/xl340fEncQtp6ocUndNPpnRa+EJQ/ee jaS1JWRY45+1bsgrv84oW0e5TACWBq2uACK/QRhrwzu4tw2rnPbpbSbWySQZIXijb/Hr ogiIXNEyZc1oI3Fn5MWtpCMOUWsb2rrAjlDBvkG1ZrorDi+tkVtbp8ceu0erVQFWxl21 wbTygnaHqotldDtPWsfUeYqGf6Q5YcieE9q9huNAvRGhVo7NACM6WdpK2O60darbtPEC k2szQn5x8OFKI+wrTqATaUITOVDvBTxsOczLsqviPm4VQ7moPc7VDPN3A0LKjyUDUnaC ao4g== X-Gm-Message-State: AOUpUlFcBZh7b8nKblHA2gIaLQObWzlkHDLm+RE1lwsdsrSHhKf/5D8q 3TnnR+bPaI/JX3zg7hNe2LO0Zg== X-Received: by 2002:a17:902:7d8f:: with SMTP id a15-v6mr29231316plm.332.1534424129053; Thu, 16 Aug 2018 05:55:29 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id 203-v6sm34944589pgb.14.2018.08.16.05.55.25 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Aug 2018 05:55:28 -0700 (PDT) From: Baolin Wang To: broonie@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: orsonzhai@gmail.com, zhang.lyra@gmail.com, lanqing.liu@spreadtrum.com, baolin.wang@linaro.org, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] spi: Introduce one new field to set word delay Date: Thu, 16 Aug 2018 20:54:49 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org For some SPI controllers, after each word size (specified by bits_per_word) transimission, the hardware need some delay to make sure the slave has enough time to receive the whole data. So introducing one new 'word_delay' field of struct spi_tansfer for slave devices to set this inter word delay time. Signed-off-by: Baolin Wang --- Changes from v1: - New patch in v2. --- include/linux/spi/spi.h | 3 +++ 1 file changed, 3 insertions(+) -- 1.7.9.5 Reviewed-by: Rob Herring diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index a64235e..d698f9d 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -711,6 +711,8 @@ extern void spi_res_release(struct spi_controller *ctlr, * @delay_usecs: microseconds to delay after this transfer before * (optionally) changing the chipselect status, then starting * the next transfer or completing this @spi_message. + * @word_delay: clock cycles to inter word delay after each word size + * (set by bits_per_word) transmission. * @transfer_list: transfers are sequenced through @spi_message.transfers * @tx_sg: Scatterlist for transmit, currently not for client use * @rx_sg: Scatterlist for receive, currently not for client use @@ -793,6 +795,7 @@ struct spi_transfer { u8 bits_per_word; u16 delay_usecs; u32 speed_hz; + u16 word_delay; struct list_head transfer_list; };