Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp43265imm; Wed, 12 Sep 2018 17:42:23 -0700 (PDT) X-Google-Smtp-Source: ANB0VdakMH+BM3KWtL3tJ21i2XKhbSLeEXMexs0JI/dE2rD0HrU68dAfNurrgj+Gtqzb8TXdAGTs X-Received: by 2002:a17:902:2ac3:: with SMTP id j61-v6mr4697076plb.172.1536799343839; Wed, 12 Sep 2018 17:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536799343; cv=none; d=google.com; s=arc-20160816; b=IMWtXmqwmFJW1VuXyDus0x5vUzi+XlNCio7m3YQCcx8glwo9c5QDbs0PHKFI7YsY0L LZYzgoODwxF9++CRm1NwkFKq2ld/J90N6h+CbxQ601Kh9B2STIAHHIgtUL7hno/TI/y9 VjTROfO4Mv2IXwAEwiuw1XMjaSAG/OnLSCm4kN7XKHPZFia0V5stey4TNp0WS2wlnRSP dzA6x8XXAioIH0z8e1H56V4v6H3wAZ+DG0BgJTDsbKUCbNECuybLThM47tjuXbsuidfb igezi8gF/jtpXUTOB1kHkuaOc8Un3FMZWV6EWL7zTuuGs8fG5Oy5lEQdudDobT0O5waI 7Q+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=eXHkYVbfJ/7IzoGAj2IYdyJDsqwaXzDNLq7xn+GmZzU=; b=ay55WOoObYWpp5WLCLsMh0WpyOHzJQUjAkOvtyBib20Ids4xhn0Xl3i558T7orAEl9 IPv1I2cOpsULDzntSwKvGb9MhNuHF4Nqc9z6WA3scCJ4fCVkTeIEgBUaMc/bAiBKnMcg zzLY27qVj+DnBQqMX1ldNLF3Q6U2/Mrx6yJHZVrT24HmgVQM3bxkgnhJ+b+65SEnSS90 PTPEo27sMIVKbb8v1axIbDg1DsDZoRt0V1cagBO1vra+YNbNci0AmBGW3J/b2CeC/LWu LFLkzk4KtGew/UY9aSvonTvP+QHpwLzjHnFn9kOh6UebFdfntkXzDcB5sJf9CzaNvnmT BbxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=Z3XrOsD3; 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 d2-v6si2500568pfb.262.2018.09.12.17.42.07; Wed, 12 Sep 2018 17:42:23 -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=fail header.i=@lechnology.com header.s=default header.b=Z3XrOsD3; 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 S1727413AbeIMFrB (ORCPT + 99 others); Thu, 13 Sep 2018 01:47:01 -0400 Received: from vern.gendns.com ([206.190.152.46]:46148 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbeIMFrA (ORCPT ); Thu, 13 Sep 2018 01:47:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject :Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=eXHkYVbfJ/7IzoGAj2IYdyJDsqwaXzDNLq7xn+GmZzU=; b=Z3XrOsD3VifUxYNiYdPE+fRvu quXlTCVcarz1OXQf+wEGp3AF5pCZnU9xmUbjCCXq86k4MVC3Xwn8G6/2bHLJ1bakXlgggKAUBgDU5 uO28p8cCRLQHp4uN+35JD9fXfAz61o4bjmZGki6147XZ9h9AvhBE+lIVmyaGnUEdS9cw6NrbeJtW5 EdMG7wHAphy2kIradQAijTqQhCD/M3H5FvZ7Nt/E6suxTdsFORqjKYt0FP/5sYFpAbadV6tQ3DIgl AxlQGK0NHmOzEJR4xNqD1y0F+fdA5e69fCHdhFawTyit0nc4E2Yl3T+b1Qlx7tlf5d+PV8QI1t5Yc KVaj727qA==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:33924 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1g0Ffp-00AGoe-Ea; Wed, 12 Sep 2018 20:39:57 -0400 From: David Lechner To: linux-spi@vger.kernel.org, linux-iio@vger.kernel.org Cc: David Lechner , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Mark Brown , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] spi: add new SPI_CS_WORD flag Date: Wed, 12 Sep 2018 19:39:17 -0500 Message-Id: <20180913003920.30600-2-david@lechnology.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180913003920.30600-1-david@lechnology.com> References: <20180913003920.30600-1-david@lechnology.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds a new SPI mode flag, SPI_CS_WORD, that is used to indicate that a SPI device requires the chip select to be toggled after each word that is transferred. Signed-off-by: David Lechner --- include/linux/spi/spi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index d698f9db3484..7bb36145e2ba 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -163,6 +163,7 @@ struct spi_device { #define SPI_TX_QUAD 0x200 /* transmit with 4 wires */ #define SPI_RX_DUAL 0x400 /* receive with 2 wires */ #define SPI_RX_QUAD 0x800 /* receive with 4 wires */ +#define SPI_CS_WORD 0x1000 /* toggle cs after each word */ int irq; void *controller_state; void *controller_data; @@ -177,7 +178,6 @@ struct spi_device { * the controller talks to each chip, like: * - memory packing (12 bit samples into low bits, others zeroed) * - priority - * - drop chipselect after each word * - chipselect delays * - ... */ -- 2.17.1