diff options
author | Tom Rini <trini@konsulko.com> | 2021-01-11 13:55:03 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-11 13:55:03 -0500 |
commit | d71be1990218957b9f05dbf13a72859a2abe06d7 (patch) | |
tree | 99858dc9988f7f7b4c0ab1d8d45738e3abdf38c8 /drivers/i2c/i2c-emul-uclass.c | |
parent | c4fddedc48f336eabc4ce3f74940e6aa372de18c (diff) | |
parent | bc0b99bd8b19599f670f42401de655fa9b44cd94 (diff) |
Merge branch 'next'
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/i2c/i2c-emul-uclass.c')
-rw-r--r-- | drivers/i2c/i2c-emul-uclass.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/i2c/i2c-emul-uclass.c b/drivers/i2c/i2c-emul-uclass.c index 84b6a219d1..085b824e89 100644 --- a/drivers/i2c/i2c-emul-uclass.c +++ b/drivers/i2c/i2c-emul-uclass.c @@ -14,7 +14,7 @@ * i2c emulation works using an 'emul' node at the bus level. Each device in * that node is in the UCLASS_I2C_EMUL uclass, and emulates one i2c device. A * pointer to the device it emulates is in the 'dev' property of the emul device - * uclass platdata (struct i2c_emul_platdata), put there by i2c_emul_find(). + * uclass plat (struct i2c_emul_plat), put there by i2c_emul_find(). * When sandbox wants an emulator for a device, it calls i2c_emul_find() which * searches for the emulator with the correct address. To find the device for an * emulator, call i2c_emul_get_device(). @@ -24,27 +24,27 @@ */ /** - * struct i2c_emul_uc_platdata - information about the emulator for this device + * struct i2c_emul_uc_plat - information about the emulator for this device * * This is used by devices in UCLASS_I2C_EMUL to record information about the - * device being emulated. It is accessible with dev_get_uclass_platdata() + * device being emulated. It is accessible with dev_get_uclass_plat() * * @dev: Device being emulated */ -struct i2c_emul_uc_platdata { +struct i2c_emul_uc_plat { struct udevice *dev; }; struct udevice *i2c_emul_get_device(struct udevice *emul) { - struct i2c_emul_uc_platdata *uc_plat = dev_get_uclass_platdata(emul); + struct i2c_emul_uc_plat *uc_plat = dev_get_uclass_plat(emul); return uc_plat->dev; } int i2c_emul_find(struct udevice *dev, struct udevice **emulp) { - struct i2c_emul_uc_platdata *uc_plat; + struct i2c_emul_uc_plat *uc_plat; struct udevice *emul; int ret; @@ -54,7 +54,7 @@ int i2c_emul_find(struct udevice *dev, struct udevice **emulp) log_err("No emulators for device '%s'\n", dev->name); return ret; } - uc_plat = dev_get_uclass_platdata(emul); + uc_plat = dev_get_uclass_plat(emul); uc_plat->dev = dev; *emulp = emul; @@ -64,14 +64,13 @@ int i2c_emul_find(struct udevice *dev, struct udevice **emulp) UCLASS_DRIVER(i2c_emul) = { .id = UCLASS_I2C_EMUL, .name = "i2c_emul", - .per_device_platdata_auto_alloc_size = - sizeof(struct i2c_emul_uc_platdata), + .per_device_plat_auto = sizeof(struct i2c_emul_uc_plat), }; /* - * This uclass is a child of the i2c bus. Its platdata is not defined here so + * This uclass is a child of the i2c bus. Its plat is not defined here so * is defined by its parent, UCLASS_I2C, which uses struct dm_i2c_chip. See - * per_child_platdata_auto_alloc_size in UCLASS_DRIVER(i2c). + * per_child_plat_auto in UCLASS_DRIVER(i2c). */ UCLASS_DRIVER(i2c_emul_parent) = { .id = UCLASS_I2C_EMUL_PARENT, |