1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* Copyright (c) 2021, IBM Corp. */ 3 4 #ifndef __KCS_BMC_DEVICE_H__ 5 #define __KCS_BMC_DEVICE_H__ 6 7 #include <linux/irqreturn.h> 8 9 #include "kcs_bmc.h" 10 11 struct kcs_bmc_device_ops { 12 void (*irq_mask_update)(struct kcs_bmc_device *kcs_bmc, u8 mask, u8 enable); 13 u8 (*io_inputb)(struct kcs_bmc_device *kcs_bmc, u32 reg); 14 void (*io_outputb)(struct kcs_bmc_device *kcs_bmc, u32 reg, u8 b); 15 void (*io_updateb)(struct kcs_bmc_device *kcs_bmc, u32 reg, u8 mask, u8 b); 16 }; 17 18 irqreturn_t kcs_bmc_handle_event(struct kcs_bmc_device *kcs_bmc); 19 int kcs_bmc_add_device(struct kcs_bmc_device *kcs_bmc); 20 void kcs_bmc_remove_device(struct kcs_bmc_device *kcs_bmc); 21 22 #endif 23