Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: zephyrproject-rtos/zephyr
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3a51893f1a1ddeba1fd5d59425fa898d2d83ed94
Choose a base ref
..
head repository: zephyrproject-rtos/zephyr
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cc1440c7d9f1a76dca1cbfbc16ed1f06b88f13d7
Choose a head ref
Showing with 16 additions and 8 deletions.
  1. +16 −8 drivers/i2c/i2c_npcx_controller.c
24 changes: 16 additions & 8 deletions drivers/i2c/i2c_npcx_controller.c
Original file line number Diff line number Diff line change
@@ -1206,14 +1206,22 @@ static volatile uint8_t *npcx_i2c_ctrl_target_get_reg_smbaddr(const struct devic
struct smb_reg *const inst = HAL_I2C_INSTANCE(i2c_dev);

switch (index) {
case 0: return &inst->SMBADDR1;
case 1: return &inst->SMBADDR2;
case 2: return &inst->SMBADDR3;
case 3: return &inst->SMBADDR4;
case 4: return &inst->SMBADDR5;
case 5: return &inst->SMBADDR6;
case 6: return &inst->SMBADDR7;
case 7: return &inst->SMBADDR8;
case 0:
return &inst->SMBADDR1;
case 1:
return &inst->SMBADDR2;
case 2:
return &inst->SMBADDR3;
case 3:
return &inst->SMBADDR4;
case 4:
return &inst->SMBADDR5;
case 5:
return &inst->SMBADDR6;
case 6:
return &inst->SMBADDR7;
case 7:
return &inst->SMBADDR8;
default:
LOG_ERR("Invalid SMBADDR index: %d", index);
return NULL;