All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pratyush Yadav <ptyadav@amazon.de>
To: Dhruva Gole <d-gole@ti.com>
Cc: Jagan Teki <jagan@amarulasolutions.com>, <u-boot@lists.denx.de>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	Vaishnav Achath <vaishnav.a@ti.com>,
	"Pratyush Yadav" <pratyush@kernel.org>
Subject: Re: [PATCH] spi: spi-mem: s/dummy/data buswidth check in dtr_supports_op()
Date: Mon, 27 Feb 2023 11:22:50 +0100	[thread overview]
Message-ID: <mafs04jr7flvp.fsf@amazon.de> (raw)
In-Reply-To: <20230220054231.74367-1-d-gole@ti.com> (Dhruva Gole's message of "Mon, 20 Feb 2023 11:12:31 +0530")

On Mon, Feb 20 2023, Dhruva Gole wrote:

> This should have been op->data.buswidth instead as we check for octal
> bus width for the data related ops
> Also add explanation for why there is checks for 8D even data bytes
>
> Cc: Pratyush Yadav <pratyush@kernel.org>
> Signed-off-by: Dhruva Gole <d-gole@ti.com>

Reviewed-by: Pratyush Yadav <ptyadav@amazon.de>

> ---
>
> Address Pratyush Yadav's comments from here:
> https://lore.kernel.org/u-boot/20221106224617.2ievqx37mcvqntdr@yadavpratyush.com/
>
>  drivers/spi/spi-mem.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
> index 8e8995fc537f..57a36f31a5d3 100644
> --- a/drivers/spi/spi-mem.c
> +++ b/drivers/spi/spi-mem.c
> @@ -181,8 +181,12 @@ bool spi_mem_dtr_supports_op(struct spi_slave *slave,
>         if (op->dummy.nbytes && op->dummy.buswidth == 8 && op->dummy.nbytes % 2)
>                 return false;
>
> +       /*
> +        * Transactions of odd length do not make sense for 8D-8D-8D mode
> +        * because a byte is transferred in just half a cycle.
> +        */
>         if (op->data.dir != SPI_MEM_NO_DATA &&
> -           op->dummy.buswidth == 8 && op->data.nbytes % 2)
> +           op->data.buswidth == 8 && op->data.nbytes % 2)
>                 return false;
>
>         return spi_mem_check_buswidth(slave, op);
> --
> 2.25.1
>

-- 
Regards,
Pratyush Yadav



Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879




      reply	other threads:[~2023-02-27 13:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20  5:42 [PATCH] spi: spi-mem: s/dummy/data buswidth check in dtr_supports_op() Dhruva Gole
2023-02-27 10:22 ` Pratyush Yadav [this message]

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=mafs04jr7flvp.fsf@amazon.de \
    --to=ptyadav@amazon.de \
    --cc=d-gole@ti.com \
    --cc=jagan@amarulasolutions.com \
    --cc=pratyush@kernel.org \
    --cc=u-boot@lists.denx.de \
    --cc=vaishnav.a@ti.com \
    --cc=vigneshr@ti.com \
    /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 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.