* Re: [PATCH v1] i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL
[not found] <20201116153245.24083-1-andriy.shevchenko () linux ! intel ! com>
@ 2020-12-03 8:51 ` Seth Heasley
2020-12-03 20:21 ` Wolfram Sang
0 siblings, 1 reply; 8+ messages in thread
From: Seth Heasley @ 2020-12-03 8:51 UTC (permalink / raw)
To: Andy Shevchenko, Neil Horman, linux-i2c, Wolfram Sang
Cc: mario.posso.escobar, seth.heasley
On Mon, 2020-11-16 at 15:32 +0000, Andy Shevchenko wrote:
> From: Mario Alejandro Posso Escobar <mario.posso.escobar@intel.com>
>
> Expand the driver to support I2C_SMBUS_BLOCK_PROC_CALL since
> HW supports it already.
>
> Co-developed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Mario Alejandro Posso Escobar
> mario.posso.escobar@intel.com>
Reviewed-by: Seth Heasley <seth.heasley@linux.intel.com>
> ---
> drivers/i2c/busses/i2c-ismt.c | 19 +++++++++++++++++--
> 1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-
> ismt.c
> index a35a27c320e7..a6187cbec2c9 100644
> --- a/drivers/i2c/busses/i2c-ismt.c
> +++ b/drivers/i2c/busses/i2c-ismt.c
> @@ -53,7 +53,7 @@
> * Features supported by this driver:
> * Hardware PEC yes
> * Block buffer yes
> - * Block process call transaction no
> + * Block process call transaction yes
> * Slave mode no
> */
>
> @@ -332,7 +332,8 @@ static int ismt_process_desc(const struct
> ismt_desc *desc,
>
> if (desc->status & ISMT_DESC_SCS) {
> if (read_write == I2C_SMBUS_WRITE &&
> - size != I2C_SMBUS_PROC_CALL)
> + size != I2C_SMBUS_PROC_CALL &&
> + size != I2C_SMBUS_BLOCK_PROC_CALL)
> return 0;
>
> switch (size) {
> @@ -345,6 +346,7 @@ static int ismt_process_desc(const struct
> ismt_desc *desc,
> data->word = dma_buffer[0] | (dma_buffer[1] <<
> 8);
> break;
> case I2C_SMBUS_BLOCK_DATA:
> + case I2C_SMBUS_BLOCK_PROC_CALL:
> if (desc->rxbytes != dma_buffer[0] + 1)
> return -EMSGSIZE;
>
> @@ -518,6 +520,18 @@ static int ismt_access(struct i2c_adapter *adap,
> u16 addr,
> }
> break;
>
> + case I2C_SMBUS_BLOCK_PROC_CALL:
> + dev_dbg(dev, "I2C_SMBUS_BLOCK_PROC_CALL\n");
> + dma_size = I2C_SMBUS_BLOCK_MAX;
> + desc->tgtaddr_rw = ISMT_DESC_ADDR_RW(addr, 1);
> + desc->wr_len_cmd = data->block[0] + 1;
> + desc->rd_len = dma_size;
> + desc->control |= ISMT_DESC_BLK;
> + dma_direction = DMA_BIDIRECTIONAL;
> + dma_buffer[0] = command;
> + memcpy(&dma_buffer[1], &data->block[1], data-
> >block[0]);
> + break;
> +
> case I2C_SMBUS_I2C_BLOCK_DATA:
> /* Make sure the length is valid */
> if (data->block[0] < 1)
> @@ -624,6 +638,7 @@ static u32 ismt_func(struct i2c_adapter *adap)
> I2C_FUNC_SMBUS_BYTE_DATA |
> I2C_FUNC_SMBUS_WORD_DATA |
> I2C_FUNC_SMBUS_PROC_CALL |
> + I2C_FUNC_SMBUS_BLOCK_PROC_CALL |
> I2C_FUNC_SMBUS_BLOCK_DATA |
> I2C_FUNC_SMBUS_I2C_BLOCK |
> I2C_FUNC_SMBUS_PEC;
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL
2020-12-03 8:51 ` [PATCH v1] i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL Seth Heasley
@ 2020-12-03 20:21 ` Wolfram Sang
0 siblings, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2020-12-03 20:21 UTC (permalink / raw)
To: Seth Heasley
Cc: Andy Shevchenko, Neil Horman, linux-i2c, mario.posso.escobar,
seth.heasley
[-- Attachment #1: Type: text/plain, Size: 671 bytes --]
On Thu, Dec 03, 2020 at 12:51:02AM -0800, Seth Heasley wrote:
> On Mon, 2020-11-16 at 15:32 +0000, Andy Shevchenko wrote:
> > From: Mario Alejandro Posso Escobar <mario.posso.escobar@intel.com>
> >
> > Expand the driver to support I2C_SMBUS_BLOCK_PROC_CALL since
> > HW supports it already.
> >
> > Co-developed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Signed-off-by: Mario Alejandro Posso Escobar
> > mario.posso.escobar@intel.com>
> Reviewed-by: Seth Heasley <seth.heasley@linux.intel.com>
Thanks! Applied to for-next again, not changing the tags this time.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL
2020-12-02 16:23 ` Andy Shevchenko
@ 2020-12-02 16:25 ` Wolfram Sang
0 siblings, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2020-12-02 16:25 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Seth Heasley, Neil Horman, linux-i2c, Mario Alejandro Posso Escobar
[-- Attachment #1: Type: text/plain, Size: 164 bytes --]
> It's against documentation, please return it back as a must by documentation [1].
Sure. Never heard of or never seen that tag before. Thanks for the heads
up!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL
2020-12-02 16:00 ` Wolfram Sang
@ 2020-12-02 16:24 ` Andy Shevchenko
0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2020-12-02 16:24 UTC (permalink / raw)
To: Wolfram Sang, Seth Heasley, Neil Horman, linux-i2c,
Mario Alejandro Posso Escobar
On Wed, Dec 02, 2020 at 05:00:23PM +0100, Wolfram Sang wrote:
>
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > Signed-off-by: Mario Alejandro Posso Escobar <mario.posso.escobar@intel.com>
> >
> > Applied to for-next, thanks!
>
> Oops, I thought Andy was the maintainer. Seth, Neil are you okay with
> this patch?
JFYI: Even for maintainers the Co-developed-by case is to have both tags (when
maintainer was a co-developer of a code in question).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL
2020-12-02 15:45 ` Wolfram Sang
2020-12-02 16:00 ` Wolfram Sang
@ 2020-12-02 16:23 ` Andy Shevchenko
2020-12-02 16:25 ` Wolfram Sang
1 sibling, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2020-12-02 16:23 UTC (permalink / raw)
To: Wolfram Sang, Seth Heasley, Neil Horman, linux-i2c,
Mario Alejandro Posso Escobar
On Wed, Dec 02, 2020 at 04:45:01PM +0100, Wolfram Sang wrote:
> On Mon, Nov 16, 2020 at 05:32:45PM +0200, Andy Shevchenko wrote:
> > From: Mario Alejandro Posso Escobar <mario.posso.escobar@intel.com>
> >
> > Expand the driver to support I2C_SMBUS_BLOCK_PROC_CALL since
> > HW supports it already.
> >
> > Co-developed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> I removed that. Andy's SoB should do.
It's against documentation, please return it back as a must by documentation [1].
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Signed-off-by: Mario Alejandro Posso Escobar <mario.posso.escobar@intel.com>
>
> Applied to for-next, thanks!
Thanks, but see above.
[1]: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by
"..., every Co-developed-by: must be immediately followed by a Signed-off-by: of the associated co-author."
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL
2020-12-02 15:45 ` Wolfram Sang
@ 2020-12-02 16:00 ` Wolfram Sang
2020-12-02 16:24 ` Andy Shevchenko
2020-12-02 16:23 ` Andy Shevchenko
1 sibling, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2020-12-02 16:00 UTC (permalink / raw)
To: Andy Shevchenko, Seth Heasley, Neil Horman, linux-i2c,
Mario Alejandro Posso Escobar
[-- Attachment #1: Type: text/plain, Size: 280 bytes --]
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Signed-off-by: Mario Alejandro Posso Escobar <mario.posso.escobar@intel.com>
>
> Applied to for-next, thanks!
Oops, I thought Andy was the maintainer. Seth, Neil are you okay with
this patch?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL
2020-11-16 15:32 Andy Shevchenko
@ 2020-12-02 15:45 ` Wolfram Sang
2020-12-02 16:00 ` Wolfram Sang
2020-12-02 16:23 ` Andy Shevchenko
0 siblings, 2 replies; 8+ messages in thread
From: Wolfram Sang @ 2020-12-02 15:45 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Seth Heasley, Neil Horman, linux-i2c, Mario Alejandro Posso Escobar
[-- Attachment #1: Type: text/plain, Size: 535 bytes --]
On Mon, Nov 16, 2020 at 05:32:45PM +0200, Andy Shevchenko wrote:
> From: Mario Alejandro Posso Escobar <mario.posso.escobar@intel.com>
>
> Expand the driver to support I2C_SMBUS_BLOCK_PROC_CALL since
> HW supports it already.
>
> Co-developed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
I removed that. Andy's SoB should do.
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Mario Alejandro Posso Escobar <mario.posso.escobar@intel.com>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v1] i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL
@ 2020-11-16 15:32 Andy Shevchenko
2020-12-02 15:45 ` Wolfram Sang
0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2020-11-16 15:32 UTC (permalink / raw)
To: Seth Heasley, Neil Horman, linux-i2c, Wolfram Sang
Cc: Mario Alejandro Posso Escobar, Andy Shevchenko
From: Mario Alejandro Posso Escobar <mario.posso.escobar@intel.com>
Expand the driver to support I2C_SMBUS_BLOCK_PROC_CALL since
HW supports it already.
Co-developed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mario Alejandro Posso Escobar <mario.posso.escobar@intel.com>
---
drivers/i2c/busses/i2c-ismt.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c
index a35a27c320e7..a6187cbec2c9 100644
--- a/drivers/i2c/busses/i2c-ismt.c
+++ b/drivers/i2c/busses/i2c-ismt.c
@@ -53,7 +53,7 @@
* Features supported by this driver:
* Hardware PEC yes
* Block buffer yes
- * Block process call transaction no
+ * Block process call transaction yes
* Slave mode no
*/
@@ -332,7 +332,8 @@ static int ismt_process_desc(const struct ismt_desc *desc,
if (desc->status & ISMT_DESC_SCS) {
if (read_write == I2C_SMBUS_WRITE &&
- size != I2C_SMBUS_PROC_CALL)
+ size != I2C_SMBUS_PROC_CALL &&
+ size != I2C_SMBUS_BLOCK_PROC_CALL)
return 0;
switch (size) {
@@ -345,6 +346,7 @@ static int ismt_process_desc(const struct ismt_desc *desc,
data->word = dma_buffer[0] | (dma_buffer[1] << 8);
break;
case I2C_SMBUS_BLOCK_DATA:
+ case I2C_SMBUS_BLOCK_PROC_CALL:
if (desc->rxbytes != dma_buffer[0] + 1)
return -EMSGSIZE;
@@ -518,6 +520,18 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr,
}
break;
+ case I2C_SMBUS_BLOCK_PROC_CALL:
+ dev_dbg(dev, "I2C_SMBUS_BLOCK_PROC_CALL\n");
+ dma_size = I2C_SMBUS_BLOCK_MAX;
+ desc->tgtaddr_rw = ISMT_DESC_ADDR_RW(addr, 1);
+ desc->wr_len_cmd = data->block[0] + 1;
+ desc->rd_len = dma_size;
+ desc->control |= ISMT_DESC_BLK;
+ dma_direction = DMA_BIDIRECTIONAL;
+ dma_buffer[0] = command;
+ memcpy(&dma_buffer[1], &data->block[1], data->block[0]);
+ break;
+
case I2C_SMBUS_I2C_BLOCK_DATA:
/* Make sure the length is valid */
if (data->block[0] < 1)
@@ -624,6 +638,7 @@ static u32 ismt_func(struct i2c_adapter *adap)
I2C_FUNC_SMBUS_BYTE_DATA |
I2C_FUNC_SMBUS_WORD_DATA |
I2C_FUNC_SMBUS_PROC_CALL |
+ I2C_FUNC_SMBUS_BLOCK_PROC_CALL |
I2C_FUNC_SMBUS_BLOCK_DATA |
I2C_FUNC_SMBUS_I2C_BLOCK |
I2C_FUNC_SMBUS_PEC;
--
2.28.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-12-03 20:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20201116153245.24083-1-andriy.shevchenko () linux ! intel ! com>
2020-12-03 8:51 ` [PATCH v1] i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL Seth Heasley
2020-12-03 20:21 ` Wolfram Sang
2020-11-16 15:32 Andy Shevchenko
2020-12-02 15:45 ` Wolfram Sang
2020-12-02 16:00 ` Wolfram Sang
2020-12-02 16:24 ` Andy Shevchenko
2020-12-02 16:23 ` Andy Shevchenko
2020-12-02 16:25 ` Wolfram Sang
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.