Question regarding usage of pdev->id and platform_data

Thomas Abraham thomas.abraham at linaro.org
Thu Feb 24 04:18:37 EST 2011


Hi,

I am adding support for device tree based probe for the s5pv310 serial
driver for a platform that has 4 instances of the uart port. I have
few questions on this and appreciate any help for the following
questions.

1. The driver is based on the usage of pdev->id in several parts of
the driver. But the platform_device created using the
of_platform_bus_probe function assigns -1 to pdev->id. Is the use of
pdev->id not advisable or is it okay if the driver assigns a pdev->id
value during the probe.

2. The driver uses pdev->dev.platform_data even after the probe is
complete. I read in one of the posts from Grant Likely that drivers
should not assign pdev->dev.platfrom_data. Is it okay if the driver
parse the platform data related information from the device node and
assign it to pdev->dev.platform_data.

Thanks,
Thomas.


More information about the devicetree-discuss mailing list