* [PATCH v1 1/1] i2c: iproc: generate stop event for slave writes
@ 2020-03-22 18:20 Rayagonda Kokatanur
2020-04-15 12:29 ` Wolfram Sang
2020-04-26 8:34 ` Wolfram Sang
0 siblings, 2 replies; 4+ messages in thread
From: Rayagonda Kokatanur @ 2020-03-22 18:20 UTC (permalink / raw)
To: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Wolfram Sang,
Lori Hikichi, Shreesha Rajashekar, Nishka Dasgupta, linux-i2c,
linux-arm-kernel, linux-kernel
Cc: Rayagonda Kokatanur
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] i2c: iproc: generate stop event for slave writes
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
2020-04-16 4:47 ` Rayagonda Kokatanur
2020-04-26 8:34 ` Wolfram Sang
1 sibling, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2020-04-15 12:29 UTC (permalink / raw)
To: Rayagonda Kokatanur
Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Lori Hikichi,
Shreesha Rajashekar, Nishka Dasgupta, linux-i2c,
linux-arm-kernel, linux-kernel
[-- Attachment #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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] i2c: iproc: generate stop event for slave writes
2020-04-15 12:29 ` Wolfram Sang
@ 2020-04-16 4:47 ` Rayagonda Kokatanur
0 siblings, 0 replies; 4+ messages in thread
From: Rayagonda Kokatanur @ 2020-04-16 4:47 UTC (permalink / raw)
To: Wolfram Sang
Cc: Ray Jui, Scott Branden, BCM Kernel Feedback, Lori Hikichi,
Shreesha Rajashekar, Nishka Dasgupta, linux-i2c,
linux-arm-kernel, Linux Kernel Mailing List
On Wed, Apr 15, 2020 at 5:59 PM Wolfram Sang <wsa@the-dreams.de> wrote:
>
> 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?
Yes.
>
> > ---
> > 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
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] i2c: iproc: generate stop event for slave writes
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
@ 2020-04-26 8:34 ` Wolfram Sang
1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2020-04-26 8:34 UTC (permalink / raw)
To: Rayagonda Kokatanur
Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Lori Hikichi,
Shreesha Rajashekar, Nishka Dasgupta, linux-i2c,
linux-arm-kernel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 363 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>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-26 8:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-04-16 4:47 ` Rayagonda Kokatanur
2020-04-26 8:34 ` Wolfram Sang
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).