linux - Where/How should I define my SPI driver pins if I pretend to load the driver manually as a module
问题描述
I am writing here because I am having some problems understanding some key concepts regarding kernel/drivers development. First, I am going to try to describe what I want to achieve: Develop a driver that uses the SPI to communicate receiving the payload from user space (I cannot use spidev because I pretend to transparently add some info to the payload before sending it). I want to load the module manually (insmod).
The problem I am seeing: I do not know where or how to specify my interface. If I define the interface within the device tree, is it mandatory to include the compatible field? I ask this because the driver will not be included within the kernel modules as it starts up... Maybe there is not a problem with it. In the examples, I found about spi they only speak about the BUS, Chip Select... but they do not mention MISO and MOSI, so I guess these must be defined by the device tree or maybe since you specify the bus the definition of the rest of the pins is straight forward... I would like to understand this.
Thanks in advance. Best regards, Fulgo.
解决方案
推荐阅读
- sql - 使用 SQL 链接表
- performance - 在应用程序中存储图像以减少 mb 的最佳实践
- c# - 实现通过二级索引hashkey查询DynamoDb的高级方法
- javascript - 使用 JavaScript 进行客户端验证
- c# - XAML 元素在高于相机高度时消失
- python - 如何在二维布尔数组中获取相同值的子区域
- c# - 如何使用 SQLite 数据库在 C# 中填充组合框?
- android - 使用 Spotify API 的 Android 应用程序仅在调试模式下工作
- elasticsearch - ElasticSearch Filebeat 输出到现有索引
- powershell - 我可以提取哪些 Active Directory 用户被手动禁用以及哪些用户的帐户过期的报告吗?