标签:oid 修改文件 init setup register -o evm class device
修改文件:
1、板级文件/arch/arm/mach-omap2/board-am335xevm.c
static struct platform_device buzzer_device= {
.name = "buzzer",
.id = -1,
};
static void __init am335x_buzzer_init(void)
{
setup_pin_mux(buzzer_pin_mux);
platform_device_register(&buzzer_device);
}
static void __init am335x_evm_init(void)
{
...................
am335x_buzzer_init();
}
2、添加文件drivers/char/am335x_buzzer.c
修改该目录下的Makefile,添加一行:obj-y += am335x_buzzer.o
标签:oid 修改文件 init setup register -o evm class device
原文地址:http://www.cnblogs.com/xihong2014/p/6839226.html