diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c index 9ed96da..fa2c0cd 100644 --- a/drivers/i2c/i2c.c +++ b/drivers/i2c/i2c.c @@ -358,6 +358,14 @@ return adap->bus_recovery_info->recover_bus(adap); } +static void i2c_info(struct device_d *dev) +{ + const struct i2c_client *client = to_i2c_client(dev); + + printf(" Address: 0x%02x\n", client->addr); + return; +} + /** * i2c_new_device - instantiate one new I2C device * @@ -396,6 +404,7 @@ free(client); return NULL; } + client->dev.info = i2c_info; return client; }