
1 Dec
2014
1 Dec
'14
12:53 p.m.
Hi Simon,
On Mon, 24 Nov 2014 11:57:24 -0700 Simon Glass sjg@chromium.org wrote:
+U_BOOT_DRIVER(i2c_tegra) = {
- .name = "i2c_tegra",
- .id = UCLASS_I2C,
- .of_match = tegra_i2c_ids,
- .ofdata_to_platdata = tegra_i2c_ofdata_to_platdata,
- .probe = tegra_i2c_probe,
- .per_child_auto_alloc_size = sizeof(struct dm_i2c_chip),
I guess every i2c driver is supposed to have .per_child_auto_alloc_size = sizeof(struct dm_i2c_chip), but it it unfortunate.
Can we have it in uclass too?
If U_BOOT_DRIVER does not have .per_child_auto_alloc_size but UCLASS_DRIVER has it, use it.
If both U_BOOT_DRIVER and UCLASS_DRIVER have .per_child_auto_alloc_size, the former takes precedence.
- .child_pre_probe = tegra_i2c_child_pre_probe,
Ditto.
tegra_i2c_child_pre_probe() does not seem Tegra-specific code at all.
Best Regards Masahiro Yamada