linux_dsm_epyc7002/include/linux/spi
Lars-Peter Clausen 05071aa864 spi: Add a spi_w8r16be() helper
This patch adds a new spi_w8r16be() helper, which is similar to spi_w8r16()
except that it converts the read data word from big endian to native endianness
before returning it. The reason for introducing this new helper is that for SPI
slave devices it is quite common that the read 16 bit data word is in big
endian. So users of spi_w8r16() have to convert the result to native endianness
manually. A second reason is that in this case the endianness of the return
value of spi_w8r16() depends on its sign. If it is negative (i.e. a error code)
it is already in native endianness, if it is positive it is in big endian. The
sparse code checker doesn't like this kind of mixed endianness and special
annotations are necessary to keep it quiet (E.g. casting to be16 using __force).
Doing the conversion to native endianness in the helper function does not
require such annotations since we are not mixing different endiannesses in the
same variable.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 13:52:03 +01:00
..
74x164.h
ad7877.h
ad7879.h
ads7846.h Input: ads7846 - enable pendown GPIO debounce time setting 2012-11-21 13:09:56 -08:00
at73c213.h
at86rf230.h at86rf230: add irq type configuration option 2013-04-16 16:34:07 -04:00
corgi_lcd.h
ds1305.h
eeprom.h
flash.h
ifx_modem.h
l4f00242t03.h
libertas_spi.h
lms283gf05.h
max7301.h
mc33880.h
mcp23s08.h
mmc_spi.h mmc: mmc_spi: Remove platform data .get_cd() and .get_ro() callbacks 2013-08-24 23:58:06 -04:00
mxs-spi.h spi: mxs-spi: move to use generic DMA helper 2013-04-04 21:22:44 +08:00
pxa2xx_spi.h spi/pxa2xx: add support for Intel Low Power Subsystem SPI 2013-02-08 13:14:40 +00:00
rspi.h
s3c24xx.h
sh_hspi.h
sh_msiof.h
spi_bitbang.h spi/bitbang: Use core message pump 2013-07-17 18:13:01 +01:00
spi_gpio.h spi: spi-gpio: fix compilation warning on 64 bits systems 2013-01-31 18:25:44 +08:00
spi_oc_tiny.h
spi.h spi: Add a spi_w8r16be() helper 2013-10-03 13:52:03 +01:00
tdo24m.h
tle62x0.h
tsc2005.h
xilinx_spi.h spi: spi-xilinx: Add run run-time endian detection 2013-06-04 18:37:35 +01:00