From: Masahiro Yamada Date: Mon, 01 Dec 2014 20:53:20 +0900 Subject: [U-Boot] [PATCH v3 10/10] dm: i2c: tegra: Convert to driver model In-Reply-To: <1416855444-32016-11-git-send-email-sjg@chromium.org> References: <1416855444-32016-1-git-send-email-sjg@chromium.org> <1416855444-32016-11-git-send-email-sjg@chromium.org> Message-ID: <20141201205320.67CA.AA925319@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On Mon, 24 Nov 2014 11:57:24 -0700 Simon Glass 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