UIO driver test

anish singh anish198519851985 at gmail.com
Fri Apr 15 04:45:33 EDT 2016


On Fri, Apr 15, 2016 at 1:29 AM, Gadre Nayan <gadrenayan at gmail.com> wrote:

> Dear all,
>
> I am trying to test a dummy UIO driver to get timer interrupt events
> in Userspace.
>
> I register the UIO driver as a platform driver:
>
> static struct platform_device *uio_dummy_device;
>
> static struct device_driver uio_dummy_driver = {
>         .name           = "uio_dummy",
>         .bus            = &platform_bus_type,
>         .probe          = uio_dummy_probe,
>         .remove         = uio_dummy_remove,
>         .shutdown       = uio_dummy_shutdown,
> };
>
> /*
>  * Main initialization/remove routines
>  */
> static int __init uio_dummy_init(void)
> {
>         printk("uio_dummy_init( )\n" );
>         uio_dummy_device = platform_device_register_simple("uio_dummy", -1,
>                                                            NULL, 0);
>         if (IS_ERR(uio_dummy_device))
>                 return PTR_ERR(uio_dummy_device);
>
>         return driver_register(&uio_dummy_driver);
> }
>
> So after the driver_register() My probe should be called but it isn't.
>

yes but did you register the device in your device tree or your boot file?

>
> Why is this happening.
>
> Thanks
> Nayan
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160415/b8772d29/attachment.html 


More information about the Kernelnewbies mailing list