i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL
Subsystems (2)
PATCH 1/1 i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL
From: Mario Alejandro Posso Escobar <[email protected]>
Expand the driver to support I2C_SMBUS_BLOCK_PROC_CALL since HW supports it already.
--- drivers/i2c/busses/i2c-ismt.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-ismt.c +17 -2
@@ -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 ;
Signature · 1 line
2.28.0
Wolfram Sang
AppliedQuoted 6 lines · Andy Shevchenko
From: Mario Alejandro Posso Escobar <[email protected]>
Expand the driver to support
I2C_SMBUS_BLOCK_PROC_CALLsince HW supports it already.Co-developed-by Andy Shevchenko <[email protected]>
I removed that. Andy's SoB should do.
Quoted 2 lines
Signed-off-by Andy Shevchenko <[email protected]>Signed-off-by Mario Alejandro Posso Escobar <[email protected]>
Applied to for-next, thanks!
Quoted 5 lines
Quoted 3 lines
Signed-off-by Andy Shevchenko <[email protected]>Signed-off-by Mario Alejandro Posso Escobar <[email protected]>Applied to for-next, thanks!
Oops, I thought Andy was the maintainer. Seth, Neil are you okay with this patch?
Quoted 8 lines · Wolfram Sang
Quoted 5 lines
Quoted 3 lines
Signed-off-by Andy Shevchenko <[email protected]>Signed-off-by Mario Alejandro Posso Escobar <[email protected]>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).
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 9 lines · Wolfram Sang
Quoted 6 lines · Andy Shevchenko
From: Mario Alejandro Posso Escobar <[email protected]>
Expand the driver to support
I2C_SMBUS_BLOCK_PROC_CALLsince HW supports it already.Co-developed-by Andy Shevchenko <[email protected]>I removed that. Andy's SoB should do.
It's against documentation, please return it back as a must by documentation [1].
Quoted 4 lines
Quoted 2 lines
Signed-off-by Andy Shevchenko <[email protected]>Signed-off-by Mario Alejandro Posso Escobar <[email protected]>Applied to for-next, thanks!
Thanks, but see above.
"..., every Co-developed-by: must be immediately followed by a Signed-off-by: of the associated co-author."
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 2 lines
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!