From: Wolfram Sang <wsa@kernel.org>
To: Raviteja Narayanam <raviteja.narayanam@xilinx.com>
Cc: linux-i2c@vger.kernel.org, michal.simek@xilinx.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, git@xilinx.com
Subject: Re: [PATCH 1/2] Revert "i2c: cadence: Fix the hold bit setting"
Date: Wed, 22 Jul 2020 12:29:00 +0200 [thread overview]
Message-ID: <20200722102859.GI1030@ninjato> (raw)
In-Reply-To: <1593784549-21489-1-git-send-email-raviteja.narayanam@xilinx.com>
[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]
On Fri, Jul 03, 2020 at 07:25:49PM +0530, Raviteja Narayanam wrote:
> This reverts commit d358def706880defa4c9e87381c5bf086a97d5f9.
>
> There are two issues with "i2c: cadence: Fix the hold bit setting" commit.
>
> 1. In case of combined message request from user space, when the HOLD
> bit is cleared in cdns_i2c_mrecv function, a STOP condition is sent
> on the bus even before the last message is started. This is because when
> the HOLD bit is cleared, the FIFOS are empty and there is no pending
> transfer. The STOP condition should occur only after the last message
> is completed.
>
> 2. The code added by the commit is redundant. Driver is handling the
> setting/clearing of HOLD bit in right way before the commit.
>
> The setting of HOLD bit based on 'bus_hold_flag' is taken care in
> cdns_i2c_master_xfer function even before cdns_i2c_msend/cdns_i2c_recv
> functions.
>
> The clearing of HOLD bit is taken care at the end of cdns_i2c_msend and
> cdns_i2c_recv functions based on bus_hold_flag and byte count.
> Since clearing of HOLD bit is done after the slave address is written to
> the register (writing to address register triggers the message transfer),
> it is ensured that STOP condition occurs at the right time after
> completion of the pending transfer (last message).
>
> Signed-off-by: Raviteja Narayanam <raviteja.narayanam@xilinx.com>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@kernel.org>
To: Raviteja Narayanam <raviteja.narayanam@xilinx.com>
Cc: git@xilinx.com, linux-kernel@vger.kernel.org,
linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
michal.simek@xilinx.com
Subject: Re: [PATCH 1/2] Revert "i2c: cadence: Fix the hold bit setting"
Date: Wed, 22 Jul 2020 12:29:00 +0200 [thread overview]
Message-ID: <20200722102859.GI1030@ninjato> (raw)
In-Reply-To: <1593784549-21489-1-git-send-email-raviteja.narayanam@xilinx.com>
[-- Attachment #1.1: Type: text/plain, Size: 1433 bytes --]
On Fri, Jul 03, 2020 at 07:25:49PM +0530, Raviteja Narayanam wrote:
> This reverts commit d358def706880defa4c9e87381c5bf086a97d5f9.
>
> There are two issues with "i2c: cadence: Fix the hold bit setting" commit.
>
> 1. In case of combined message request from user space, when the HOLD
> bit is cleared in cdns_i2c_mrecv function, a STOP condition is sent
> on the bus even before the last message is started. This is because when
> the HOLD bit is cleared, the FIFOS are empty and there is no pending
> transfer. The STOP condition should occur only after the last message
> is completed.
>
> 2. The code added by the commit is redundant. Driver is handling the
> setting/clearing of HOLD bit in right way before the commit.
>
> The setting of HOLD bit based on 'bus_hold_flag' is taken care in
> cdns_i2c_master_xfer function even before cdns_i2c_msend/cdns_i2c_recv
> functions.
>
> The clearing of HOLD bit is taken care at the end of cdns_i2c_msend and
> cdns_i2c_recv functions based on bus_hold_flag and byte count.
> Since clearing of HOLD bit is done after the slave address is written to
> the register (writing to address register triggers the message transfer),
> it is ensured that STOP condition occurs at the right time after
> completion of the pending transfer (last message).
>
> Signed-off-by: Raviteja Narayanam <raviteja.narayanam@xilinx.com>
Applied to for-current, thanks!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-07-22 10:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-03 13:55 [PATCH 1/2] Revert "i2c: cadence: Fix the hold bit setting" Raviteja Narayanam
2020-07-03 13:55 ` Raviteja Narayanam
2020-07-22 10:29 ` Wolfram Sang [this message]
2020-07-22 10:29 ` Wolfram Sang
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=20200722102859.GI1030@ninjato \
--to=wsa@kernel.org \
--cc=git@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=raviteja.narayanam@xilinx.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.