Adding 'of_platform' bus support to the platform driver

2 messages, 2 authors, 2012-12-20 · open the first message on its own page

Adding 'of_platform' bus support to the platform driver

From: <hidden>
Date: 2012-12-20 08:39:02

Hello,

We are working on one of the platform drivers for our board (based on MPC83=
13ERDB). Previously, this driver was supporting platform bus but now we wan=
t to change it to support 'of=5Fplatform' bus. While supporting platform bu=
s, the platform device structure is initialised in board setup file, and pl=
atform device is registered using 'platform=5Fdevice=5Fregister=5Fsimple' c=
all.=20

Now if we want to support 'of=5Fplatform' bus, the information related to t=
he the device will be extracted from device tree in the platform driver its=
elf and we would not be required to call 'platform=5Fdevice=5Fregister=5Fsi=
mple' to register the platform device. Is this understanding correct?

Thanks and Regards,
RahulEmail Disclaimer:
  ---------------------------

This e-mail and any files transmitted with it are for the sole use of the i=
ntended recipient(s) and may contain confidential and  privileged informati=
on. Computer viruses can be transmitted via email.The recipient should chec=
k this email and any  attachments for the presence of viruses. The company =
accepts no liability for any damage caused by any virus transmitted by this=
 email.

Re: Adding 'of_platform' bus support to the platform driver

From: Scott Wood <hidden>
Date: 2012-12-20 17:53:58

On 12/20/2012 02:23:55 AM, R.Patil@mei-india.com wrote:
Hello,
=20
We are working on one of the platform drivers for our board (based on =20
MPC8313ERDB). Previously, this driver was supporting platform bus but =20
now we want to change it to support 'of_platform' bus. While =20
supporting platform bus, the platform device structure is initialised =20
in board setup file, and platform device is registered using =20
'platform_device_register_simple' call.
=20
Now if we want to support 'of_platform' bus, the information related =20
to the the device will be extracted from device tree in the platform =20
driver itself and we would not be required to call =20
'platform_device_register_simple' to register the platform device. Is =20
this understanding correct?
What kernel version are you using?  The of_platform bus doesn't exist =20
anymore.  The current way is to use a normal platform driver, and =20
supply an "of_match_table" in the driver struct.

-Scott=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help