netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)"  <fixed-term.Konstantin.Buecheler@escrypt.com>
To: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: Dan Murphy <dmurphy@ti.com>
Subject: can: tcan4x5x: spi bits_per_word issue on Raspberry PI
Date: Wed, 14 Aug 2019 09:43:21 +0000	[thread overview]
Message-ID: <f1e2a3fba8604996b16e11f9405542d1@escrypt.com> (raw)

Hi all,

I am trying to use a tcan4550 together with a Raspberry PI 3 B. I am using the tcan4x5x driver from net-next. 
I always get the following error during startup.
	tcan4x5x spi0.0: Probe failed, err=-22
	tcan4x5x: probe of spi0.0 failed with error -22

I realized that this happens because the Raspberry PI does only support 8/9 bit words. https://elinux.org/index.php?title=RPi_SPI#Supported_bits_per_word
In the driver it is set to 32.
	spi->bits_per_word = 32;

Setting this to 8 does not help of course since the tcan chip expects a multiple of 32 per spi transaction. 
I don't know if this is a Raspberry Pi specific problem or if there are more devices with this hardware limitation. 

Does anyone have a workaround for that? 

If this a common issue it might be a good idea to patch the driver. I will check if I can find proper a way to do so. 

Regards, 
Konstantin 

             reply	other threads:[~2019-08-14  9:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-14  9:43 FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu) [this message]
2019-08-14 15:01 can: tcan4x5x: spi bits_per_word issue on Raspberry PI FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)
2019-08-15  8:34 ` Marc Kleine-Budde

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=f1e2a3fba8604996b16e11f9405542d1@escrypt.com \
    --to=fixed-term.konstantin.buecheler@escrypt.com \
    --cc=dmurphy@ti.com \
    --cc=linux-can@vger.kernel.org \
    --cc=netdev@vger.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).