Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4405993imu; Tue, 29 Jan 2019 00:39:18 -0800 (PST) X-Google-Smtp-Source: ALg8bN4IghtSeo4iOcdhWnckS3Eg25kzLa2O6wEdi4HC0jxiW0n0V6MHF9KdAzsGMZC0I8Osvr4Y X-Received: by 2002:a17:902:bc81:: with SMTP id bb1mr24579795plb.223.1548751158353; Tue, 29 Jan 2019 00:39:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548751158; cv=none; d=google.com; s=arc-20160816; b=qVJbJrM6PSRa9KgIhgzICIkEnqg8ekay6os5MEen7PInkX3/pypGF1yYP2r5ZGA60e Ub2v8RZk2Oe3iO3HKHoB3OHVe96y2JMhVd5tE+xiw/CJCClZd0WgwHLr0+smQ2aD05wp LhS1dYxYJqb1Kj1OQKoPWCwRYUJ+ChvTC29RUMKJ0Y/C7dzzyrrV0tmQdvSnAINsfrdE TUVNI5pI0lxQryGC6zdwlMMRQ1nk4boySwvDm4C+0wBO5qngcPySkeMsXo6ZM6x+vlGJ 58eZHDu000EBTJTxq3KoZd8+Z6qwyEODYYv9HSLnc+HQEWbBkri/N6MgSBJKbydI4Q1c R2iA== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=p2kIF2D3mfXdnTnzYqtCaYs/f84OFeKZVdbluyx94wg=; b=jBL577sjwlAeg/AoegmUELZNJxxjl8qUiOxDdlCVojvxl1CCWG4KPS7f+y5YmUVT7U EJUQTniiasEAXa2RCdqkf9gBNLnEMor8iwHxKu+/y2cfezJhJhARzJwbdHauJaZ6tyIo NCIq3CGPJBpVr+zRBAfvofH/EVNWVWVqmdmzlEPUmrHEeAhDQxadlHdL+vi9zngj+de2 db2nWxGM3OIyAITNqPfhnAnQ6mbgbHMa9Qrtpiv6N7PCHlKbtOUt9t3V8PofDAKPWTAw d0f00UC909xvR5220EL3+Krz/NM+japvJ7appjIYh+MxcDNMOHpJDtXHblMzy2VN6cqW k9DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@norrbonn-se.20150623.gappssmtp.com header.s=20150623 header.b=S1t4U1Ga; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e15si34582280pgm.25.2019.01.29.00.39.02; Tue, 29 Jan 2019 00:39:18 -0800 (PST) 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=@norrbonn-se.20150623.gappssmtp.com header.s=20150623 header.b=S1t4U1Ga; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727330AbfA2Iiw (ORCPT + 99 others); Tue, 29 Jan 2019 03:38:52 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:43441 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbfA2Iiw (ORCPT ); Tue, 29 Jan 2019 03:38:52 -0500 Received: by mail-lf1-f68.google.com with SMTP id u18so13957716lff.10 for ; Tue, 29 Jan 2019 00:38:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=norrbonn-se.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=p2kIF2D3mfXdnTnzYqtCaYs/f84OFeKZVdbluyx94wg=; b=S1t4U1GazkO17kk1fRBuCQ3f2Pf1eINj5CfgSCCN0EeDVvvsm61crKWE7JHzRdkDnx k57T9tEc69TsC6WJjcvpZMowMHSXpDSVB1vuaj9W9V3KGHWkuuTSEEBvptQiXb5g+MI0 Obm98QY6TG/17kRNhGUKnbvAXYEJSHBcGbDvY6DCPlJHmOmh04L0aV7Qk3fJDWQ/3J1s zVz7aMsej3tnhjmit/sxs6xdTe5ZrBpODfem7iWZpbSAYWPIGZr2hMY48tvIIeHg0e8+ b8klJoSIwnqkpx2hTv+skH+vcajwGjxunVNKXMvsHP5IGbMyMd3jHCz2SThOpxWoTsr1 DgIQ== 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:mime-version :content-transfer-encoding; bh=p2kIF2D3mfXdnTnzYqtCaYs/f84OFeKZVdbluyx94wg=; b=K1jJDm5DIMjp6j4KWND+hq8OAIfn/F+moeJyVaDmwfMHnUGjKQ9ttIBuSvhtupn/kH tBpzp593/NGD75z+Qm5gNhTwuyGWjHU7JOJNNMB2XtOTmyWEyelKqj2sxZFBbMozjoyF jF521wkjoZSp4QkXlx+WUqWMcGQZrFiaeTJgPpq2kFzm5SkHVLgm1zf+QtMhy2pLOVAF frRMmzQXS4dVypw/8bVyBYGZIPCLqqgtu5wle9tcA8Ka/b+NooRZTXRdJ1Hpg1TuUhRO G2IX1DbLDW+0orwhMUhBdZpyTJMKHV0+anaxHPTat1t5w78a+TxrCTXH2QvPwND1OVYU MCrw== X-Gm-Message-State: AJcUukeEkf0LMheqdbFqXVKscA7zhUbEASDJ+GzE0LwVh/OUBpWLMeWZ jhwk1oGn8C7mabhYc5ncUCI8+Fmpkrw= X-Received: by 2002:a19:40cc:: with SMTP id n195mr18948956lfa.40.1548751129399; Tue, 29 Jan 2019 00:38:49 -0800 (PST) Received: from mimer.lan (h-29-16.A159.priv.bahnhof.se. [79.136.29.16]) by smtp.gmail.com with ESMTPSA id v17-v6sm3378774ljg.32.2019.01.29.00.38.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 00:38:48 -0800 (PST) From: Jonas Bonn To: linux-kernel@vger.kernel.org Cc: Jonas Bonn Subject: [PATCH v4 0/2] spi: support inter-word delays Date: Tue, 29 Jan 2019 09:38:42 +0100 Message-Id: <20190129083844.20572-1-jonas@norrbonn.se> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changed in v4: * Rename word_delay to word_delay_us and slot it in _beside_ the existing word_delay parameter in spi_transfer (see commit message for more info). * Add code to __spi_validate to make sure transfer and device align with respect to the word_delay_us parameter Changed in v3: * Drop setting of inter-word delay via device tree Changed in v2: * Fix atmel-spi driver to not unconditionally set minimal delay if no delay is required (erroneous clamping) This short series adds support for SPI inter-word delays and configures the spi-atmel driver to honour the setting. Some SPI slaves are so slow that they are unable to keep up even at the SPI controller's lowest available clock frequency. I have such a configuration where an AVR-based SPI slave is unable to feed the SPI bus fast enough even the SPI master runs at the lowest possible clock speed. Jonas Bonn (2): spi: support inter-word delay requirement for devices spi-atmel: support inter-word delay drivers/spi/spi-atmel.c | 18 +++++++++++++----- drivers/spi/spi.c | 5 +++++ include/linux/spi/spi.h | 6 ++++++ 3 files changed, 24 insertions(+), 5 deletions(-) -- 2.19.1