linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Boris Brezillon <boris.brezillon@bootlin.com>
Cc: masonccyang@mxic.com.tw, tpiepho@impinj.com,
	linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
	juliensu@mxic.com.tw, zhengxunli@mxic.com.tw
Subject: Re: [PATCH v4 1/2] spi: Add MXIC controller driver
Date: Mon, 8 Oct 2018 14:37:52 +0100	[thread overview]
Message-ID: <20181008133752.GF5684@sirena.org.uk> (raw)
In-Reply-To: <20181008103812.106389c1@bbrezillon>

[-- Attachment #1: Type: text/plain, Size: 552 bytes --]

On Mon, Oct 08, 2018 at 10:38:12AM +0200, Boris Brezillon wrote:

> This is wrong, ->cur_speed_hz should be updated in
> mxic_prepare_transfer_hardware() or mxic_spi_clk_check(), not when
> ->setup() is called. Also, you seem to ignore the xfer->speed_hz value,
> which might be different from spi->max_speed_hz. Maybe the
> ->prepare_transfer() hook is not the right place to do this
> ->cur_speed_hz selection in the end.

xfer->speed_hz should always be filled in so it's the only one you need
to pay attention to (as the code Boris proposed does).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-10-08 13:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08  2:25 [PATCH v4 0/2] spi: Add Macronix controller driver masonccyang
2018-10-08  2:25 ` [PATCH v4 1/2] spi: Add MXIC " masonccyang
2018-10-08  8:38   ` Boris Brezillon
2018-10-08 13:37     ` Mark Brown [this message]
2018-10-08  2:25 ` [PATCH v4 2/2] dt-bindings: spi: Document Macronix controller bindings masonccyang

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=20181008133752.GF5684@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=boris.brezillon@bootlin.com \
    --cc=juliensu@mxic.com.tw \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=masonccyang@mxic.com.tw \
    --cc=tpiepho@impinj.com \
    --cc=zhengxunli@mxic.com.tw \
    /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).