How to access SPI from kernel source

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to access SPI from kernel source

2,302件の閲覧回数
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,869件の閲覧回数
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,869件の閲覧回数
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 件の賞賛
返信