Lines Matching refs:cccr

50 	uint32_t cccr;  in can_mcan_exit_sleep_mode()  local
55 err = can_mcan_read_reg(dev, CAN_MCAN_CCCR, &cccr); in can_mcan_exit_sleep_mode()
60 cccr &= ~CAN_MCAN_CCCR_CSR; in can_mcan_exit_sleep_mode()
62 err = can_mcan_write_reg(dev, CAN_MCAN_CCCR, cccr); in can_mcan_exit_sleep_mode()
69 err = can_mcan_read_reg(dev, CAN_MCAN_CCCR, &cccr); in can_mcan_exit_sleep_mode()
74 while ((cccr & CAN_MCAN_CCCR_CSA) == CAN_MCAN_CCCR_CSA) { in can_mcan_exit_sleep_mode()
76 cccr |= CAN_MCAN_CCCR_CSR; in can_mcan_exit_sleep_mode()
77 err = can_mcan_write_reg(dev, CAN_MCAN_CCCR, cccr); in can_mcan_exit_sleep_mode()
86 err = can_mcan_read_reg(dev, CAN_MCAN_CCCR, &cccr); in can_mcan_exit_sleep_mode()
103 uint32_t cccr; in can_mcan_enter_init_mode() local
108 err = can_mcan_read_reg(dev, CAN_MCAN_CCCR, &cccr); in can_mcan_enter_init_mode()
113 cccr |= CAN_MCAN_CCCR_INIT; in can_mcan_enter_init_mode()
115 err = can_mcan_write_reg(dev, CAN_MCAN_CCCR, cccr); in can_mcan_enter_init_mode()
122 err = can_mcan_read_reg(dev, CAN_MCAN_CCCR, &cccr); in can_mcan_enter_init_mode()
127 while ((cccr & CAN_MCAN_CCCR_INIT) == 0U) { in can_mcan_enter_init_mode()
129 cccr &= ~CAN_MCAN_CCCR_INIT; in can_mcan_enter_init_mode()
130 err = can_mcan_write_reg(dev, CAN_MCAN_CCCR, cccr); in can_mcan_enter_init_mode()
139 err = can_mcan_read_reg(dev, CAN_MCAN_CCCR, &cccr); in can_mcan_enter_init_mode()
155 uint32_t cccr; in can_mcan_leave_init_mode() local
160 err = can_mcan_read_reg(dev, CAN_MCAN_CCCR, &cccr); in can_mcan_leave_init_mode()
165 cccr &= ~CAN_MCAN_CCCR_INIT; in can_mcan_leave_init_mode()
167 err = can_mcan_write_reg(dev, CAN_MCAN_CCCR, cccr); in can_mcan_leave_init_mode()
174 err = can_mcan_read_reg(dev, CAN_MCAN_CCCR, &cccr); in can_mcan_leave_init_mode()
179 while ((cccr & CAN_MCAN_CCCR_INIT) != 0U) { in can_mcan_leave_init_mode()
185 err = can_mcan_read_reg(dev, CAN_MCAN_CCCR, &cccr); in can_mcan_leave_init_mode()
378 uint32_t cccr; in can_mcan_set_mode() local
401 err = can_mcan_read_reg(dev, CAN_MCAN_CCCR, &cccr); in can_mcan_set_mode()
413 cccr |= CAN_MCAN_CCCR_TEST; in can_mcan_set_mode()
416 cccr &= ~CAN_MCAN_CCCR_TEST; in can_mcan_set_mode()
421 cccr |= CAN_MCAN_CCCR_MON; in can_mcan_set_mode()
423 cccr &= ~CAN_MCAN_CCCR_MON; in can_mcan_set_mode()
428 cccr |= CAN_MCAN_CCCR_FDOE | CAN_MCAN_CCCR_BRSE; in can_mcan_set_mode()
430 cccr &= ~(CAN_MCAN_CCCR_FDOE | CAN_MCAN_CCCR_BRSE); in can_mcan_set_mode()
434 err = can_mcan_write_reg(dev, CAN_MCAN_CCCR, cccr); in can_mcan_set_mode()
463 uint32_t cccr; in can_mcan_state_change_handler() local
499 err = can_mcan_read_reg(dev, CAN_MCAN_CCCR, &cccr); in can_mcan_state_change_handler()
504 cccr &= ~CAN_MCAN_CCCR_INIT; in can_mcan_state_change_handler()
506 err = can_mcan_write_reg(dev, CAN_MCAN_CCCR, cccr); in can_mcan_state_change_handler()
1255 uint32_t cccr; in can_mcan_enable_configuration_change() local
1260 err = can_mcan_read_reg(dev, CAN_MCAN_CCCR, &cccr); in can_mcan_enable_configuration_change()
1265 cccr |= CAN_MCAN_CCCR_CCE; in can_mcan_enable_configuration_change()
1267 err = can_mcan_write_reg(dev, CAN_MCAN_CCCR, cccr); in can_mcan_enable_configuration_change()