Re: [v7,2/3] i2c: iproc: Add Broadcom iProc I2C Driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 6, 2015 at 2:48 PM, Dmitry Torokhov <dtor@xxxxxxxxxxxx> wrote:
> On Fri, Feb 6, 2015 at 2:31 PM, Kevin Cernekee <cernekee@xxxxxxxxxxxx> wrote:
>> On Mon, Jan 19, 2015 at 01:51:49PM -0800, Ray Jui wrote:
>>> +
>>> +     dev_dbg(iproc_i2c->device, "xfer %c, addr=0x%02x, len=%d\n",
>>> +             (msg->flags & I2C_M_RD) ? 'R' : 'W', msg->addr,
>>> +             msg->len);
>>> +     dev_dbg(iproc_i2c->device, "**** data start ****\n");
>>> +     for (i = 0; i < msg->len; i++)
>>> +             dev_dbg(iproc_i2c->device, "0x%02x ",  msg->buf[i]);
>>> +     dev_dbg(iproc_i2c->device, "**** data end ****\n");
>>
>> It might be simpler to just do:
>>
>>     print_hex_dump_bytes("iproc_i2c:", DUMP_PREFIX_NONE, msg->buf, msg->len);
>>
>> although you'd lose the ability to see the I2C device name.
>
> We can also do:
>
> dev_dbg(iproc_i2c->device, "*** data: %*ph\n", msg->len, msg->buf);
>
> if we are OK with limiting output to 64 bytes.

msg->len is capped at 63 due to hardware limits, so that should work.
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux