From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755124AbcLNI7c (ORCPT ); Wed, 14 Dec 2016 03:59:32 -0500 Received: from mga14.intel.com ([192.55.52.115]:15501 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755018AbcLNI73 (ORCPT ); Wed, 14 Dec 2016 03:59:29 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,346,1477983600"; d="scan'208";a="797836791" Subject: Re: [PATCH V4] i2c: designware: fix wrong Tx/Rx FIFO for ACPI To: Tin Huynh , Andy Shevchenko References: <1481623414-19220-1-git-send-email-tnhuynh@apm.com> <1481628337.7188.63.camel@linux.intel.com> Cc: Mika Westerberg , Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Loc Ho , Thang Nguyen , Phong Vo , patches From: Jarkko Nikula Message-ID: <3ee59b87-f497-2a26-8f67-10464d55aa84@linux.intel.com> Date: Wed, 14 Dec 2016 10:59:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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