archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <>
To: Oleksandr Suvorov
Cc: ""
	Oleksandr Suvorov
	Marcel Ziswiler
	Igor Opanyuk
	Philippe Schenker
Subject: Re: [PATCH 2/2] spi: spidev: fix a max speed setting
Date: Thu, 20 Feb 2020 18:42:01 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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

On Thu, Feb 20, 2020 at 02:11:51PM +0000, Oleksandr Suvorov wrote:
> SPI_IOC_WR_MAX_SPEED_HZ command always sets spi->max_speed_hz
> to the initial value come from DT.

This is intentional.  It's doing a call to spi_setup() then restoring
the original value, the goal being just to run spi_setup() with the new
value - it's not really a good idea to change the maximum speed in the
first place.

> It leads to set a wrong max speed with IOCTL call.

In what way does it lead to the wrong speed being set?

> Fix the logic of a max speed assignment.

If the expectation is that the default speed should be changed for the
device this should be handled at the spidev level rather than in the

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

  parent reply	other threads:[~2020-02-20 18:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 14:11 [PATCH 0/2] trivial fixes for fsl-spi and spidev Oleksandr Suvorov
2020-02-20 14:11 ` [PATCH 2/2] spi: spidev: fix a max speed setting Oleksandr Suvorov
     [not found]   ` <>
2020-02-20 18:42     ` Mark Brown [this message]
     [not found]       ` <>
2020-02-21 12:43         ` Oleksandr Suvorov
     [not found] ` <>
2020-02-20 14:11   ` [PATCH 1/2] spi: fsl-lpspi: remove unneeded array Oleksandr Suvorov
     [not found]     ` <>
2020-03-03 17:08       ` Applied "spi: fsl-lpspi: remove unneeded array" to the spi tree Mark Brown
2020-02-20 16:47   ` [PATCH 0/2] trivial fixes for fsl-spi and spidev 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \

* 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).