linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ken Wilson <ken.wilson-xg7Pnmy8KxlWk0Htik3J/w@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	pawel.moll-5wv7dgnIgG8@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
	galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org,
	gerg-JBU5SbJe1FlAfugRpC6u6w@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCHv2 2/2] spi: orion: Add multiple chip select support to spi-orion
Date: Thu, 15 Jan 2015 11:07:12 +1000	[thread overview]
Message-ID: <54B712C0.5010808@opengear.com> (raw)
In-Reply-To: <20150114200626.GN3043-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>


On 15/01/15 06:06, Mark Brown wrote:
> On Mon, Jan 12, 2015 at 01:14:00PM +1000, Ken Wilson wrote:
>
>> +- num-cs     : The total number of chip selects used by this platform.
>> +		If unset, this defaults to 1.
> So, this is intended to be the number of hardware chip selects that can
> be configured but the first commit mentioned GPIOs as an option too so
> we should at least say that this is specifically the controller
> supported ones.  However...
>
>> +#define ORION_SPI_CS_MASK	0x1C
>> +#define ORION_SPI_CS_SHIFT	2
>> +#define ORION_SPI_CS(cs)	((cs << ORION_SPI_CS_SHIFT) & \
>> +					ORION_SPI_CS_MASK)
> ...given that we have a fixed bitfield here which we know and doesn't
> appear to depend on configuration do we even need this to be
> configurable - given that we're going to need an explicit node for any
> slave can't we just accept any sane chip select for a slave without
> extending the binding?
The different implementations that use this driver (Marvell Kirkwood, 
Armada 370/375) all
have a different number of supported chip selects, that fit into this 
bit mask. There are also
multiple SPI controllers on each SoC which support different numbers of 
chip selects.
For example, on the Armada 375, SPI0 supports 3 chip selects, while SPI1 
only has 1.

I agree that we could support any sane chip select for a slave, since 
the slave addresses do need
to be explicitly defined. I'm happy with whatever your preference is.

Thanks,
Ken
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-01-15  1:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-12  3:13 [PATCHv2 0/2] spi: orion: Add multiple chip select support to spi-orion Ken Wilson
2015-01-12  3:13 ` [PATCHv2 1/2] spi: orion: Change spi-orion to use transfer_one() semantics for SPI transfers Ken Wilson
     [not found]   ` <1421032440-15335-2-git-send-email-ken.wilson-xg7Pnmy8KxlWk0Htik3J/w@public.gmane.org>
2015-01-14 17:22     ` Mark Brown
2015-01-12  3:14 ` [PATCHv2 2/2] spi: orion: Add multiple chip select support to spi-orion Ken Wilson
2015-01-14 20:06   ` Mark Brown
     [not found]     ` <20150114200626.GN3043-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2015-01-15  1:07       ` Ken Wilson [this message]
2015-01-15 11:22         ` 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=54B712C0.5010808@opengear.com \
    --to=ken.wilson-xg7pnmy8kxlwk0htik3j/w@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=gerg-JBU5SbJe1FlAfugRpC6u6w@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@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).