Commit f7b96a9f authored by Fabio Estevam's avatar Fabio Estevam Committed by Mauro Carvalho Chehab

media: i2c: adv7180: Print the chip ID on probe

Improve the probe message by printing the chip ID version.
Signed-off-by: default avatarFabio Estevam <festevam@gmail.com>
Reviewed-by: default avatarFrieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent abb7c7c2
......@@ -1415,11 +1415,19 @@ static int adv7180_probe(struct i2c_client *client,
if (ret)
goto err_free_irq;
v4l_info(client, "chip found @ 0x%02x (%s)\n",
client->addr, client->adapter->name);
mutex_lock(&state->mutex);
ret = adv7180_read(state, ADV7180_REG_IDENT);
mutex_unlock(&state->mutex);
if (ret < 0)
goto err_v4l2_async_unregister;
v4l_info(client, "chip id 0x%x found @ 0x%02x (%s)\n",
ret, client->addr, client->adapter->name);
return 0;
err_v4l2_async_unregister:
v4l2_async_unregister_subdev(sd);
err_free_irq:
if (state->irq > 0)
free_irq(client->irq, state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment