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