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

From: Scott Wood <[email-masked]>
Date: Thu, 20 Dec 2012 11:53:41 -0600

On 12/20/2012 02:23:55 AM, [email-masked] 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=