1 // SPDX-License-Identifier: GPL-2.0
3 * Platform driver for the Intel SCU.
5 * Copyright (C) 2019, Intel Corporation
6 * Authors: Divya Sasidharan <divya.s.sasidharan@intel.com>
7 * Mika Westerberg <mika.westerberg@linux.intel.com>
8 * Rajmohan Mani <rajmohan.mani@intel.com>
11 #include <linux/err.h>
12 #include <linux/errno.h>
13 #include <linux/ioport.h>
14 #include <linux/mod_devicetable.h>
15 #include <linux/module.h>
16 #include <linux/platform_device.h>
18 #include <asm/intel_scu_ipc.h>
20 static int intel_scu_platform_probe(struct platform_device
*pdev
)
22 struct intel_scu_ipc_data scu_data
= {};
23 struct intel_scu_ipc_dev
*scu
;
24 const struct resource
*res
;
26 scu_data
.irq
= platform_get_irq_optional(pdev
, 0);
27 res
= platform_get_resource(pdev
, IORESOURCE_MEM
, 0);
33 scu
= devm_intel_scu_ipc_register(&pdev
->dev
, &scu_data
);
37 platform_set_drvdata(pdev
, scu
);
41 static const struct acpi_device_id intel_scu_acpi_ids
[] = {
45 MODULE_DEVICE_TABLE(acpi
, intel_scu_acpi_ids
);
47 static struct platform_driver intel_scu_platform_driver
= {
48 .probe
= intel_scu_platform_probe
,
51 .acpi_match_table
= intel_scu_acpi_ids
,
54 module_platform_driver(intel_scu_platform_driver
);
56 MODULE_AUTHOR("Divya Sasidharan <divya.s.sasidharan@intel.com>");
57 MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com");
58 MODULE_AUTHOR("Rajmohan Mani <rajmohan.mani@intel.com>");
59 MODULE_DESCRIPTION("Intel SCU platform driver");
60 MODULE_LICENSE("GPL v2");