一.spi总线注册 这里所说的SPI核心,就是指/drivers/spi/目录下spi.c文件中提供给其他文件的函数,首先看下spi核心的初始化函数spi_init(void).程序如下: 点击(此处)折叠或打开 static int __init spi_init(void) { int status; buf = kmalloc(SPI_BUFSIZ, GFP_KERNEL); if (!buf) { status = -ENOMEM; goto err0; } status = bu
一: 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 class 6: * that will key udev/mdev to add/remove /dev nodes. Last, register 7: * the driver which mana
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 name. 4: * 5: * platform_data goes to spi_device.dev.platform_data, 6: * controller_data goes to