Lines Matching refs:fsmbm

16 	struct fsmbm_regs *fsmbm;  member
37 if (config->fsmbm->FSMBMPF & FSMBM_BLOCK_FINISH_EVENT) { in i2c_kb1200_isr()
42 memcpy((void *)&config->fsmbm->FSMBMDAT[0], in i2c_kb1200_isr()
46 config->fsmbm->FSMBMPRTC_C += send_bytes; in i2c_kb1200_isr()
49 config->fsmbm->FSMBMPRTC_C -= 1; in i2c_kb1200_isr()
51 config->fsmbm->FSMBMPF = FSMBM_BLOCK_FINISH_EVENT; in i2c_kb1200_isr()
52 } else if (config->fsmbm->FSMBMPF & FSMBM_COMPLETE_EVENT) { in i2c_kb1200_isr()
54 if (((config->fsmbm->FSMBMSTS & FSMBM_STS_MASK) == FSMBM_SMBUS_BUSY) && in i2c_kb1200_isr()
55 ((config->fsmbm->FSMBMFRT & ___STOP) == ___NONE)) { in i2c_kb1200_isr()
61 data->err_code = config->fsmbm->FSMBMSTS & FSMBM_STS_MASK; in i2c_kb1200_isr()
64 config->fsmbm->FSMBMPF = FSMBM_COMPLETE_EVENT; in i2c_kb1200_isr()
66 data->err_code = config->fsmbm->FSMBMSTS & FSMBM_STS_MASK; in i2c_kb1200_isr()
73 memcpy((void *)&data->msg_buf[data->index], (void *)&config->fsmbm->FSMBMDAT[0], in i2c_kb1200_isr()
76 if (config->fsmbm->FSMBMPF & FSMBM_BLOCK_FINISH_EVENT) { in i2c_kb1200_isr()
83 config->fsmbm->FSMBMPRTC_C += NextLen; in i2c_kb1200_isr()
86 config->fsmbm->FSMBMPRTC_C -= 1; in i2c_kb1200_isr()
88 config->fsmbm->FSMBMPF = FSMBM_BLOCK_FINISH_EVENT; in i2c_kb1200_isr()
89 } else if (config->fsmbm->FSMBMPF & FSMBM_COMPLETE_EVENT) { in i2c_kb1200_isr()
91 if (((config->fsmbm->FSMBMSTS & FSMBM_STS_MASK) == FSMBM_SMBUS_BUSY) && in i2c_kb1200_isr()
92 ((config->fsmbm->FSMBMFRT & ___STOP) == ___NONE)) { in i2c_kb1200_isr()
98 data->err_code = config->fsmbm->FSMBMSTS & FSMBM_STS_MASK; in i2c_kb1200_isr()
101 config->fsmbm->FSMBMPF = FSMBM_COMPLETE_EVENT; in i2c_kb1200_isr()
103 data->err_code = config->fsmbm->FSMBMSTS & FSMBM_STS_MASK; in i2c_kb1200_isr()
107 config->fsmbm->FSMBMPF = (FSMBM_COMPLETE_EVENT | FSMBM_BLOCK_FINISH_EVENT); in i2c_kb1200_isr()
119 config->fsmbm->FSMBMFRT = ___STOP; in i2c_kb1200_poll_write()
122 config->fsmbm->FSMBMFRT = ___NONE; in i2c_kb1200_poll_write()
132 memcpy((void *)&config->fsmbm->FSMBMDAT[0], (void *)&data->msg_buf[data->index], in i2c_kb1200_poll_write()
137 config->fsmbm->FSMBMCMD = 0; in i2c_kb1200_poll_write()
138 config->fsmbm->FSMBMADR = (addr & ~BIT(0)) | FSMBM_WRITE; in i2c_kb1200_poll_write()
139 config->fsmbm->FSMBMPF = (FSMBM_COMPLETE_EVENT | FSMBM_BLOCK_FINISH_EVENT); in i2c_kb1200_poll_write()
142 config->fsmbm->FSMBMPRTC_C = FSMBM_BUFFER_SIZE + 1; in i2c_kb1200_poll_write()
144 config->fsmbm->FSMBMPRTC_C = send_bytes; in i2c_kb1200_poll_write()
146 config->fsmbm->FSMBMIE = (FSMBM_COMPLETE_EVENT | FSMBM_BLOCK_FINISH_EVENT); in i2c_kb1200_poll_write()
147 config->fsmbm->FSMBMPRTC_P = FLEXIBLE_PROTOCOL; in i2c_kb1200_poll_write()
154 config->fsmbm->FSMBMCFG |= FSMBM_HW_RESET; in i2c_kb1200_poll_write()
167 config->fsmbm->FSMBMFRT = ___STOP; in i2c_kb1200_poll_read()
170 config->fsmbm->FSMBMFRT = ___NONE; in i2c_kb1200_poll_read()
180 config->fsmbm->FSMBMCMD = 0; in i2c_kb1200_poll_read()
181 config->fsmbm->FSMBMADR = (addr & ~BIT(0)) | FSMBM_READ; in i2c_kb1200_poll_read()
182 config->fsmbm->FSMBMPF = (FSMBM_COMPLETE_EVENT | FSMBM_BLOCK_FINISH_EVENT); in i2c_kb1200_poll_read()
185 config->fsmbm->FSMBMPRTC_C = FSMBM_BUFFER_SIZE + 1; in i2c_kb1200_poll_read()
187 config->fsmbm->FSMBMPRTC_C = msg.len; in i2c_kb1200_poll_read()
189 config->fsmbm->FSMBMIE = (FSMBM_COMPLETE_EVENT | FSMBM_BLOCK_FINISH_EVENT); in i2c_kb1200_poll_read()
190 config->fsmbm->FSMBMPRTC_P = FLEXIBLE_PROTOCOL; in i2c_kb1200_poll_read()
197 config->fsmbm->FSMBMCFG |= FSMBM_HW_RESET; in i2c_kb1200_poll_read()
220 config->fsmbm->FSMBMCFG = (FSMBM_CLK_100K << FSMBM_CLK_POS); in i2c_kb1200_configure()
223 config->fsmbm->FSMBMCFG = (FSMBM_CLK_400K << FSMBM_CLK_POS); in i2c_kb1200_configure()
226 config->fsmbm->FSMBMCFG = (FSMBM_CLK_1M << FSMBM_CLK_POS); in i2c_kb1200_configure()
232 config->fsmbm->FSMBMPF = (FSMBM_COMPLETE_EVENT | FSMBM_BLOCK_FINISH_EVENT); in i2c_kb1200_configure()
233 config->fsmbm->FSMBMIE = (FSMBM_COMPLETE_EVENT | FSMBM_BLOCK_FINISH_EVENT); in i2c_kb1200_configure()
235 config->fsmbm->FSMBMCFG |= FSMBM_HW_RESET | FSMBM_TIMEOUT_ENABLE | FSMBM_FUNCTION_ENABLE; in i2c_kb1200_configure()
244 if ((config->fsmbm->FSMBMCFG & FSMBM_FUNCTION_ENABLE) == 0x00) { in i2c_kb1200_get_config()
245 printk("Cannot find i2c controller on 0x%p!\n", config->fsmbm); in i2c_kb1200_get_config()
249 switch ((config->fsmbm->FSMBMCFG >> FSMBM_CLK_POS) & FSMBM_CLK_MASK) { in i2c_kb1200_get_config()
313 if (config->fsmbm->FSMBMIE & config->fsmbm->FSMBMPF) { in i2c_kb1200_isr_wrap()
352 .fsmbm = (struct fsmbm_regs *)DT_INST_REG_ADDR(inst), \