@@ -5,15 +5,13 @@
*/
#include <linux/device.h>
+#include <linux/kcs_bmc.h>
+#include <linux/kcs_bmc_client.h>
+#include <linux/kcs_bmc_device.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/mutex.h>
-#include "kcs_bmc.h"
-
-/* Implement both the device and client interfaces here */
-#include "kcs_bmc_device.h"
-#include "kcs_bmc_client.h"
/* Record registered devices and drivers */
static DEFINE_MUTEX(kcs_bmc_lock);
@@ -10,6 +10,7 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/irq.h>
+#include <linux/kcs_bmc_device.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
@@ -21,8 +22,6 @@
#include <linux/slab.h>
#include <linux/timer.h>
-#include "kcs_bmc_device.h"
-
#define DEVICE_NAME "ast-kcs-bmc"
@@ -8,6 +8,7 @@
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/ipmi_bmc.h>
+#include <linux/kcs_bmc_client.h>
#include <linux/list.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
@@ -17,7 +18,6 @@
#include <linux/sched.h>
#include <linux/slab.h>
-#include "kcs_bmc_client.h"
/* Different phases of the KCS BMC module.
* KCS_PHASE_IDLE:
@@ -10,6 +10,7 @@
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/io.h>
+#include <linux/kcs_bmc_device.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
@@ -17,7 +18,6 @@
#include <linux/regmap.h>
#include <linux/slab.h>
-#include "kcs_bmc_device.h"
#define DEVICE_NAME "npcm-kcs-bmc"
#define KCS_CHANNEL_MAX 3
@@ -5,12 +5,12 @@
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/list.h>
+#include <linux/kcs_bmc_client.h>
#include <linux/module.h>
#include <linux/sched/signal.h>
#include <linux/serio.h>
#include <linux/slab.h>
-#include "kcs_bmc_client.h"
struct kcs_bmc_serio {
struct list_head entry;
similarity index 100%
rename from drivers/char/ipmi/kcs_bmc.h
rename to include/linux/kcs_bmc.h
similarity index 97%
rename from drivers/char/ipmi/kcs_bmc_client.h
rename to include/linux/kcs_bmc_client.h
@@ -5,8 +5,7 @@
#define __KCS_BMC_CONSUMER_H__
#include <linux/irqreturn.h>
-
-#include "kcs_bmc.h"
+#include <linux/kcs_bmc.h>
struct kcs_bmc_driver_ops {
int (*add_device)(struct kcs_bmc_device *kcs_bmc);
similarity index 96%
rename from drivers/char/ipmi/kcs_bmc_device.h
rename to include/linux/kcs_bmc_device.h
@@ -5,8 +5,7 @@
#define __KCS_BMC_DEVICE_H__
#include <linux/irqreturn.h>
-
-#include "kcs_bmc.h"
+#include <linux/kcs_bmc.h>
struct kcs_bmc_device_ops {
void (*irq_mask_update)(struct kcs_bmc_device *kcs_bmc, u8 mask, u8 enable);
The current KCS header files can be utilized by both IPMI drivers (drivers/char/ipmi) and MCTP driver (drivers/net/mctp). To be able to use them in both cases move the headers to 'include/linux' folder. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> --- drivers/char/ipmi/kcs_bmc.c | 8 +++----- drivers/char/ipmi/kcs_bmc_aspeed.c | 3 +-- drivers/char/ipmi/kcs_bmc_cdev_ipmi.c | 2 +- drivers/char/ipmi/kcs_bmc_npcm7xx.c | 2 +- drivers/char/ipmi/kcs_bmc_serio.c | 2 +- {drivers/char/ipmi => include/linux}/kcs_bmc.h | 0 {drivers/char/ipmi => include/linux}/kcs_bmc_client.h | 3 +-- {drivers/char/ipmi => include/linux}/kcs_bmc_device.h | 3 +-- 8 files changed, 9 insertions(+), 14 deletions(-) rename {drivers/char/ipmi => include/linux}/kcs_bmc.h (100%) rename {drivers/char/ipmi => include/linux}/kcs_bmc_client.h (97%) rename {drivers/char/ipmi => include/linux}/kcs_bmc_device.h (96%)