1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Congatec Board Controller driver definitions
5 * Copyright (C) 2024 Bootlin
9 #ifndef _LINUX_MFD_CGBC_H_
12 * struct cgbc_version - Board Controller device version structure
13 * @feature: Board Controller feature number
14 * @major: Board Controller major revision
15 * @minor: Board Controller minor revision
18 unsigned char feature;
24 * struct cgbc_device_data - Internal representation of the Board Controller device
25 * @io_session: Pointer to the session IO memory
26 * @io_cmd: Pointer to the command IO memory
27 * @session: Session id returned by the Board Controller
28 * @dev: Pointer to kernel device structure
29 * @cgbc_version: Board Controller version structure
30 * @mutex: Board Controller mutex
32 struct cgbc_device_data {
33 void __iomem *io_session;
37 struct cgbc_version version;
41 int cgbc_command(struct cgbc_device_data *cgbc, void *cmd, unsigned int cmd_size,
42 void *data, unsigned int data_size, u8 *status);
44 #endif /*_LINUX_MFD_CGBC_H_*/