From: Boerge Struempfel <boerge.struempfel@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: boerge.struempfel@gmail.com, bstruempfel@ultratronik.de,
andy.shevchenko@gmail.com, festevam@gmail.com,
amit.kumar-mahapatra@amd.com, broonie@kernel.org,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
NXP Linux Team <linux-imx@nxp.com>,
linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v5 0/4] spi: add SPI_MOSI_IDLE_LOW mode bit
Date: Sat, 20 May 2023 21:08:51 +0200 [thread overview]
Message-ID: <20230520190856.34720-1-boerge.struempfel@gmail.com> (raw)
Some spi controller switch the mosi line to high, whenever they are
idle. This may not be desired in all use cases. For example neopixel
leds can get confused and flicker due to misinterpreting the idle state.
Therefore, we introduce a new spi-mode bit, with which the idle behaviour
can be overwritten on a per device basis.
---
Link for versions:
v1 and v2: https://lore.kernel.org/linux-spi/20230511135632.78344-1-bstruempfel@ultratronik.de/
v3: https://lore.kernel.org/linux-spi/20230517103007.26287-1-boerge.struempfel@gmail.com/T/#t
v4: https://lore.kernel.org/linux-spi/CAEktqctboF3=ykVNtPsifcmHzF6dWwoEcVh+O4H1u-R=TT6gHg@mail.gmail.com/T/#t
Changes from V4:
- Added the SPI_3WIRE_HIZ mode bit to spidev
- Added the SPI_MOSI_IDLE_LOW mode bit to the spidev_test
userspace tool and added the two other missing spi mode
bits (SPI_3WIRE_HIZ and SPI_RX_CPHA_FLIP) to it as well.
Changes from V3:
- Added missing paranthesis which caused builderrors
Changes from V2:
- Removed the device-tree binding since this should not be managed by
the DT but by the device itself.
- Replaced all occurences of spi->chip_select with the corresponding
macro spi_get_chipselect(spi,0)
Changes from V1:
- Added patch, introducing the new devicetree binding flag
- Split the generic spi part of the patch from the imx-spi specific
part
- Replaced SPI_CPOL and SPI_CPHA by the combined SPI_MODE_X_MASK bit
in the imx-spi.c modebits.
- Added the SPI_MOSI_IDLE_LOW bit to spidev
Boerge Struempfel (4):
spi: add SPI_MOSI_IDLE_LOW mode bit
spi: spi-imx: add support for SPI_MOSI_IDLE_LOW mode bit
spi: spidev: add two new spi mode bits
spi: spidev_test Add three missing spi mode bits
drivers/spi/spi-imx.c | 9 +++-
drivers/spi/spidev.c | 3 +-
include/uapi/linux/spi/spi.h | 3 +-
tools/spi/spidev_test.c | 101 ++++++++++++++++++++---------------
4 files changed, 70 insertions(+), 46 deletions(-)
--
2.25.1
next reply other threads:[~2023-05-20 19:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-20 19:08 Boerge Struempfel [this message]
2023-05-20 19:08 ` [PATCH v5 1/4] " Boerge Struempfel
2023-05-20 19:08 ` [PATCH v5 2/4] spi: spi-imx: add support for " Boerge Struempfel
2023-05-20 19:08 ` [PATCH v5 3/4] spi: spidev: add two new spi mode bits Boerge Struempfel
2023-05-20 19:08 ` [PATCH v5 4/4] spi: spidev_test Add three missing " Boerge Struempfel
2023-05-21 8:59 ` Andy Shevchenko
2023-05-21 11:35 ` Börge Strümpfel
2023-05-21 19:25 ` Andy Shevchenko
2023-05-22 7:23 ` Börge Strümpfel
2023-05-22 11:07 ` Andy Shevchenko
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=20230520190856.34720-1-boerge.struempfel@gmail.com \
--to=boerge.struempfel@gmail.com \
--cc=amit.kumar-mahapatra@amd.com \
--cc=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=bstruempfel@ultratronik.de \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/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
all inboxes | Powered by JetHome®