This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

spi - opcode and data length is different

Guru 20755 points

Hello,

It seems that linux spi, requires that word length shell be constant in specific spi driver.

But some protocols requires that opcode shall be 8 words and data shall be 9 words, and other variations.

I can't see how linux spi driver support this capability.

  1. spi->bits_per_word = 9;
  2. spi_setup(spi);
  3. chip = kzalloc(sizeof *chip, GFP_KERNEL);
  4. dev_set_drvdata(&spi->dev, chip);

Any idea how we can use such protocols where the opcode and data word length is different ?

for example see page 36 in ilitek9341, where opcode is 9 length, while data is 8 length.

Thank you!

Ran