Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1585653 > unrolled thread

Re: [PATCH] spi: Add spi-bits-per-word binding.

Started byMark Brown <broonie@kernel.org>
First post2017-02-21 20:20 +0100
Last post2017-02-21 20:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] spi: Add spi-bits-per-word binding. Mark Brown <broonie@kernel.org> - 2017-02-21 20:20 +0100

#1585653 — Re: [PATCH] spi: Add spi-bits-per-word binding.

FromMark Brown <broonie@kernel.org>
Date2017-02-21 20:20 +0100
SubjectRe: [PATCH] spi: Add spi-bits-per-word binding.
Message-ID<tdo8H-6Sm-51@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

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.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web