dat.h 979 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: BSD-3-Clause */
  2. /*
  3. * Copyright (c) 2020, MIPI Alliance, Inc.
  4. *
  5. * Author: Nicolas Pitre <[email protected]>
  6. *
  7. * Common DAT related stuff
  8. */
  9. #ifndef DAT_H
  10. #define DAT_H
  11. /* Global DAT flags */
  12. #define DAT_0_I2C_DEVICE W0_BIT_(31)
  13. #define DAT_0_SIR_REJECT W0_BIT_(13)
  14. #define DAT_0_IBI_PAYLOAD W0_BIT_(12)
  15. struct hci_dat_ops {
  16. int (*init)(struct i3c_hci *hci);
  17. void (*cleanup)(struct i3c_hci *hci);
  18. int (*alloc_entry)(struct i3c_hci *hci);
  19. void (*free_entry)(struct i3c_hci *hci, unsigned int dat_idx);
  20. void (*set_dynamic_addr)(struct i3c_hci *hci, unsigned int dat_idx, u8 addr);
  21. void (*set_static_addr)(struct i3c_hci *hci, unsigned int dat_idx, u8 addr);
  22. void (*set_flags)(struct i3c_hci *hci, unsigned int dat_idx, u32 w0, u32 w1);
  23. void (*clear_flags)(struct i3c_hci *hci, unsigned int dat_idx, u32 w0, u32 w1);
  24. int (*get_index)(struct i3c_hci *hci, u8 address);
  25. };
  26. extern const struct hci_dat_ops mipi_i3c_hci_dat_v1;
  27. #endif