From: Qing Zhang <zhangqing@loongson.cn>
To: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
Tiezhu Yang <yangtiezhu@loongson.cn>,
Xuefeng Li <lixuefeng@loongson.cn>
Subject: [PATCH v2 2/2] spi: tools: Add macro definitions to fix build errors
Date: Thu, 11 Jun 2020 20:56:52 +0800 [thread overview]
Message-ID: <1591880212-13479-2-git-send-email-zhangqing@loongson.cn> (raw)
In-Reply-To: <1591880212-13479-1-git-send-email-zhangqing@loongson.cn>
Add SPI_TX_OCTAL and SPI_RX_OCTAL to fix the following build errors:
CC spidev_test.o
spidev_test.c: In function ‘transfer’:
spidev_test.c:131:13: error: ‘SPI_TX_OCTAL’ undeclared (first use in this function)
if (mode & SPI_TX_OCTAL)
^
spidev_test.c:131:13: note: each undeclared identifier is reported only once for each function it appears in
spidev_test.c:137:13: error: ‘SPI_RX_OCTAL’ undeclared (first use in this function)
if (mode & SPI_RX_OCTAL)
^
spidev_test.c: In function ‘parse_opts’:
spidev_test.c:290:12: error: ‘SPI_TX_OCTAL’ undeclared (first use in this function)
mode |= SPI_TX_OCTAL;
^
spidev_test.c:308:12: error: ‘SPI_RX_OCTAL’ undeclared (first use in this function)
mode |= SPI_RX_OCTAL;
^
LD spidev_test-in.o
ld: cannot find spidev_test.o: No such file or directory
Additionally, maybe SPI_CS_WORD and SPI_3WIRE_HIZ will be used in the future,
so add them too.
Fixes: 896fa735084e ("spi: spidev_test: Add support for Octal mode data transfers")
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
---
v2:
-Modify the patch subject
-Update the commit message
-Add macro definitions of SPI_CS_WORD and SPI_3WIRE_HIZ
include/uapi/linux/spi/spidev.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/uapi/linux/spi/spidev.h b/include/uapi/linux/spi/spidev.h
index ee0f246..9390615 100644
--- a/include/uapi/linux/spi/spidev.h
+++ b/include/uapi/linux/spi/spidev.h
@@ -48,6 +48,10 @@
#define SPI_TX_QUAD 0x200
#define SPI_RX_DUAL 0x400
#define SPI_RX_QUAD 0x800
+#define SPI_CS_WORD 0x1000
+#define SPI_TX_OCTAL 0x2000
+#define SPI_RX_OCTAL 0x4000
+#define SPI_3WIRE_HIZ 0x8000
/*---------------------------------------------------------------------------*/
--
2.1.0
next prev parent reply other threads:[~2020-06-11 12:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 12:56 [PATCH v2 1/2] spi: tools: Make default_tx/rx and input_tx static Qing Zhang
2020-06-11 12:56 ` Qing Zhang [this message]
2020-06-11 15:29 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1591880212-13479-2-git-send-email-zhangqing@loongson.cn \
--to=zhangqing@loongson.cn \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=yangtiezhu@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).