linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: Grant Likely
	<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	Chris Boot <bootc-1Slo4GeK4H1eoWH0uzbU5w@public.gmane.org>,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] spi: add driver for BCM2835
Date: Tue, 12 Mar 2013 19:06:38 +0000	[thread overview]
Message-ID: <20130312190638.GA19942@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <5139815E.7020502-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 1007 bytes --]

On Thu, Mar 07, 2013 at 11:12:46PM -0700, Stephen Warren wrote:
> On 03/05/2013 09:05 PM, Mark Brown wrote:
> > On Tue, Mar 05, 2013 at 07:49:02PM -0700, Stephen Warren wrote:
> 
> >> +	switch (bpw) { +	case 8: +		break; +	default: +
> >> dev_err(&spi->dev, "unsupported bits_per_word=%d\n", bpw); +
> >> return -EINVAL; +	}

> Is there an assumption in the SPI core that bpw will never be >32? The
> value is stored in a u8 in the controller and transfer structs, so
> large values are physically possible. So if there is no such
> assumption, then representing all of an SPI controller's supported BPW
> in a mask/list would be a little unwieldy, so doing central checking
> might not work well.

I don't think there's such an assumption, on the other hand such
hardware is exceptionally rare so it seems sensible to at least handle
the common case - for example, allow the driver to specify a bitmask and
if no mask is specified just accept anything and let the drive worry
about it.

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

[-- Attachment #2: Type: text/plain, Size: 206 bytes --]

_______________________________________________
linux-rpi-kernel mailing list
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel

  parent reply	other threads:[~2013-03-12 19:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06  2:49 [PATCH] spi: add driver for BCM2835 Stephen Warren
     [not found] ` <1362538142-19246-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-06  4:05   ` Mark Brown
     [not found]     ` <20130306040520.GA4896-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2013-03-06  4:27       ` Stephen Warren
     [not found]         ` <5136C5AB.7020301-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-06  4:33           ` Mark Brown
2013-03-08  5:48       ` Stephen Warren
2013-03-08  6:12       ` Stephen Warren
     [not found]         ` <5139815E.7020502-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-12 19:06           ` Mark Brown [this message]
2013-03-06 10:55   ` Jonas Gorski

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=20130312190638.GA19942@opensource.wolfsonmicro.com \
    --to=broonie-yzvpicuk2aatku/dhu1wvuem+bqzidxxqq4iyu8u01e@public.gmane.org \
    --cc=bootc-1Slo4GeK4H1eoWH0uzbU5w@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    /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).