From: Mark Brown <broonie@kernel.org> To: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Hoan Nguyen An <na-hoan@jinso.co.jp>, linux-renesas-soc@vger.kernel.org, linux-spi@vger.kernel.org, Mark Brown <broonie@kernel.org> Subject: Applied "spi: rspi: Add support for LSB-first word order" to the spi tree Date: Wed, 19 Feb 2020 00:11:27 +0000 [thread overview] Message-ID: <applied-20200218105810.902-3-geert+renesas@glider.be> (raw) In-Reply-To: <20200218105810.902-3-geert+renesas@glider.be> The patch spi: rspi: Add support for LSB-first word order has been applied to the spi tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From c046f8fd83a902866ba3b122e9f57ca1c7de898c Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven <geert+renesas@glider.be> Date: Tue, 18 Feb 2020 11:58:09 +0100 Subject: [PATCH] spi: rspi: Add support for LSB-first word order All RSPI variants support selecting the word order. Advertize support for LSB-first order, and act upon the flag being set. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20200218105810.902-3-geert+renesas@glider.be Signed-off-by: Mark Brown <broonie@kernel.org> --- drivers/spi/spi-rspi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index 7a1e6d524f34..aef05f2ac749 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -933,6 +933,8 @@ static int rspi_prepare_message(struct spi_controller *ctlr, rspi->spcmd |= SPCMD_CPOL; if (spi->mode & SPI_CPHA) rspi->spcmd |= SPCMD_CPHA; + if (spi->mode & SPI_LSB_FIRST) + rspi->spcmd |= SPCMD_LSBF; /* Configure slave signal to assert */ rspi->spcmd |= SPCMD_SSLA(spi->cs_gpiod ? rspi->ctlr->unused_native_cs @@ -1255,7 +1257,8 @@ static int rspi_probe(struct platform_device *pdev) ctlr->transfer_one = ops->transfer_one; ctlr->prepare_message = rspi_prepare_message; ctlr->unprepare_message = rspi_unprepare_message; - ctlr->mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP | ops->extra_mode_bits; + ctlr->mode_bits = SPI_CPHA | SPI_CPOL | SPI_LSB_FIRST | SPI_LOOP | + ops->extra_mode_bits; ctlr->flags = ops->flags; ctlr->dev.of_node = pdev->dev.of_node; ctlr->use_gpio_descriptors = true; -- 2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org> To: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Hoan Nguyen An <na-hoan@jinso.co.jp>, linux-renesas-soc@vger.kernel.org, linux-spi@vger.kernel.org, Mark Brown <broonie@kernel.org> Subject: Applied "spi: rspi: Add support for LSB-first word order" to the spi tree Date: Wed, 19 Feb 2020 00:11:27 +0000 [thread overview] Message-ID: <applied-20200218105810.902-3-geert+renesas@glider.be> (raw) In-Reply-To: <20200218105810.902-3-geert+renesas@glider.be> The patch spi: rspi: Add support for LSB-first word order has been applied to the spi tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From c046f8fd83a902866ba3b122e9f57ca1c7de898c Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven <geert+renesas@glider.be> Date: Tue, 18 Feb 2020 11:58:09 +0100 Subject: [PATCH] spi: rspi: Add support for LSB-first word order All RSPI variants support selecting the word order. Advertize support for LSB-first order, and act upon the flag being set. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20200218105810.902-3-geert+renesas@glider.be Signed-off-by: Mark Brown <broonie@kernel.org> --- drivers/spi/spi-rspi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index 7a1e6d524f34..aef05f2ac749 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -933,6 +933,8 @@ static int rspi_prepare_message(struct spi_controller *ctlr, rspi->spcmd |= SPCMD_CPOL; if (spi->mode & SPI_CPHA) rspi->spcmd |= SPCMD_CPHA; + if (spi->mode & SPI_LSB_FIRST) + rspi->spcmd |= SPCMD_LSBF; /* Configure slave signal to assert */ rspi->spcmd |= SPCMD_SSLA(spi->cs_gpiod ? rspi->ctlr->unused_native_cs @@ -1255,7 +1257,8 @@ static int rspi_probe(struct platform_device *pdev) ctlr->transfer_one = ops->transfer_one; ctlr->prepare_message = rspi_prepare_message; ctlr->unprepare_message = rspi_unprepare_message; - ctlr->mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP | ops->extra_mode_bits; + ctlr->mode_bits = SPI_CPHA | SPI_CPOL | SPI_LSB_FIRST | SPI_LOOP | + ops->extra_mode_bits; ctlr->flags = ops->flags; ctlr->dev.of_node = pdev->dev.of_node; ctlr->use_gpio_descriptors = true; -- 2.20.1
next prev parent reply other threads:[~2020-02-19 0:11 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-18 10:58 [PATCH 0/2] spi: rspi: Add support for configuring word order Geert Uytterhoeven 2020-02-18 10:58 ` Geert Uytterhoeven 2020-02-18 10:58 ` [PATCH 1/2] spi: rspi: Factor out handling of common mode bits Geert Uytterhoeven 2020-02-18 10:58 ` Geert Uytterhoeven 2020-02-19 0:11 ` Applied "spi: rspi: Factor out handling of common mode bits" to the spi tree Mark Brown 2020-02-19 0:11 ` Mark Brown 2020-02-18 10:58 ` [PATCH 2/2] spi: rspi: Add support for LSB-first word order Geert Uytterhoeven 2020-02-19 0:11 ` Mark Brown [this message] 2020-02-19 0:11 ` Applied "spi: rspi: Add support for LSB-first word order" to the spi tree Mark Brown
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=applied-20200218105810.902-3-geert+renesas@glider.be \ --to=broonie@kernel.org \ --cc=geert+renesas@glider.be \ --cc=linux-renesas-soc@vger.kernel.org \ --cc=linux-spi@vger.kernel.org \ --cc=na-hoan@jinso.co.jp \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.