D | emul.c | 42 * Emulate SMBus peripheral device, connected to the bus as 46 /* List of peripheral devices registered */ 49 void emul_register_smbus_peripheral(struct smbus_peripheral *peripheral) in emul_register_smbus_peripheral() argument 51 sys_slist_prepend(&peripherals, &peripheral->node); in emul_register_smbus_peripheral() 56 struct smbus_peripheral *peripheral, *tmp; in emul_get_smbus_peripheral() local 58 SYS_SLIST_FOR_EACH_CONTAINER_SAFE(&peripherals, peripheral, tmp, node) { in emul_get_smbus_peripheral() 59 if (peripheral->addr == addr) { in emul_get_smbus_peripheral() 60 return peripheral; in emul_get_smbus_peripheral() 69 struct smbus_peripheral *peripheral, *tmp, *found = NULL; in peripheral_handle_smbalert() local 71 SYS_SLIST_FOR_EACH_CONTAINER_SAFE(&peripherals, peripheral, tmp, node) { in peripheral_handle_smbalert() [all …]
|