summaryrefslogtreecommitdiff
path: root/drivers/char/ipmi/kcs_bmc_device.h
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2021-06-08 20:17:47 +0930
committerCorey Minyard <cminyard@mvista.com>2021-06-21 19:50:13 -0500
commitfaae6e391eda73a5b9870c78349064282a625bfa (patch)
treea1ce442f82c7cc0a365450cfa2278f0e18daa137 /drivers/char/ipmi/kcs_bmc_device.h
parentd7096970075ef47c9906fd241cc4939cc11ddd01 (diff)
ipmi: kcs_bmc: Split headers into device and client
Strengthen the distinction between code that abstracts the implementation of the KCS behaviours (device drivers) and code that exploits KCS behaviours (clients). Neither needs to know about the APIs required by the other, so provide separate headers. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Message-Id: <20210608104757.582199-7-andrew@aj.id.au> Reviewed-by: Zev Weiss <zweiss@equinix.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char/ipmi/kcs_bmc_device.h')
-rw-r--r--drivers/char/ipmi/kcs_bmc_device.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/char/ipmi/kcs_bmc_device.h b/drivers/char/ipmi/kcs_bmc_device.h
new file mode 100644
index 000000000000..dd8bf1307ad2
--- /dev/null
+++ b/drivers/char/ipmi/kcs_bmc_device.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/* Copyright (c) 2021, IBM Corp. */
+
+#ifndef __KCS_BMC_DEVICE_H__
+#define __KCS_BMC_DEVICE_H__
+
+#include "kcs_bmc.h"
+
+struct kcs_bmc_device_ops {
+ u8 (*io_inputb)(struct kcs_bmc *kcs_bmc, u32 reg);
+ void (*io_outputb)(struct kcs_bmc *kcs_bmc, u32 reg, u8 b);
+ void (*io_updateb)(struct kcs_bmc *kcs_bmc, u32 reg, u8 mask, u8 b);
+};
+
+irqreturn_t kcs_bmc_handle_event(struct kcs_bmc *kcs_bmc);
+int kcs_bmc_add_device(struct kcs_bmc *kcs_bmc);
+void kcs_bmc_remove_device(struct kcs_bmc *kcs_bmc);
+
+#endif