Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp285005imm; Tue, 14 Aug 2018 19:19:06 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyk1tadskBaWBMu/nXB8ozW2edtBbf1MVSofOfEnHCoTUNde5Bf6Q0Kx7hmRXOhtMhUPRVM X-Received: by 2002:a65:62cd:: with SMTP id m13-v6mr23251351pgv.280.1534299546427; Tue, 14 Aug 2018 19:19:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534299546; cv=none; d=google.com; s=arc-20160816; b=GOWKcqmRLwl9ZWIoVlG7s2+vZNrwZSUpgOYAs/yoWXIpUkbHhmyBbN1WaV48FT0vtz eQ+H2wJmQoyP4DPPf1TvSokJVc1JVrgI4siebf1vPFBv1HeSqlaTMKgGLnP7R6zRwQN2 LLvCLN8d8In2Q3Ha7NiidC1oU8xndSRlftiMfMHYyd99Ud3DToGaK+V5/kQF74expAFC YOOLtePcV+UoXe2iYrj60o+3PAe06ibYN7nmbYI5VIBFlwgqW//E4fOMK9Rv/U2UhoSv hAHGo/jAioZG7GWyY6o8tkiLcYebSvX5FjZC9Eqw+yOkPKvWIaDfIBt/g9g3toHybiNn 0xDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=skqZbNutMA/DekEo8deH+lkEyYuc0vfAmIEBSU/rQxQ=; b=pIti6dXnYLdzE1k+QoDwhNzcxEeP2xu4ZMKc3HNHF7Nzv95Ckb16kuneeLCeTDYyWI NfrDmFO8hnd4AwDXhBzJkrbdgS1icqNM+VSmkk7i/lh+qIpBrnOAdd2qdgybH484AZFw O3VdNHYcmMK+EPJCu3YDke1xOr5i+VJrc77JeiAydgz5PECul3go6mOS1yg+0GSCeQbo w1iaNHa2GSIVWjn2xtJxMQUNqJlfOxroGLhgAaekZ0q2O0GKrshdeEjJMEauwWp1GaQw pbsn72aDtNHS+djgLKWUBCHl+s6zOA4a+2HCiaelD9fEJkcM+LEwd5yWOIszqkqRIKHB BG3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IXALR1Px; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 d128-v6si24208421pfc.211.2018.08.14.19.18.51; Tue, 14 Aug 2018 19:19:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=IXALR1Px; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1728480AbeHOFHP (ORCPT + 99 others); Wed, 15 Aug 2018 01:07:15 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:39289 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725946AbeHOFHP (ORCPT ); Wed, 15 Aug 2018 01:07:15 -0400 Received: by mail-oi0-f68.google.com with SMTP id d189-v6so37315937oib.6 for ; Tue, 14 Aug 2018 19:17:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=skqZbNutMA/DekEo8deH+lkEyYuc0vfAmIEBSU/rQxQ=; b=IXALR1PxaqZaAXvZVfooewp5OvpHuIkuiEmSzaLG3MJk6R53nD83fddTKQV+E6qVch ACIhUxmSUmYpclhyfqfFO34aBmKks1D95/k4IIhRlsVwX9crfHCZV0o2/wUWnMtuYip8 JGkdSmZAyPgbYeAfBu6p3eq06/y6uURsyso+0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=skqZbNutMA/DekEo8deH+lkEyYuc0vfAmIEBSU/rQxQ=; b=FpXO4UKx7GjutyIe7hUYIAd32HWG/gfoC57QI2eN6O5cF0tgWTtPeoTMIpAcNa16sn 2bCuCgz4Az+eLdFo6jJfu39v3wTDsbuAPNggjUnrN6DqxAAuNHcRfVwxiSXG99QVYsXn 1hi+uIIf35IM0n10m17zzNq40AyK1gnHgOxmzuwHgE8ZUmaXy+BJiRKq/W74rqjW3z1U qWAt2jE8PLB4NWiDuYChNwUIZzh7rflhFxyl/NxPm4QkKU9q/l4t/TDmwVCV/SmkEgzi CkqtPNw3dCQyA9kO+/AY6cSpQRzZ9rsACRX6uvszKG64K5ny4LjW1fb66qRsYPxRDFsw qaZg== X-Gm-Message-State: AOUpUlFspIXiaZitfb5M2YT0qaWxc4iaN12vBzUNmDXbPHBPAZ4tb2y9 NGV5ZjioVEn1MoBBF92gT2XCSYS/cxd3+7d2VDHVOA== X-Received: by 2002:aca:5dc5:: with SMTP id r188-v6mr25689446oib.320.1534299433317; Tue, 14 Aug 2018 19:17:13 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:237a:0:0:0:0:0 with HTTP; Tue, 14 Aug 2018 19:17:12 -0700 (PDT) In-Reply-To: <20180814202720.GB26606@rob-hp-laptop> References: <64681bf903104c8a02f118294e616e2a12a5ebe4.1533638405.git.baolin.wang@linaro.org> <20180807134121.GA7958@sirena.org.uk> <20180808095025.GB9346@sirena.org.uk> <20180808105451.GE9346@sirena.org.uk> <1533754621.2283.270.camel@impinj.com> <20180814202720.GB26606@rob-hp-laptop> From: Baolin Wang Date: Wed, 15 Aug 2018 10:17:12 +0800 Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: spi: Add Spreadtrum SPI controller documentation To: Rob Herring Cc: Trent Piepho , "broonie@kernel.org" , "linux-kernel@vger.kernel.org" , "orsonzhai@gmail.com" , "devicetree@vger.kernel.org" , "zhang.lyra@gmail.com" , "mark.rutland@arm.com" , "linux-spi@vger.kernel.org" , "lanqing.liu@spreadtrum.com" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On 15 August 2018 at 04:27, Rob Herring wrote: > On Thu, Aug 09, 2018 at 11:03:11AM +0800, Baolin Wang wrote: >> Hi Trent, >> >> On 9 August 2018 at 02:57, Trent Piepho wrote: >> > On Wed, 2018-08-08 at 11:54 +0100, Mark Brown wrote: >> >> On Wed, Aug 08, 2018 at 06:35:28PM +0800, Baolin Wang wrote: >> >> > On 8 August 2018 at 17:50, Mark Brown wrote: >> >> > > Right, I don't think we added this yet (if we did I can't see >> >> > > it). I'd >> >> > > add a new field to spi_transfer for this, then other controllers >> >> > > with >> >> > > the same support can implement it as well and drivers can start >> >> > > using >> >> > > it too. >> >> > OK. So I will name the new filed as 'word_delay', is it OK for you? >> >> >> >> Sounds good, yes. >> > >> > Should it be in =C2=B5s like the existing iter-transfer delay? I thin= k >> > perhaps units of cycles of the SPI clock make more sense? >> >> Since some SPI controllers just want some interval values (neither =C2= =B5s >> unit nor cycles unit ) set into hardware, and the hardware will >> convert to the correct delay time automatically. So I did not force >> 'word_delay' unit as =C2=B5s or cycle, and just let the slave devices >> decide the unit which depends on the SPI hardware requirement. > > This needs to be defined units in DT, not decided by each controller. Do you mean we should introduce one standard property (maybe named as 'word_delay_unit') to define the word_delay unit? If we really need to specify the unit of word_delay, I think we can add comments for spi_tansfer to specify the unit, which will be better. diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index a64235e..7a72c0a 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; }; --=20 Baolin Wang Best Regards