Hi again! Sorry if I answered questions You were already aware of. Was too quick to answer. :-( /Jocke! >> Dear Friends, >> >> I am having issue with registering the platform device driver for ADC. >> >> http://pastebin.com/Ym1NTkfL - Link contains the snip code of kernel >> platform device and driver registration code . >> >> I have build the driver as module. When I load the driver as module, the >> probe function is not called from the driver. Can any one suggest what >> is >> missing in the code? > > As far as I am awayre, this indicates that the platform device is missing. > somehow. Basically, the kernel doesn't know how to handle your new device. > > If you in you init function also call "t91_add_device_adc" it might work a > bit better ;-) > > For me, I usually set this up in the arch specific board file. There, I > also create device specific data which is then inserted into the driver > once it's loaded. But, that may be too much information at this time :-) > > If you take a look at arch/arm/mach-msm/board-msm7x30.c, you will find > "static struct platform_device *devices[] __initdata = {" > This array is used to set up new platform devices. The structure looks > jsut like the one you've created in the top of your code. > > Then in msm7x30_init, you will see that all platform devices that are > defined in this struct will be registered via the platform_add_devices() > function call. > > To get more information, please take a look at the struct platform_device > structure. It contains some interesting information and user available > pointers that can be used to allocate driver specific configuration data. > >> >> I tried to find and study over internet about how to create platform >> device >> driver but in vain. > > I recommend to look at a similar driver (i2c drivers basically behave the > same, and quite often, ADC devices also talk i2c), to figure out exactly > how it works. > > My knowledge of the English language and my currently available time are > sadly not sufficient to explain this in more detail :-( > > Hope this information got you started though. > > Brs, > /Jocke! > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies@xxxxxxxxxxxxxxxxx > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -- If it can't be fixed with duct-tape, it's definitely borken... _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies