xref: /linux/drivers/char/ipmi/kcs_bmc_client.h (revision faae6e391eda73a5b9870c78349064282a625bfa)
1*faae6e39SAndrew Jeffery /* SPDX-License-Identifier: GPL-2.0 */
2*faae6e39SAndrew Jeffery /* Copyright (c) 2021, IBM Corp. */
3*faae6e39SAndrew Jeffery 
4*faae6e39SAndrew Jeffery #ifndef __KCS_BMC_CONSUMER_H__
5*faae6e39SAndrew Jeffery #define __KCS_BMC_CONSUMER_H__
6*faae6e39SAndrew Jeffery 
7*faae6e39SAndrew Jeffery #include <linux/irqreturn.h>
8*faae6e39SAndrew Jeffery 
9*faae6e39SAndrew Jeffery struct kcs_bmc;
10*faae6e39SAndrew Jeffery struct kcs_bmc_client_ops;
11*faae6e39SAndrew Jeffery 
12*faae6e39SAndrew Jeffery struct kcs_bmc_client {
13*faae6e39SAndrew Jeffery 	const struct kcs_bmc_client_ops *ops;
14*faae6e39SAndrew Jeffery 
15*faae6e39SAndrew Jeffery 	struct kcs_bmc *dev;
16*faae6e39SAndrew Jeffery };
17*faae6e39SAndrew Jeffery 
18*faae6e39SAndrew Jeffery struct kcs_bmc_client_ops {
19*faae6e39SAndrew Jeffery 	irqreturn_t (*event)(struct kcs_bmc_client *client);
20*faae6e39SAndrew Jeffery };
21*faae6e39SAndrew Jeffery 
22*faae6e39SAndrew Jeffery u8 kcs_bmc_read_data(struct kcs_bmc *kcs_bmc);
23*faae6e39SAndrew Jeffery void kcs_bmc_write_data(struct kcs_bmc *kcs_bmc, u8 data);
24*faae6e39SAndrew Jeffery u8 kcs_bmc_read_status(struct kcs_bmc *kcs_bmc);
25*faae6e39SAndrew Jeffery void kcs_bmc_write_status(struct kcs_bmc *kcs_bmc, u8 data);
26*faae6e39SAndrew Jeffery void kcs_bmc_update_status(struct kcs_bmc *kcs_bmc, u8 mask, u8 val);
27*faae6e39SAndrew Jeffery #endif
28