linux驱动注册汇总

---

01)TP

file_operations:

{

1.

static struct file_operations tpd_fops =
{
//  .owner = THIS_MODULE,
    .open = tpd_misc_open,
    .release = tpd_misc_release,
    .unlocked_ioctl = tpd_unlocked_ioctl,
};

 

2.

static const struct file_operations gt_upgrade_proc_fops = {
    .write = gt91xx_config_write_proc,
    .read = gt91xx_config_read_proc
};

 

3.

static const struct file_operations ctp_version_proc_fops = {
    .write = ctp_version_write_proc,
    .read = ctp_version_read_proc
};

 

}

module_init(tpd_driver_init);
module_exit(tpd_driver_exit);

static int __init tpd_driver_init(void)
{
    GTP_INFO("MediaTek gt91xx touch panel driver init\n");
    tpd_get_dts_info();
    if (tpd_driver_add(&tpd_device_driver) < 0)
        GTP_INFO("add generic driver failed\n");

    return 0;
}

 ③

static struct tpd_driver_t tpd_device_driver = {
    .tpd_device_name = "gt9xx",
    .tpd_local_init = tpd_local_init,
    .suspend = tpd_suspend,
    .resume = tpd_resume,
};

 

 

 

 

 

 

 

 

 

 

-----

posted @ 2016-06-02 16:45  瘋耔  阅读(587)  评论(0编辑  收藏  举报
跳至侧栏