随笔分类 -  linux SPI驱动

摘要:一: spidev_init注册spidev 1: static int __init spidev_init(void) 2: { 3: int status; 4: 5: /* Claim our 256 reserved device numbers. Then register a clas 阅读全文
posted @ 2016-11-04 16:28 夕相待 阅读(10762) 评论(0) 推荐(0)
摘要: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 夕相待 阅读(2432) 评论(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 夕相待 阅读(2573) 评论(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 夕相待 阅读(7333) 评论(0) 推荐(0)
摘要:一:SPI简介以及应用 SPI, Serial Perripheral Interface, 串行外围设备接口, 是 Motorola 公司推出的一种同步串行接口技术. SPI 总线在物理上是通过接在外围设备微控制器(PICmicro) 上面的微处理控制单元 (MCU) 上叫作同步串行端口(Sync 阅读全文
posted @ 2016-11-02 17:25 夕相待 阅读(1786) 评论(0) 推荐(0)
摘要:1: /* 2: * Add by xuyonghong for duotin car radio fm 3: * Copyright (C) 2016-5-24 xuyonghong@duotin.com 4: * 5: */ 6: #include <linux/init.h> 7: #incl 阅读全文
posted @ 2016-10-13 16:05 夕相待 阅读(7943) 评论(0) 推荐(0)