Merge tag 'tag-chrome-platform-for-v4.20' of git://git.kernel.org/pub/scm/linux/kerne...
[linux/fpc-iii.git] / drivers / spi / spi-brcmstb-qspi.c
blobc7df92e7cf6f5f3cd825ac789dfa6939a740c827
1 /*
2 * Copyright 2016 Broadcom
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License, version 2, as
6 * published by the Free Software Foundation (the "GPL").
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License version 2 (GPLv2) for more details.
13 * You should have received a copy of the GNU General Public License
14 * version 2 (GPLv2) along with this source code.
17 #include <linux/device.h>
18 #include <linux/module.h>
19 #include <linux/platform_device.h>
20 #include <linux/of.h>
21 #include "spi-bcm-qspi.h"
23 static const struct of_device_id brcmstb_qspi_of_match[] = {
24 { .compatible = "brcm,spi-brcmstb-qspi" },
25 { .compatible = "brcm,spi-brcmstb-mspi" },
26 {},
28 MODULE_DEVICE_TABLE(of, brcmstb_qspi_of_match);
30 static int brcmstb_qspi_probe(struct platform_device *pdev)
32 return bcm_qspi_probe(pdev, NULL);
35 static int brcmstb_qspi_remove(struct platform_device *pdev)
37 return bcm_qspi_remove(pdev);
40 static struct platform_driver brcmstb_qspi_driver = {
41 .probe = brcmstb_qspi_probe,
42 .remove = brcmstb_qspi_remove,
43 .driver = {
44 .name = "brcmstb_qspi",
45 .pm = &bcm_qspi_pm_ops,
46 .of_match_table = brcmstb_qspi_of_match,
49 module_platform_driver(brcmstb_qspi_driver);
51 MODULE_LICENSE("GPL v2");
52 MODULE_AUTHOR("Kamal Dasu");
53 MODULE_DESCRIPTION("Broadcom SPI driver for settop SoC");