public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Axel Lin <axel.lin@ingics.com>
Subject: Re: [PATCH] spi: sc18is602: Don't be that restrictive with the maximum transfer speed
Date: Mon, 17 Mar 2014 11:52:56 +0000	[thread overview]
Message-ID: <20140317115256.GC11706@sirena.org.uk> (raw)
In-Reply-To: <1395020870-18107-1-git-send-email-linux@roeck-us.net>

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

On Sun, Mar 16, 2014 at 06:47:50PM -0700, Guenter Roeck wrote:
> Commit 09e99bca8 (spi: sc18is602: Convert to let spi core validate
> transfer speed) made the maximum transfer speed much more restrictive
> than before. The transfer speed used to be adjusted to 1/4 of the chip
> clock rate if a higher transfer speed was requested. Now such transfers are
> simply rejected. With default settings, this causes, for example, a transfer
> request at 2 mbps to be rejected because the maximum speed with the default
> chip clock is 1.843 mbps.

> This is unnecessarily restrictive and causes unnecessary failures. Loosen
> the limit to accept transfers up to 50% of the clock rate and adjust
> the speed as needed when setting up the actualt transfer.

Given this description I'd expect to see a change in the core not a
driver - like the other fork of the thread said I'd expect to deal with
the issue by improving the constraint handling code.

>  	master->transfer_one_message = sc18is602_transfer_one;
>  	master->dev.of_node = np;
>  	master->min_speed_hz = hw->freq / 128;
> -	master->max_speed_hz = hw->freq / 4;
> +	master->max_speed_hz = hw->freq / 2;

That said, if this is something that the hardware can support it makes
sense to do it anyway - is there an actual spec constraint available?

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2014-03-17 11:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17  1:47 [PATCH] spi: sc18is602: Don't be that restrictive with the maximum transfer speed Guenter Roeck
2014-03-17  2:07 ` Axel Lin
2014-03-17  3:53   ` Guenter Roeck
2014-03-17 11:27     ` Mark Brown
2014-03-17 11:52 ` Mark Brown [this message]
2014-03-17 13:25   ` Guenter Roeck

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=20140317115256.GC11706@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=axel.lin@ingics.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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