[U-Boot] [PATCH v5 04/11] dm: i2c: Add a sandbox I2C driver

Masahiro Yamada yamada.m at jp.panasonic.com
Wed Dec 10 14:33:06 CET 2014


Simon,

I forgot to mention a minor issue.


On Fri,  5 Dec 2014 08:32:07 -0700
Simon Glass <sjg at chromium.org> wrote:


> +static int get_emul(struct udevice *bus, uint chip_addr, struct udevice **devp,
> +		    struct dm_i2c_ops **opsp)
> +{
> +	const void *blob = gd->fdt_blob;
> +	struct dm_i2c_chip *priv;
> +	struct udevice *dev;
> +	int ret;
> +
> +	*devp = NULL;
> +	*opsp = NULL;
> +	ret = i2c_get_chip(bus, chip_addr, &dev);
> +	if (ret)
> +		return ret;
> +	priv = dev_get_parentdata(dev);
> +	if (!priv->emul) {
> +		int node;
> +
> +		debug("Scanning i2c bus '%s' for devices\n", dev->name);
> +		for (node = fdt_first_subnode(blob, dev->of_offset);
> +			node >= 0;
> +			node = fdt_next_subnode(blob, node)) {


Can you fix the indent here?



Best Regards
Masahiro Yamada



More information about the U-Boot mailing list