ARM Linux 3.x的设备树(Device Tree)
时间:11-09
来源:互联网
点击:
- dev,structdevice_driver*drv)
- 91{
- 92conststructspi_device*spi=to_spi_device(dev);
- 93conststructspi_driver*sdrv=to_spi_driver(drv);
- 94
- 95/*AttemptanOFstylematch*/
- 96if(of_driver_match_device(dev,drv))
- 97return1;
- 98
- 99/*ThentryACPI*/
- 100if(acpi_driver_match_device(dev,drv))
- 101return1;
- 102
- 103if(sdrv->id_table)
- 104return!!spi_match_id(sdrv->id_table,spi);
- 105
- 106returnstrcmp(spi->modalias,drv->name)==0;
- 107}
- 71staticconststructspi_device_id*spi_match_id(conststructspi_device_id*id,
- 72conststructspi_device*sdev)
- 73{
- 74while(id->name[0]){
- 75if(!strcmp(sdev->modalias,id->name))
- 76returnid;
- 77id++;
- 78}
- 79returnNULL;
- 80}
ARMLinux设备 相关文章:
- ARM嵌入式Linux设备树简介及应用示例(11-21)
- ARM嵌入式LINUX设备驱动设计入门学习(11-19)
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)