static struct class *timed_output_class;
timed_output_class = class_create(THIS_MODULE, "timed_output"); //会在sys/class/timed_output,会创建class节点。
device_create(timed_output_class, NULL, MKDEV(0, tdev->index), NULL, "%s", tdev->name); //会在这个class下面创建一个名字是tdev->name的节点,是叫vibrator,所以完整节点路径是sys/class/timed_output/vibrator
static struct timed_output_dev mtk_vibrator = {
.name = "vibrator", .get_time = vibrator_get_time, .enable = vibrator_enable,};