TP 驱动中有如何:
static struct ctp_platform_ops ctp_ops = {
.get_pendown_state = ctp_get_pendown_state,
.clear_penirq = ctp_clear_penirq,
.set_irq_mode = ctp_set_irq_mode,
.set_gpio_mode = ctp_set_gpio_mode,
.judge_int_occur = ctp_judge_int_occur,
.init_platform_resource = ctp_init_platform_resource,
.free_platform_resource = ctp_free_platform_resource,
.fetch_sysconfig_para = ctp_fetch_sysconfig_para,
.ts_reset = ctp_reset,
.ts_wakeup = ctp_wakeup,
.ts_detect = ctp_detect,
};static int ctp_detect(struct i2c_client *client, struct i2c_board_info *info)
{ .....
}
.....
CTP 驱动中的 ctp_detect等是如何被内核调用到的? 是如何被android4.0调用到的?
static struct ctp_platform_ops ctp_ops = {
.get_pendown_state = ctp_get_pendown_state,
.clear_penirq = ctp_clear_penirq,
.set_irq_mode = ctp_set_irq_mode,
.set_gpio_mode = ctp_set_gpio_mode,
.judge_int_occur = ctp_judge_int_occur,
.init_platform_resource = ctp_init_platform_resource,
.free_platform_resource = ctp_free_platform_resource,
.fetch_sysconfig_para = ctp_fetch_sysconfig_para,
.ts_reset = ctp_reset,
.ts_wakeup = ctp_wakeup,
.ts_detect = ctp_detect,
};static int ctp_detect(struct i2c_client *client, struct i2c_board_info *info)
{ .....
}
.....
CTP 驱动中的 ctp_detect等是如何被内核调用到的? 是如何被android4.0调用到的?
比如 dev->ops->ts_detect(); 也就是在调用你的注册个他的ctp_detect();没看到源码,感觉这个detect类的函数应该是不会被上层调用到的。
驱动如何被内核(linux)调用我明白了, 但驱动如何被android调用呢?
android 是通过文件的形式调用驱动的?