linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@impinj.com>
To: "yibin.gong@nxp.com" <yibin.gong@nxp.com>,
	"u.kleine-koenig@pengutronix.de" <u.kleine-koenig@pengutronix.de>,
	"broonie@kernel.org" <broonie@kernel.org>
Cc: "marex@denx.de" <marex@denx.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"linux-imx@nxp.com" <linux-imx@nxp.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>
Subject: Re: [PATCH v3 5/5] spi: imx: drop useless member speed_hz from driver data struct
Date: Fri, 30 Nov 2018 17:21:40 +0000	[thread overview]
Message-ID: <1543598496.18519.101.camel@impinj.com> (raw)
In-Reply-To: <20181130064709.6998-6-u.kleine-koenig@pengutronix.de>

On Fri, 2018-11-30 at 07:47 +0100, Uwe Kleine-König wrote:
> The driver data's member variable just caches the transfer's speed_hz
> member. All users of the former now have access directly to the latter.
> So fix them to use the uncached value and remove the cache.

What should have been done with this is to compare the next transfer's
speed_hz to this cached value, and not preprogram the clock if it has
not changed.  Since usually it doesn't change between transfers.

spi_bus_clk caches the actual spi bus clock, which is often not exactly
the same as the transfer speed, so using it compare against the next
transfer doesn't work as well.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2018-11-30 17:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30  6:47 [PATCH v3 0/5] spi: imx: Fix polarity switching for mx51-ecspi Uwe Kleine-König
2018-11-30  6:47 ` [PATCH v3 1/5] spi: imx: add a device specific prepare_message callback Uwe Kleine-König
2018-11-30  6:47 ` [PATCH v3 2/5] spi: imx: mx51-ecspi: Move some initialisation to prepare_message hook Uwe Kleine-König
2018-12-03  8:00   ` Robin Gong
2018-12-03  8:18     ` Uwe Kleine-König
2018-11-30  6:47 ` [PATCH v3 3/5] spi: imx: style fixes Uwe Kleine-König
2018-11-30  6:47 ` [PATCH v3 4/5] spi: imx: rename config callback and add useful parameters Uwe Kleine-König
2018-12-03  8:09   ` Robin Gong
2018-12-03  8:29     ` Uwe Kleine-König
2018-11-30  6:47 ` [PATCH v3 5/5] spi: imx: drop useless member speed_hz from driver data struct Uwe Kleine-König
2018-11-30 17:21   ` Trent Piepho [this message]
2018-11-30 17:50     ` Uwe Kleine-König
2018-11-30 18:10       ` Trent Piepho
2018-11-30 18:21         ` Uwe Kleine-König
2018-12-10 21:52 ` [PATCH v3 0/5] spi: imx: Fix polarity switching for mx51-ecspi Uwe Kleine-König
2018-12-11  1:14   ` Mark Brown
2018-12-11  7:13     ` Uwe Kleine-König
2018-12-11 11:56       ` Mark Brown
2018-12-11 20:11         ` Uwe Kleine-König
2018-12-11 20:40           ` Mark Brown
2018-12-12  9:21             ` 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=1543598496.18519.101.camel@impinj.com \
    --to=tpiepho@impinj.com \
    --cc=broonie@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-spi@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=yibin.gong@nxp.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 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).