Lines Matching refs:hci

38 #define dat_w0_read(i)		readl(hci->DAT_regs + (i) * 8)
39 #define dat_w1_read(i) readl(hci->DAT_regs + (i) * 8 + 4)
40 #define dat_w0_write(i, v) writel(v, hci->DAT_regs + (i) * 8)
41 #define dat_w1_write(i, v) writel(v, hci->DAT_regs + (i) * 8 + 4)
52 static int hci_dat_v1_init(struct i3c_hci *hci) in hci_dat_v1_init() argument
56 if (!hci->DAT_regs) { in hci_dat_v1_init()
57 dev_err(&hci->master.dev, in hci_dat_v1_init()
61 if (hci->DAT_entry_size != 8) { in hci_dat_v1_init()
62 dev_err(&hci->master.dev, in hci_dat_v1_init()
68 hci->DAT_data = bitmap_zalloc(hci->DAT_entries, GFP_KERNEL); in hci_dat_v1_init()
69 if (!hci->DAT_data) in hci_dat_v1_init()
73 for (dat_idx = 0; dat_idx < hci->DAT_entries; dat_idx++) { in hci_dat_v1_init()
81 static void hci_dat_v1_cleanup(struct i3c_hci *hci) in hci_dat_v1_cleanup() argument
83 bitmap_free(hci->DAT_data); in hci_dat_v1_cleanup()
84 hci->DAT_data = NULL; in hci_dat_v1_cleanup()
87 static int hci_dat_v1_alloc_entry(struct i3c_hci *hci) in hci_dat_v1_alloc_entry() argument
91 dat_idx = find_first_zero_bit(hci->DAT_data, hci->DAT_entries); in hci_dat_v1_alloc_entry()
92 if (dat_idx >= hci->DAT_entries) in hci_dat_v1_alloc_entry()
94 __set_bit(dat_idx, hci->DAT_data); in hci_dat_v1_alloc_entry()
102 static void hci_dat_v1_free_entry(struct i3c_hci *hci, unsigned int dat_idx) in hci_dat_v1_free_entry() argument
106 __clear_bit(dat_idx, hci->DAT_data); in hci_dat_v1_free_entry()
109 static void hci_dat_v1_set_dynamic_addr(struct i3c_hci *hci, in hci_dat_v1_set_dynamic_addr() argument
121 static void hci_dat_v1_set_static_addr(struct i3c_hci *hci, in hci_dat_v1_set_static_addr() argument
132 static void hci_dat_v1_set_flags(struct i3c_hci *hci, unsigned int dat_idx, in hci_dat_v1_set_flags() argument
145 static void hci_dat_v1_clear_flags(struct i3c_hci *hci, unsigned int dat_idx, in hci_dat_v1_clear_flags() argument
158 static int hci_dat_v1_get_index(struct i3c_hci *hci, u8 dev_addr) in hci_dat_v1_get_index() argument
163 for (dat_idx = find_first_bit(hci->DAT_data, hci->DAT_entries); in hci_dat_v1_get_index()
164 dat_idx < hci->DAT_entries; in hci_dat_v1_get_index()
165 dat_idx = find_next_bit(hci->DAT_data, hci->DAT_entries, dat_idx)) { in hci_dat_v1_get_index()