Thomas Gleixner | cb849fc | 2019-06-04 10:10:52 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
Kamal Dasu | 44f95d8 | 2016-08-24 18:04:24 -0400 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2016 Broadcom |
Kamal Dasu | 44f95d8 | 2016-08-24 18:04:24 -0400 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <linux/device.h> |
| 7 | #include <linux/module.h> |
| 8 | #include <linux/platform_device.h> |
| 9 | #include <linux/of.h> |
| 10 | #include "spi-bcm-qspi.h" |
| 11 | |
| 12 | static const struct of_device_id brcmstb_qspi_of_match[] = { |
| 13 | { .compatible = "brcm,spi-brcmstb-qspi" }, |
| 14 | { .compatible = "brcm,spi-brcmstb-mspi" }, |
| 15 | {}, |
| 16 | }; |
| 17 | MODULE_DEVICE_TABLE(of, brcmstb_qspi_of_match); |
| 18 | |
| 19 | static int brcmstb_qspi_probe(struct platform_device *pdev) |
| 20 | { |
| 21 | return bcm_qspi_probe(pdev, NULL); |
| 22 | } |
| 23 | |
| 24 | static int brcmstb_qspi_remove(struct platform_device *pdev) |
| 25 | { |
| 26 | return bcm_qspi_remove(pdev); |
| 27 | } |
| 28 | |
| 29 | static struct platform_driver brcmstb_qspi_driver = { |
| 30 | .probe = brcmstb_qspi_probe, |
| 31 | .remove = brcmstb_qspi_remove, |
| 32 | .driver = { |
| 33 | .name = "brcmstb_qspi", |
| 34 | .pm = &bcm_qspi_pm_ops, |
| 35 | .of_match_table = brcmstb_qspi_of_match, |
| 36 | } |
| 37 | }; |
| 38 | module_platform_driver(brcmstb_qspi_driver); |
| 39 | |
| 40 | MODULE_LICENSE("GPL v2"); |
| 41 | MODULE_AUTHOR("Kamal Dasu"); |
| 42 | MODULE_DESCRIPTION("Broadcom SPI driver for settop SoC"); |