[MinnowBoard] low-speed-spidev driver with chip select high logic is not able to load using insmod

Bhoomil Chavda bhoomil.chavda at einfochips.com
Fri Jun 10 06:43:30 UTC 2016


Hi,

I didn't find any kind of material related to low-speed-spidev.c driver over Google.

I have one question.


I wanna make my Minnowboard MAX SPI CS pin as active high to support one of my sensor.

For the ultimate solution I use SPI_CS_HIGH from the user space test application.

But on the logic analyzer I didn't see any kind of signal level change.


Now If we look at driver side the low-speed-spidev have user defined macros in the source code.

I was just change the two things and here is the diff for the same.


--------------------------------------------------------------------------------------------------------------------------------------

@@ -25,12 +25,12 @@
         #error SPI_SPIDEV is required.
 #endif

 /* Change these values to what your board uses. */
 #define LOW_SPEED_SPIDEV_SPI_BUS 0
-#define LOW_SPEED_SPIDEV_SPI_CS 0
-#define LOW_SPEED_SPIDEV_MAX_CLK_HZ 1000000
+#define LOW_SPEED_SPIDEV_SPI_CS 1
+#define LOW_SPEED_SPIDEV_MAX_CLK_HZ 10000000

 static struct spi_board_info cal_spi_board_info __initdata = {
  .modalias = "spidev",
  .bus_num = LOW_SPEED_SPIDEV_SPI_BUS,
  .chip_select = LOW_SPEED_SPIDEV_SPI_CS,

--------------------------------------------------------------------------------------------------------------------------------------

By doing this changes , I'm able to  build module but insertion is fail

insmod: ERROR: could not insert module low-speed-spidev.ko: No such device

How to make CS pin as active high in case of Minnowboard MAX. Rightnow I think that should I put NOT gate to invert the logic.

Please help me out here.
Thanks in advance.


Regards,

Bhoomil C.

************************************************************************************************************************************************************* eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. *************************************************************************************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.elinux.org/pipermail/elinux-minnowboard/attachments/20160610/c401b6f7/attachment.html>


More information about the elinux-MinnowBoard mailing list