Devicetree
 help / color / mirror / Atom feed
* Question regarding usage of pdev->id and platform_data
@ 2011-02-23 17:18 Thomas Abraham
       [not found] ` <AANLkTi=AoFEQ685Pup8i7EAs=hLHip0UnhMV+ZHxVAiD-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Abraham @ 2011-02-23 17:18 UTC (permalink / raw)
  To: devicetree-discuss

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-21 14:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-23 17:18 Question regarding usage of pdev->id and platform_data Thomas Abraham
     [not found] ` <AANLkTi=AoFEQ685Pup8i7EAs=hLHip0UnhMV+ZHxVAiD-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-23 18:03   ` Grant Likely
     [not found]     ` <20110223180316.GI14597-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2011-02-24 12:13       ` Thomas Abraham
     [not found]         ` <AANLkTikKLJn60_L2r-cyiFLtQVn=WCNBTzPg6vAVwZRV-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-17 19:19           ` Grant Likely
     [not found]             ` <20110317191938.GB12824-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2011-03-21 14:10               ` Thomas Abraham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox