WIP FPC-III support
[linux/fpc-iii.git] / drivers / i3c / master / mipi-i3c-hci / dat.h
blob1f0f345c3daf210adee45f4f736b1547d447bafe
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3 * Copyright (c) 2020, MIPI Alliance, Inc.
5 * Author: Nicolas Pitre <npitre@baylibre.com>
7 * Common DAT related stuff
8 */
10 #ifndef DAT_H
11 #define DAT_H
13 /* Global DAT flags */
14 #define DAT_0_I2C_DEVICE W0_BIT_(31)
15 #define DAT_0_SIR_REJECT W0_BIT_(13)
16 #define DAT_0_IBI_PAYLOAD W0_BIT_(12)
18 struct hci_dat_ops {
19 int (*init)(struct i3c_hci *hci);
20 void (*cleanup)(struct i3c_hci *hci);
21 int (*alloc_entry)(struct i3c_hci *hci);
22 void (*free_entry)(struct i3c_hci *hci, unsigned int dat_idx);
23 void (*set_dynamic_addr)(struct i3c_hci *hci, unsigned int dat_idx, u8 addr);
24 void (*set_static_addr)(struct i3c_hci *hci, unsigned int dat_idx, u8 addr);
25 void (*set_flags)(struct i3c_hci *hci, unsigned int dat_idx, u32 w0, u32 w1);
26 void (*clear_flags)(struct i3c_hci *hci, unsigned int dat_idx, u32 w0, u32 w1);
27 int (*get_index)(struct i3c_hci *hci, u8 address);
30 extern const struct hci_dat_ops mipi_i3c_hci_dat_v1;
32 #endif