备注:学习记录所用,若有高手不吝赐教,万分感谢!
1、/sys/class/和/dev/spidevA.B设备文件的由来
1.1、/dev/spidevA.B
a、在/drivers/spi/spidev.c中注册,需要ids列表中的compatible与设备树中对应;
b、在menucongfig中使能 Device Drivers/SPI Support/User mode SPI device driver support;
c、也可以在xxx_defconfig中将CONFIG_SPI_SPIDEV使能用来代替b步骤;
1.2、目录/sys/class/spidev、/sys/class/spi_master、/sys/class/spi_slave、/sys/bus/spi都在/drivers/spi/spi.c中注册
标签:SPI,spidev,sys,spi,Linux,学无止境,class From: https://www.cnblogs.com/blog-xh/p/18201480