Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2849014imm; Sun, 16 Sep 2018 04:31:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY+6ULdk3MI4XdIWarZCDhJraeAB5K5VS/4VxvbntOIxU6xMTH5xgTs2rit/aYPMptN202D X-Received: by 2002:a17:902:f096:: with SMTP id go22mr20860251plb.183.1537097467518; Sun, 16 Sep 2018 04:31:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537097467; cv=none; d=google.com; s=arc-20160816; b=zfEyjTcw/pZ/VK2MkA/lPXSMl1IAYcVq+FqyTowp0Zl6sZmK94anHnfSQEAtxz0a4f P3drHWvvNNT9Nd9+fCVzr2osgT0Qw6tGUcvDPETzjJOnm3Lk3jqmC1+sOqS4sR48C1f1 xQHFueWtJpZkDAYXuWKR+4xn7MYEhf5Kg9R6Acoa2/+MIlwld4bR2hevjn3+9KSqQrsy 8u3BK3wyxt/v7MiPgzdcg8QNmQQFjeL4aPIq+AI2WE9LnjE6VaWPvi0fy25ruP2QC2H4 U4H54O4O1XFvS5Oj/B9uwq8iiR+fXbK85V8RZqOpwLr/gvogR9x/p9nDaLBuoeRj43MV jvVQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=n8OY7J7nzE+O7BtSK0oPA076lhFs6fIOQY34Eil99E0=; b=0BGA7l/DJ0zkvQQ+sI5COZo4PgtILTC3UevHjmUzndmHFqg75wy0kraOptG3hZXCqC eKbtFFgK8hss3zj8e9E2C5RfTdH1hJRtQfV53hvm4J9W2y3Yv+Em2RX+QHNItd8jHCGo Z7XXlr7n0ch0PeBmk84z3XFCgEvR93eSXvQ0IAwPgDC+bQxmoVxfx1lDzFzkRvTkPPdI DraPrhh0acvaofWK1EqfANjfZ8nQBdG7tDqBXoEoFBNVoiEixnmDmEHtt4Bva5bBrFhk av+xWVxtdI2TiOXNcUTmBLdbIl5MLD1MyaGKxL0EX2vs6RNe8Igcp7rZl0YxWJ82BtAE 8Duw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="fYR/+jbq"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x185-v6si12807337pfb.306.2018.09.16.04.30.22; Sun, 16 Sep 2018 04:31:07 -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=@kernel.org header.s=default header.b="fYR/+jbq"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728186AbeIPQwm (ORCPT + 99 others); Sun, 16 Sep 2018 12:52:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:45530 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726752AbeIPQwm (ORCPT ); Sun, 16 Sep 2018 12:52:42 -0400 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 71AC120867; Sun, 16 Sep 2018 11:30:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1537097404; bh=5wwBxdHbMqJorPf5rINPEs/GVbT2A+SR61fz4HVjMak=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fYR/+jbqgBEwq7yXyiDx8ZS5DkXfw/Igm7F/wI3A2itsf66ANyiNSHwJWyf8wUk/M /lkUfj8b/PuBuVCHLUfxW9j/zLnnqkm2aUhYVGrQ7bAmJSF19H1G2RdTPOmjt62sXx 3akUtmOx08EBTQlrvg90zrpJlIFV1hORDhCPXpSM= Date: Sun, 16 Sep 2018 12:29:59 +0100 From: Jonathan Cameron To: David Lechner Cc: linux-spi@vger.kernel.org, linux-iio@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Mark Brown , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/4] spi: add new SPI_CS_WORD flag Message-ID: <20180916122959.271e4aba@archlinux> In-Reply-To: <20180913003920.30600-2-david@lechnology.com> References: <20180913003920.30600-1-david@lechnology.com> <20180913003920.30600-2-david@lechnology.com> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 12 Sep 2018 19:39:17 -0500 David Lechner wrote: > 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 Just a general patch ordering / combining comment. Seems odd to introduce a flag that a driver might use in a patch preceding any implementations! I would have combined this with the next patch so the software fallback would be in place when the ability to turn it on is added. Jonathan > --- > 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 > * - ... > */