From: Wolfram Sang <wsa@the-dreams.de>
To: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Cc: Lori Hikichi <lori.hikichi@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
Ray Jui <rjui@broadcom.com>,
linux-kernel@vger.kernel.org,
Shreesha Rajashekar <shreesha.rajashekar@broadcom.com>,
bcm-kernel-feedback-list@broadcom.com, linux-i2c@vger.kernel.org,
Nishka Dasgupta <nishkadg.linux@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1 1/1] i2c: iproc: generate stop event for slave writes
Date: Wed, 15 Apr 2020 14:29:45 +0200 [thread overview]
Message-ID: <20200415122945.GC910@ninjato> (raw)
In-Reply-To: <20200322182019.32493-1-rayagonda.kokatanur@broadcom.com>
[-- Attachment #1.1: Type: text/plain, Size: 1222 bytes --]
On Sun, Mar 22, 2020 at 11:50:19PM +0530, Rayagonda Kokatanur wrote:
> When slave status is I2C_SLAVE_RX_END, generate I2C_SLAVE_STOP
> event to i2c_client.
>
> Fixes: c245d94ed106 ("i2c: iproc: Add multi byte read-write support for slave mode")
> Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Just to make sure: That means the HW has already detected a STOP
condition on the bus?
> ---
> drivers/i2c/busses/i2c-bcm-iproc.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c
> index 30efb7913b2e..b58224b7ba79 100644
> --- a/drivers/i2c/busses/i2c-bcm-iproc.c
> +++ b/drivers/i2c/busses/i2c-bcm-iproc.c
> @@ -360,6 +360,9 @@ static bool bcm_iproc_i2c_slave_isr(struct bcm_iproc_i2c_dev *iproc_i2c,
> value = (u8)((val >> S_RX_DATA_SHIFT) & S_RX_DATA_MASK);
> i2c_slave_event(iproc_i2c->slave,
> I2C_SLAVE_WRITE_RECEIVED, &value);
> + if (rx_status == I2C_SLAVE_RX_END)
> + i2c_slave_event(iproc_i2c->slave,
> + I2C_SLAVE_STOP, &value);
> }
> } else if (status & BIT(IS_S_TX_UNDERRUN_SHIFT)) {
> /* Master read other than start */
> --
> 2.17.1
>
[-- 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-04-15 12:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-22 18:20 [PATCH v1 1/1] i2c: iproc: generate stop event for slave writes Rayagonda Kokatanur
2020-04-15 12:29 ` Wolfram Sang [this message]
2020-04-16 4:47 ` Rayagonda Kokatanur
2020-04-26 8:34 ` 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=20200415122945.GC910@ninjato \
--to=wsa@the-dreams.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lori.hikichi@broadcom.com \
--cc=nishkadg.linux@gmail.com \
--cc=rayagonda.kokatanur@broadcom.com \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=shreesha.rajashekar@broadcom.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 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).