Accessing IMX6 spi in kernel space

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Accessing IMX6 spi in kernel space

1,109 Views
kiruthikavarada
Contributor III

Hi All,

  Currently IMX6 spi master is working with spidev driver and user application.

  How can I access the driver in kernel space itself?? I want to send some commands for system halt through SPI.

  Where can I obtain spi_device pointer?? Can I use  to_spi_device(dev) with dev information from platform_data.

  Suggest me the way to get spi_device pointer in kernel.

Thanks,

0 Kudos
1 Reply

554 Views
igorpadykov
NXP Employee
NXP Employee

Hi kiruthika

to access in kernel space one can write kernel test application (driver),

as for example described below

Making an Embedded Linux Kernel Device Driver | Tuomas Nylund

Best regards

igor

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

Note: If this post answers your question, please click the Correct Answer button. Thank you!

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

0 Kudos