]> Git Repo - linux.git/blob - drivers/spi/spi-intel-platform.c
Linux 6.14-rc3
[linux.git] / drivers / spi / spi-intel-platform.c
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * Intel PCH/PCU SPI flash platform driver.
4  *
5  * Copyright (C) 2016 - 2022, Intel Corporation
6  * Author: Mika Westerberg <[email protected]>
7  */
8
9 #include <linux/module.h>
10 #include <linux/platform_device.h>
11
12 #include "spi-intel.h"
13
14 static int intel_spi_platform_probe(struct platform_device *pdev)
15 {
16         struct intel_spi_boardinfo *info;
17         struct resource *mem;
18
19         info = dev_get_platdata(&pdev->dev);
20         if (!info)
21                 return -EINVAL;
22
23         mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
24         return intel_spi_probe(&pdev->dev, mem, info);
25 }
26
27 static struct platform_driver intel_spi_platform_driver = {
28         .probe = intel_spi_platform_probe,
29         .driver = {
30                 .name = "intel-spi",
31                 .dev_groups = intel_spi_groups,
32         },
33 };
34
35 module_platform_driver(intel_spi_platform_driver);
36
37 MODULE_DESCRIPTION("Intel PCH/PCU SPI flash platform driver");
38 MODULE_AUTHOR("Mika Westerberg <[email protected]>");
39 MODULE_LICENSE("GPL v2");
40 MODULE_ALIAS("platform:intel-spi");
This page took 0.033179 seconds and 4 git commands to generate.