Thread (12 messages) 12 messages, 4 authors, 2016-04-16

UIO driver test

From: Gadre Nayan <hidden>
Date: 2016-04-15 10:01:51

Hi,

I am using this on x86 machine..so no device tree...where do I have to
register elsewhere here.?
On 15 Apr 2016 2:15 p.m., "anish singh" [off-list ref] wrote:

On Fri, Apr 15, 2016 at 1:29 AM, Gadre Nayan [off-list ref] wrote:
quoted
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?
quoted
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/654096c3/attachment.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help