Re: [PATCH V4] i2c: designware: fix wrong Tx/Rx FIFO for ACPI

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

 



On 12/14/2016 05:20 AM, Tin Huynh wrote:
On Tue, Dec 13, 2016 at 6:25 PM, Andy Shevchenko
+     param = i2c_dw_read_comp_param(dev);
+     tx_fifo_depth = ((param >> 16) & 0xff) + 1;
+     rx_fifo_depth = ((param >> 8)  & 0xff) + 1;
+     if (!dev->tx_fifo_depth) {
+             dev->tx_fifo_depth = tx_fifo_depth;
+             dev->rx_fifo_depth = rx_fifo_depth;
+             dev->adapter.nr = id;
+     } else if (tx_fifo_depth > 1) {

This makes sense now, though I would add a comment here and use >= 2 to
reflect datasheet.

                /*
                 * Choose minimum values between HW and interface
                 * driver provided.
                 */

I will implement as your comment. However , because adding 1 to the
value , can i use > 2  or >=3 ?

either > 1 or >= 2 since register value 0x01 from HW means FIFO depth 2 and register value 0x00 is reserved.

--
Jarkko
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux