1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | static const struct of_device_id mt_spi_of_match[] = { {.compatible = "mediatek,mt6735-spi",}, {.compatible = "mediatek,mt6735m-spi",}, {.compatible = "mediatek,mt6753-spi",}, {.compatible = "mediatek,mt6797-spi",}, {}, }; MODULE_DEVICE_TABLE(of, mt_spi_of_match); struct platform_driver mt_spi_driver = { .driver = { .name = "mt-spi", .owner = THIS_MODULE, .of_match_table = mt_spi_of_match, }, .probe = mt_spi_probe, .suspend = mt_spi_suspend, .resume = mt_spi_resume, .remove = __exit_p(mt_spi_remove), }; static int __init mt_spi_init(void) { int ret; pr_debug("SPI init!\n"); ret = platform_driver_register(&mt_spi_driver); return ret; } |