当它探测功能的Linux内核驱动程序被调用? [英] When does the probe function for a Linux kernel driver gets called?

查看:170
本文介绍了当它探测功能的Linux内核驱动程序被调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更新为Android内核驱动程序,我增加了一些的printk的调试它,则_init函数被调用,但探头的功能是没有的。 我缺少的是什么?当/探测功能是如何调用的?

I am trying to update a kernel driver for Android, I have added some printk's to debug it, the _init function is invoked, but the probe function is not. What I am missing ? When/how is the probe function invoked ?

在code,请访问:<一href="https://github.com/lamegopinto/kernel-2.6.32.27-M722HC/blob/master/drivers/power/rk2918_battery.c">https://github.com/lamegopinto/kernel-2.6.32.27-M722HC/blob/master/drivers/power/rk2918_battery.c

推荐答案

发现了一些研究之后的答案,因为,当一个平台的设备被注册,它的设备名称探测函数被调用一个平台设备配衬指定的名称设备驱动程序。

Found the answer after some research, For a "platform" device the probe function is invoked when a platform device is registered and it's device name matchs the name specified on the device driver.

更多细节在这里: <一href="http://comments.gmane.org/gmane.linux.kernel.kernelnewbies/37050">http://comments.gmane.org/gmane.linux.kernel.kernelnewbies/37050

现在我只需要弄清楚为什么设备没有被注册:\

Now I just need to figure why the device is not being registered :\

这篇关于当它探测功能的Linux内核驱动程序被调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆