From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Tin Huynh <tnhuynh@apm.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
Wolfram Sang <wsa@the-dreams.de>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org, Loc Ho <lho@apm.com>,
Thang Nguyen <tqnguyen@apm.com>, Phong Vo <pvo@apm.com>,
patches <patches@apm.com>
Subject: Re: [PATCH V4] i2c: designware: fix wrong Tx/Rx FIFO for ACPI
Date: Wed, 14 Dec 2016 10:59:08 +0200 [thread overview]
Message-ID: <3ee59b87-f497-2a26-8f67-10464d55aa84@linux.intel.com> (raw)
In-Reply-To: <CANQ9TuCuxsMKzfQ=14ppo-5kWnWXc=VK08ca7+dJL2xG_tkd_Q@mail.gmail.com>
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
prev parent reply other threads:[~2016-12-14 8:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 10:03 [PATCH V4] i2c: designware: fix wrong Tx/Rx FIFO for ACPI Tin Huynh
2016-12-13 11:25 ` Andy Shevchenko
2016-12-13 13:35 ` Jarkko Nikula
2016-12-14 3:20 ` Tin Huynh
2016-12-14 8:59 ` Jarkko Nikula [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ee59b87-f497-2a26-8f67-10464d55aa84@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=lho@apm.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=patches@apm.com \
--cc=pvo@apm.com \
--cc=tnhuynh@apm.com \
--cc=tqnguyen@apm.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).