Skip to content
Commit 2629fc56 authored by Yuval Peress's avatar Yuval Peress Committed by Christopher Friedt
Browse files

emul: Add data and parent pointers to emulators



Emulators are difficult to work with, they generally require maintaining
some state in a mutable data struct. Since the emulator struct doesn't
support a data field like devices do, the pattern seems to be to add it
to the configuration. This makes following the logic of where things are
difficult.

1. Add a `struct emul *parent` structure to the espi/i2c/spi emulator
   structs to make it easier when casting up.
2. Add a `void *data` field to `struct emul` to hold the data for
   emulators.

Signed-off-by: default avatarYuval Peress <peress@chromium.org>
parent 512dab52
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment