MODULE_DEVICE_TABLE type=of means?

Muni Sekhar munisekharrms at gmail.com
Mon Oct 3 03:09:37 EDT 2016


Hi All,

I see that following dma engine driver uses MODULE_DEVICE_TABLE with ‘type=of’.
What does ‘type=of’ means? How to trigger this driver’s probe and
remove to be called?



http://lxr.linux.no/linux+v4.8/drivers/dma/xilinx/zynqmp_dma.c



static const struct of_device_id zynqmp_dma_of_match[] = {
        { .compatible = "xlnx,zynqmp-dma-1.0", },
        {}
};

MODULE_DEVICE_TABLE(of, zynqmp_dma_of_match);

static struct platform_driver zynqmp_dma_driver = {

        .driver = {
                .name = "xilinx-zynqmp-dma",
                .of_match_table = zynqmp_dma_of_match,
        },

        .probe = zynqmp_dma_probe,
        .remove = zynqmp_dma_remove,

};

module_platform_driver(zynqmp_dma_driver);

MODULE_AUTHOR("Xilinx, Inc.");
MODULE_DESCRIPTION("Xilinx ZynqMP DMA driver");




-- 
Thanks,
Sekhar



More information about the Kernelnewbies mailing list