summaryrefslogtreecommitdiff
path: root/include/uapi/linux/rtc.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-12-05 01:57:31 +0300
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-12-10 19:47:16 +0300
commit3b52093dc9175f48b275a02919149a2dff3a386d (patch)
tree395697973e4585e59e7ce5a665f09f6d6effcab8 /include/uapi/linux/rtc.h
parent519d63702d0e710fd02dabce1370eaa24dfb5fc8 (diff)
downloadlinux-3b52093dc9175f48b275a02919149a2dff3a386d.tar.xz
rtc: ds1343: Do not hardcode SPI mode flags
The current use of mode flags to us SPI_MODE_3 and SPI_CS_HIGH is fragile: it overwrites anything already assigned by the SPI core. Change it thusly: - Just |= the SPI_MODE_3 so we keep other flags - Assign ^= SPI_CS_HIGH since we might be active high already, and that is usually the case with GPIOs used for chip select, even if they are in practice active low. Add a comment clarifying why ^= SPI_CS_HIGH is the right choice here. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20191204225731.20306-1-linus.walleij@linaro.org Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'include/uapi/linux/rtc.h')
0 files changed, 0 insertions, 0 deletions