mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 07:06:45 +07:00
05071aa864
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> |
||
---|---|---|
.. | ||
74x164.h | ||
ad7877.h | ||
ad7879.h | ||
ads7846.h | ||
at73c213.h | ||
at86rf230.h | ||
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 | ||
mxs-spi.h | ||
pxa2xx_spi.h | ||
rspi.h | ||
s3c24xx.h | ||
sh_hspi.h | ||
sh_msiof.h | ||
spi_bitbang.h | ||
spi_gpio.h | ||
spi_oc_tiny.h | ||
spi.h | ||
tdo24m.h | ||
tle62x0.h | ||
tsc2005.h | ||
xilinx_spi.h |