<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
> On Tue, May 24, 2011 at 1:42 PM, Joachim Holst <<a href="mailto:jocke@holstenhof.se">jocke@holstenhof.se</a>><br>
> wrote:<br>
><br>
>><br>
</div><div class="im">>> Thanks Jocke, for your reply. As you said in your example of<br>
> board-msm7x30.c file which uses platform_add_devices, my board file<br>
> board-icnova_adb4000.c uses platform_device_register for the registration<br>
> of<br>
> all peripherals initialized under function __init ek_board_init(void). I<br>
> found that platform_add_device or platform_register_device can be used for<br>
> device registration.<br>
<br>
</div>You are quite correct. I previously failed to read your code as good as I<br>
should have :-( Sorry about that.<br>
<div class="im"><br>
><br>
> Here is board-icnova_adb4000.c <a href="http://pastebin.com/dr0QzsyQ" target="_blank">http://pastebin.com/dr0QzsyQ</a><br>
</div>> <<a href="http://pastebin.com/dr0QzsyQ%20" target="_blank">http://pastebin.com/dr0QzsyQ%20</a>>Linux#390. The functions called under<br>
<div class="im">> ek_board_init are defined under<br>
> <a href="http://lxr.linux.no/#linux+v2.6.38/arch/arm/mach-at91/at91sam9g45_devices.c" target="_blank">http://lxr.linux.no/#linux+v2.6.38/arch/arm/mach-at91/at91sam9g45_devices.c</a>.<br>
> All of them uses platform_device_register. In my case also it should work.<br>
><br>
> Still I am not sure why it is not working, any further thoughts or<br>
> suggestions?<br>
<br>
</div>First, are you sure that platform_device_register actually succeeds?<br>
<br>
The times this has happened to me, it has always been a problem with the<br>
"name" between the platform device and the platform driver.<br>
<br>
To avoid those problems, I usually use a #define for the name. That way,<br>
I'm sure that a spelling problem (which can be _really_ hard to spot) is<br>
not the problem. Also, I usually don't care about setting the .id and the<br>
.num_resources variables.<br>
<br>
Otherwise, as far as I can tell, your code should work.<br>
<br>
BRs,<br>
/Jocke!<br>
<div><div></div><div class="h5"><br></div></div></blockquote></div>Thank you for your kind suggestion.. :-) <br>