On Fri, Aug 20, 2010 at 4:56 AM, Lorenzo Pieralisi <[email protected]> wrote: >> Also, (as you've brought up before) the pdev->id issue needs to be >> solved. I don't believe it is allowed to change the id field after >> the platform_device is registered. I'd rather see the id dynamically >> assigned, which generally works in the OF use-case because >> interconnections between devices are described in the tree and >> specific ids aren't really needed. However, it could be that the best >> thing to do is retrieve the system-wide unique id from the aliases >> node. >> >> ... and ditto on my comment that this will be simpler if it lives >> directly in pmu.c. :-) > > When you say "retrieve the system-wide id from the aliases node" you mean > at platform_device register time in the OF layer (ie of_device_register), > right ?
Not necessarily. Where possible, I'd rather modify the drivers to not strictly enforce a 1:1 relationship between the pdev->id, and the driver's internal enumeration. Hmmm, that was a little dense, so let me try again... In the specific case where id == -1, I'd like to driver to be able to handle it gracefully and allow the probe routine to either dynamically assign, or to deduce an appropriate enumeration value from the aliases node. I don't have an example of the implementation to show you though. We should probably discuss on IRC or have a conf call. There are a number of subtleties and details that need to be agreed on here. Cheers, g. _______________________________________________ devicetree-discuss mailing list [email protected] https://lists.ozlabs.org/listinfo/devicetree-discuss
