linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
To: Nguyen An Hoan <na-hoan-HEF513clHfp3+QwDJ9on6Q@public.gmane.org>
Cc: Linux-Renesas
	<linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-spi <linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Kuninori Morimoto"
	<kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>,
	"Yoshihiro Shimoda"
	<yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>,
	稲吉 <h-inayoshi-HEF513clHfp3+QwDJ9on6Q@public.gmane.org>,
	カオ・ヴァン・ドン <cv-dong-HEF513clHfp3+QwDJ9on6Q@public.gmane.org>
Subject: Re: [PATCH] spi: rspi: Add configuration for LSB/MSB
Date: Tue, 18 Feb 2020 11:56:52 +0100	[thread overview]
Message-ID: <CAMuHMdXQvjWDNh+qogw+3a4=U97rq_GPnYYJNqHiDZNPWJU4sA@mail.gmail.com> (raw)
In-Reply-To: <1554282541-8952-1-git-send-email-na-hoan-HEF513clHfp3+QwDJ9on6Q@public.gmane.org>

Hi Hoan-san,

On Wed, Apr 3, 2019 at 11:09 AM Nguyen An Hoan <na-hoan-HEF513clHfp3+QwDJ9on6Q@public.gmane.org> wrote:
> From: Hoan Nguyen An <na-hoan-HEF513clHfp3+QwDJ9on6Q@public.gmane.org>
>
> SPI controllers can support LSB or MSB depending on
> the structure of the message that Slave requires,
> Add support.
>
> Signed-off-by: Hoan Nguyen An <na-hoan-HEF513clHfp3+QwDJ9on6Q@public.gmane.org>

Thanks for your patch!

> --- a/drivers/spi/spi-rspi.c
> +++ b/drivers/spi/spi-rspi.c
> @@ -950,6 +950,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;
>
>         /* CMOS output mode and MOSI signal from previous transfer */
>         rspi->sppcr = 0;

Unfortunately this is not sufficient.  The driver should also inform the
SPI core that it supports this flag. Will fix.

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

           reply	other threads:[~2020-02-18 10:56 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1554282541-8952-1-git-send-email-na-hoan-HEF513clHfp3+QwDJ9on6Q@public.gmane.org>]

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='CAMuHMdXQvjWDNh+qogw+3a4=U97rq_GPnYYJNqHiDZNPWJU4sA@mail.gmail.com' \
    --to=geert-td1emuhucqxl1znqvxdv9g@public.gmane.org \
    --cc=cv-dong-HEF513clHfp3+QwDJ9on6Q@public.gmane.org \
    --cc=h-inayoshi-HEF513clHfp3+QwDJ9on6Q@public.gmane.org \
    --cc=kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=na-hoan-HEF513clHfp3+QwDJ9on6Q@public.gmane.org \
    --cc=yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).