Questions about creating a OF platform device

Terren Chow terren.chow at gmail.com
Wed Apr 14 16:34:04 EST 2010


Dear all,
    I'm new to PPC Linux development. Recently I'm learning how to write a
Linux device driver on MPC5121 based embedded system. I'm just confused
about the OF related code in the kernel.
    I know in the Linux device driver model, a driver is attached to a
device through the bus_type methods. For example, the  platform_driver is
attached to a platform device through the register_platform_driver() method.
This method will scan over the device list in the bus, and perform probe()
method when the match() method return ok.
   My question is, in PPC Linux, there is a structure named *
of_platform_driver* which is similar to *platform_driver* and there is also
a bus_type named *of_platform_bus_type* which is similar to *
platform_bus_type*. But I can't find any information about the structure
of_platform_device. How do the kernel create the of_platform_device and
place them into the device list in the *platform_bus_type* ? I search the
Internet and I can't find any information about this.Could anyone give me
some information so that I can find out the magic behind. Thanks!

-- 
Terren.Chow
College of Informatics, SCAU
Graduate Student
Lab of Embedded System and Wireless Sensor Network
MSN: terren.chow at hotmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20100414/92a3d4ca/attachment-0001.htm>


More information about the Linuxppc-dev mailing list