Linux Audio

Check our new training course

Linux kernel drivers training

May 6-19, 2025
Register
Loading...
v6.2
 1// SPDX-License-Identifier: GPL-2.0-only
 2/*
 3 * Copyright 2016 Broadcom
 
 
 
 
 
 
 
 
 
 
 
 
 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
12static const struct of_device_id brcmstb_qspi_of_match[] = {
13	{ .compatible = "brcm,spi-brcmstb-qspi" },
14	{ .compatible = "brcm,spi-brcmstb-mspi" },
15	{},
16};
17MODULE_DEVICE_TABLE(of, brcmstb_qspi_of_match);
18
19static int brcmstb_qspi_probe(struct platform_device *pdev)
20{
21	return bcm_qspi_probe(pdev, NULL);
22}
23
24static int brcmstb_qspi_remove(struct platform_device *pdev)
25{
26	bcm_qspi_remove(pdev);
27
28	return 0;
29}
30
31static struct platform_driver brcmstb_qspi_driver = {
32	.probe			= brcmstb_qspi_probe,
33	.remove			= brcmstb_qspi_remove,
34	.driver = {
35		.name		= "brcmstb_qspi",
36		.pm		= &bcm_qspi_pm_ops,
37		.of_match_table = brcmstb_qspi_of_match,
38	}
39};
40module_platform_driver(brcmstb_qspi_driver);
41
42MODULE_LICENSE("GPL v2");
43MODULE_AUTHOR("Kamal Dasu");
44MODULE_DESCRIPTION("Broadcom SPI driver for settop SoC");
v4.17
 
 1/*
 2 * Copyright 2016 Broadcom
 3 *
 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").
 7 *
 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.
12 *
13 * You should have received a copy of the GNU General Public License
14 * version 2 (GPLv2) along with this source code.
15 */
16
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"
22
23static const struct of_device_id brcmstb_qspi_of_match[] = {
24	{ .compatible = "brcm,spi-brcmstb-qspi" },
25	{ .compatible = "brcm,spi-brcmstb-mspi" },
26	{},
27};
28MODULE_DEVICE_TABLE(of, brcmstb_qspi_of_match);
29
30static int brcmstb_qspi_probe(struct platform_device *pdev)
31{
32	return bcm_qspi_probe(pdev, NULL);
33}
34
35static int brcmstb_qspi_remove(struct platform_device *pdev)
36{
37	return bcm_qspi_remove(pdev);
 
 
38}
39
40static 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,
47	}
48};
49module_platform_driver(brcmstb_qspi_driver);
50
51MODULE_LICENSE("GPL v2");
52MODULE_AUTHOR("Kamal Dasu");
53MODULE_DESCRIPTION("Broadcom SPI driver for settop SoC");