hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/platform/chrome/cros_ec_i2c.c
....@@ -1,17 +1,7 @@
1
-/*
2
- * ChromeOS EC multi-function device (I2C)
3
- *
4
- * Copyright (C) 2012 Google, Inc
5
- *
6
- * This software is licensed under the terms of the GNU General Public
7
- * License version 2, as published by the Free Software Foundation, and
8
- * may be copied, distributed, and modified under those terms.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- */
1
+// SPDX-License-Identifier: GPL-2.0
2
+// I2C interface for ChromeOS Embedded Controller
3
+//
4
+// Copyright (C) 2012 Google, Inc
155
166 #include <linux/acpi.h>
177 #include <linux/delay.h>
....@@ -19,12 +9,14 @@
199 #include <linux/module.h>
2010 #include <linux/i2c.h>
2111 #include <linux/interrupt.h>
22
-#include <linux/mfd/cros_ec.h>
23
-#include <linux/mfd/cros_ec_commands.h>
12
+#include <linux/platform_data/cros_ec_commands.h>
13
+#include <linux/platform_data/cros_ec_proto.h>
2414 #include <linux/platform_device.h>
2515 #include <linux/slab.h>
2616
27
-/**
17
+#include "cros_ec.h"
18
+
19
+/*
2820 * Request format for protocol v3
2921 * byte 0 0xda (EC_COMMAND_PROTOCOL_3)
3022 * byte 1-8 struct ec_host_request
....@@ -321,9 +313,7 @@
321313 {
322314 struct cros_ec_device *ec_dev = i2c_get_clientdata(client);
323315
324
- cros_ec_remove(ec_dev);
325
-
326
- return 0;
316
+ return cros_ec_unregister(ec_dev);
327317 }
328318
329319 #ifdef CONFIG_PM_SLEEP
....@@ -382,5 +372,5 @@
382372
383373 module_i2c_driver(cros_ec_driver);
384374
385
-MODULE_LICENSE("GPL");
386
-MODULE_DESCRIPTION("ChromeOS EC multi function device");
375
+MODULE_LICENSE("GPL v2");
376
+MODULE_DESCRIPTION("I2C interface for ChromeOS Embedded Controller");