How to access SPI from kernel source

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

How to access SPI from kernel source

1,391 Views
lalabhaidesai
Contributor I

Hello,

 I am using IMX6UL. We have access SPI from user-space using spidev and it is working fine. Now we wants to access SPI from the kernel(from reboot.c file) to give some data to attached slaves just before the kernel power off. So please guide me how to access SPI from this place. how to initialize , configure and send/receive data through SPI from reboot.c kernel file. We are using Linux kernel 4.1.15

Regards,

Lalabhai

Labels (1)
0 Kudos
2 Replies

958 Views
lalabhaidesai
Contributor I

Hello Victor,

Thanks for your reply.

Can i use spidev driver from "reboot.c" kernel file and if yes then how? I am beginner and don't have much more knowledge in Linux so please help me.

Regards,

Lalabhai

0 Kudos

958 Views
b36401
NXP Employee
NXP Employee

To access it in kernel space you can write kernel application (kernel driver).
http://derekmolloy.ie/writing-a-linux-kernel-module-part-1-introduction/

Have a great day,
Victor

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

0 Kudos