- 04 11月, 2016 1 次提交
-
-
由 Michal Vokáč 提交于
Check the input file fd instead of spidev fd. The spidev fd is supposed to be OK otherwise the transfer_file() function would not be called at all. Signed-off-by: NMichal Vokáč <vokac.m@gmail.com> Reviewed-by: NJoshua Clayton <stillcompiling@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 14 9月, 2016 1 次提交
-
-
由 Geert Uytterhoeven 提交于
Sometimes spidev_test crashes with: *** Error in `spidev_test': munmap_chunk(): invalid pointer: 0x00022020 *** Aborted or just Segmentation fault This is due to transfer_escaped_string() miscalculating the required size of the buffer by one byte, causing a buffer overflow in unescape(). Drop the bogus "+ 1" in the strlen() parameter to fix this. Note that unescape() never copies the zero-terminator of the source string, so it writes at most as many bytes as the length of the source string. Fixes: 30061915 (spi: spidev_test: Added input buffer from the terminal) Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org> # v4.5+
-
- 15 8月, 2016 1 次提交
-
-
由 Baruch Siach 提交于
spidev.h uses _IOC_SIZEBITS directly. musl libc does not provide this macro unless linux/ioctl.h is included explicitly. Fixes build failures like: In file included from .../host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/sys/ioctl.h:7:0, from .../build/spidev_test-v3.15/spidev_test.c:20: .../build/spidev_test-v3.15/spidev_test.c: In function ‘transfer’: .../build/spidev_test-v3.15/spidev_test.c:75:18: error: ‘_IOC_SIZEBITS’ undeclared (first use in this function) ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); ^ Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 09 12月, 2015 1 次提交
-
-
由 Fabio Estevam 提交于
Fix the spelling of 'output' in the error message. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 23 11月, 2015 6 次提交
-
-
由 Joshua Clayton 提交于
Signed-off-by: NJoshua Clayton <stillcompiling@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Joshua Clayton 提交于
Check the result of sscanf to verify a result was found. report and error and abort if pattern was not found. Signed-off-by: NJoshua Clayton <stillcompiling@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Joshua Clayton 提交于
For testing of larger data transfers, output unmodified data directly to a file. Signed-off-by: NJoshua Clayton <stillcompiling@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Joshua Clayton 提交于
Add input file support to facilitate testing larger data. Signed-off-by: NJoshua Clayton <stillcompiling@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Joshua Clayton 提交于
Move the input_tx code into its own small function. This cleans up some variables from main() that are used only here. While we are at it, check malloc calls instead of assuming they succeed. Signed-off-by: NJoshua Clayton <stillcompiling@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Joshua Clayton 提交于
Jon Corbet requested this code moved with the last changeset, https://lkml.org/lkml/2015/3/1/144, but the patch was not applied because it missed the Makefile. Moved spidev_test, spidev_fdx and their Makefile infrastructure. Signed-off-by: NJoshua Clayton <stillcompiling@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 17 4月, 2015 1 次提交
-
-
由 Andrew Morton 提交于
Documentation/spi/spidev_test.c:83:5: warning: no previous prototype for 'unespcape' [-Wmissing-prototypes] fix spelling too. Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 11 3月, 2015 3 次提交
-
-
由 Adrian Remonda 提交于
Signed-off-by: NAdrian Remonda <adrianremonda@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Adrian Remonda 提交于
Signed-off-by: NAdrian Remonda <adrianremonda@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Adrian Remonda 提交于
Signed-off-by: NAdrian Remonda <adrianremonda@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 27 2月, 2014 1 次提交
-
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 22 2月, 2014 1 次提交
-
-
由 Geert Uytterhoeven 提交于
commit b55f627f ("spi: new spi->mode bits") added two new command line options without adding the respective help texts. Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 30 4月, 2010 1 次提交
-
-
由 Hector Palacios 提交于
The sample application spidev_test.c is using SPI_IOC_MESSAGE ioctl to do an SPI transfer. This ioctl returns the number of bytes successfully transmitted or a negative error code upon erroneous completion. The application however is returning an error if the result of the ioclt if the return value is 1. This makes the application to fail upon 1-byte length transfers. Signed-off-by: NHector Palacios <hector.palacios@digi.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 23 9月, 2009 1 次提交
-
-
由 Ladinu Chandrasinghe 提交于
Fix up -Wmissing-prototypes in compileable userspace code, mainly under Documentation/. Signed-off-by: NLadinu Chandrasinghe <ladinu.pub@gmail.com> Signed-off-by: NTrevor Keith <tsrk@tsrk.net> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 01 7月, 2009 1 次提交
-
-
由 David Brownell 提交于
Add two new spi_device.mode bits to accomodate more protocol options, and pass them through to usermode drivers: * SPI_NO_CS ... a second 3-wire variant, where the chipselect line is removed instead of a data line; transfers are still full duplex. This obviously has STRONG protocol implications since the chipselect transitions can't be used to synchronize state transitions with the SPI master. * SPI_READY ... defines open drain signal that's pulled low to pause the clock. This defines a 5-wire variant (normal 4-wire SPI plus READY) and two 4-wire variants (READY plus each of the 3-wire flavors). Such hardware flow control can be a big win. There are ADC converters and flash chips that expose READY signals, but not many host controllers support it today. The spi_bitbang code should be changed to use SPI_NO_CS instead of its current nonportable hack. That's a mode most hardware can easily support (unlike SPI_READY). Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net> Cc: "Paulraj, Sandeep" <s-paulraj@ti.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 17 10月, 2007 1 次提交
-
-
由 WANG Cong 提交于
Constify two char pointers and a struct in Documentation/spi/spidev_test.c. Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net> Cc: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: NWANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 01 8月, 2007 1 次提交
-
-
由 Anton Vorontsov 提交于
This is a simple utility used to test SPI functionality. It could stand growing options to support using other test data patterns; this initial version only issues full duplex transfers, which rules out 3WIRE or Microwire links. Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-