摘要: 1.定义board设备 1: struct spi_board_info { 2: /* the device name and module name are coupled, like platform_bus; 3: * "modalias" is normally the driver na 阅读全文
posted @ 2016-11-03 17:23 夕相待 阅读(2378) 评论(0) 推荐(0) 编辑
摘要: 一: SPI核心,就是指/drivers/spi/目录下spi.c文件中提供给其他文件的函数,首先看下spi核心的初始化函数spi_init(void)。 1: static int __init spi_init(void) 2: { 3: int status; 4: 5: buf = kmal 阅读全文
posted @ 2016-11-03 16:45 夕相待 阅读(2502) 评论(0) 推荐(0) 编辑
摘要: 一:首先在我的平台注册platform_device,保证能让spi-gpio.c能执行到probe函数。 1: struct spi_gpio_platform_data { 2: unsigned sck; 3: unsigned mosi; 4: unsigned miso; 5: 6: u16 ... 阅读全文
posted @ 2016-11-03 11:06 夕相待 阅读(7057) 评论(0) 推荐(0) 编辑