How to access SPI from kernel source

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to access SPI from kernel source

2,283 次查看
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

标签 (1)
0 项奖励
回复
2 回复数

1,850 次查看
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 项奖励
回复

1,850 次查看
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 项奖励
回复