* Re: [PATCH] [media] adv7604: Don't shift the I2C address
[not found] <1437999700-16511-1-git-send-email-mike.looijmans@topic.nl>
@ 2015-07-27 12:45 ` Lars-Peter Clausen
0 siblings, 0 replies; only message in thread
From: Lars-Peter Clausen @ 2015-07-27 12:45 UTC (permalink / raw)
To: Mike Looijmans, Hans Verkuil, linux-media@vger.kernel.org
Cc Hans and media mailing list
On 07/27/2015 02:21 PM, Mike Looijmans wrote:
> Messages like this are rather confusing:
> adv7611 5-004c: not an adv7611 on address 0x98
> The driver shifts the I2C address left by one (0x98 = 4c << 1)
> probably to match the datasheet. But in all Linux drivers and
> software, I2C addresses are in 7-bit notation, so it's better
> to stick to that. Remove the "<<1" in a few places where it
> logs the I2C address.
>
> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Looks ok to me.
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> drivers/media/i2c/adv7604.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
> index aa396c3..b6ebb88 100644
> --- a/drivers/media/i2c/adv7604.c
> +++ b/drivers/media/i2c/adv7604.c
> @@ -2791,7 +2791,7 @@ static int adv76xx_probe(struct i2c_client *client,
> if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
> return -EIO;
> v4l_dbg(1, debug, client, "detecting adv76xx client on address 0x%x\n",
> - client->addr << 1);
> + client->addr);
>
> state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL);
> if (!state) {
> @@ -2870,7 +2870,7 @@ static int adv76xx_probe(struct i2c_client *client,
> val = adv_smbus_read_byte_data_check(client, 0xfb, false);
> if (val != 0x68) {
> v4l2_info(sd, "not an adv7604 on address 0x%x\n",
> - client->addr << 1);
> + client->addr);
> return -ENODEV;
> }
> } else {
> @@ -2878,7 +2878,7 @@ static int adv76xx_probe(struct i2c_client *client,
> | (adv_smbus_read_byte_data_check(client, 0xeb, false) << 0);
> if (val != 0x2051) {
> v4l2_info(sd, "not an adv7611 on address 0x%x\n",
> - client->addr << 1);
> + client->addr);
> return -ENODEV;
> }
> }
> @@ -2973,7 +2973,7 @@ static int adv76xx_probe(struct i2c_client *client,
> if (err)
> goto err_entity;
> v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
> - client->addr << 1, client->adapter->name);
> + client->addr, client->adapter->name);
>
> /* Request IRQ if available. */
> if (client->irq) {
>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-27 12:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1437999700-16511-1-git-send-email-mike.looijmans@topic.nl>
2015-07-27 12:45 ` [PATCH] [media] adv7604: Don't shift the I2C address Lars-Peter Clausen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).