---
title: "Linux驱动  probe函数调用"
author: "mmdev"
date: "2011-12-21T11:34:00Z"
tags: []
slug: "linux-probe"
draft: false
lastmod: "2012-06-01T09:28:15Z"
id: 1546161
url: "https://mmdev.iteye.com/blog/1546161"
---

参考：

[http://blog.chinaunix.net/space.php?uid=15887868&do=blog&id=2758294](http://blog.chinaunix.net/space.php?uid=15887868&do=blog&id=2758294)

[http://www.cnblogs.com/hoys/archive/2011/04/01/2002299.html](http://www.cnblogs.com/hoys/archive/2011/04/01/2002299.html)  
1，driver\_register把驱动注册到总线

2，驱动注册到总线的实现函数

3，driver\_attach()

上面真正起作用的是\_\_driver\_attach：

4,really\_probe是我们真正要找的函数

打印出的驱动设备信息如：

………………

\[ 0.588087] bus: 'platform': really\_probe: bound device power.0to driverpower //总线：platform 设备：power.0 驱动：power  
\[ 0.661226] bus: 'platform': really\_probe: bound device s3c24xx-pwm.0 to driver s3c24xx-pwm  
\[ 0.678552] bus: 'platform': really\_probe: bound device s3c24xx-pwm.1 to driver s3c24xx-pwm  
\[ 0.695971] bus: 'platform': really\_probe: bound device s3c24xx-pwm.2 to driver s3c24xx-pwm  
[ 0.713389 bus: 'platform': really\_probe: bound device s3c24xx-pwm.3 to driver  
……………………