From: Mark Brown <broonie@kernel.org>
To: Adrian Fiergolski <adrian.fiergolski@cern.ch>
Cc: linux-spi@vger.kernel.org, robh+dt@kernel.org,
mark.rutland@arm.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, miguel.ojeda.sandonis@gmail.com
Subject: Re: [PATCH] spi: Add spi-bits-per-word binding.
Date: Tue, 21 Feb 2017 11:08:30 -0800 [thread overview]
Message-ID: <20170221190830.xyubgimyc2w5p5v6@sirena.org.uk> (raw)
In-Reply-To: <20170220153512.6563-1-adrian.fiergolski@cern.ch>
[-- Attachment #1: Type: text/plain, Size: 979 bytes --]
On Mon, Feb 20, 2017 at 04:35:12PM +0100, Adrian Fiergolski wrote:
> If an SPI controller doesn't support 8 bit transfers
> (master->bits_per_word_mask), it will be never registered (tested with
> spidev):
> of_register_spi_device calls spi_add_device which calls spi_setup. The last
> takes as an argument spi_device struct, which, in case of spidev, has
> bits_per_word set to 0. Thus, the spi_setup function will set it to default
> 8. Further, the same function will call __spi_validate_bits_per_word which
> will fail the whole registration for controllers not supporting 8 bit
> transfers (i.e. xilinx-spi).
This doens't make much sense, if a device driver requires a given number
of bits per word forcing a different value via device tree is not going
to result in the driver actually working. If you want to use a device
with a controller with restricted bits per word support you need to
change the device driver to support the limited capabilities of the
controller.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2017-02-21 19:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170217101151.hyzmz5a4lgdy7p5m>
2017-02-20 15:35 ` [PATCH] spi: Add spi-bits-per-word binding Adrian Fiergolski
2017-02-21 19:08 ` Mark Brown [this message]
2017-03-13 17:25 ` Adrian Fiergolski
2017-03-13 17:55 ` Mark Brown
2017-03-13 18:12 ` Adrian Fiergolski
2017-03-13 19:57 ` Geert Uytterhoeven
2017-03-13 20:26 ` Adrian Fiergolski
2017-03-17 21: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=20170221190830.xyubgimyc2w5p5v6@sirena.org.uk \
--to=broonie@kernel.org \
--cc=adrian.fiergolski@cern.ch \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=robh+dt@kernel.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).