* [PATCH 0/8] i2c: improve RECV_LEN documentation & usage
@ 2021-01-09 12:43 Wolfram Sang
2021-01-09 12:43 ` [PATCH 8/8] i2c: s3c2410: advertise SMBus transfers using RECV_LEN Wolfram Sang
2021-01-22 9:02 ` [PATCH 0/8] i2c: improve RECV_LEN documentation & usage Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: Wolfram Sang @ 2021-01-09 12:43 UTC (permalink / raw)
To: linux-i2c
Cc: linux-renesas-soc, Wolfram Sang, linux-arm-kernel, linux-arm-msm,
linux-kernel, linux-samsung-soc
Because I want to clarify I2C_M_RECV len usage, this series updates the
documentation and some of its users. Patch 1 refactors the whole
documentation of 'i2c_msg', so all usage of I2C_M_* flags and their
conditions hopefully become clearer. Patch 2+3 remove some obvious
boilerplate in the UAPI headers while here. Patch 4 is a driver fix I
found while working on this series. Patch 5 introduces a new convenience
macro to enable SMBus transfers which need I2C_M_RECV_LEN. Then, some
drivers use the new macro, sometimes to remove boilerplate, sometimes
because these SMBus transfers have been forgotten before.
This series is the first part of a larger work to extend I2C_M_RECV_LEN
to allow larger transfer sizes (as specified in the SMBus 3.0 standard)
and to enable this on Renesas R-Car hardware.
Looking forward to comments and/or reviews; the driver patches are only
build-tested.
Happy hacking,
Wolfram
Wolfram Sang (8):
i2c: refactor documentation of struct i2c_msg
i2c: remove licence boilerplate from main UAPI header
i2c: remove licence boilerplate from i2c-dev UAPI header
i2c: octeon: check correct size of maximum RECV_LEN packet
i2c: uapi: add macro to describe support for all SMBus transfers
i2c: algo: bit: use new macro to specifiy capabilities
i2c: qup: advertise SMBus transfers using RECV_LEN
i2c: s3c2410: advertise SMBus transfers using RECV_LEN
drivers/i2c/algos/i2c-algo-bit.c | 4 +-
drivers/i2c/busses/i2c-octeon-core.c | 2 +-
drivers/i2c/busses/i2c-qup.c | 2 +-
drivers/i2c/busses/i2c-s3c2410.c | 2 +-
include/uapi/linux/i2c-dev.h | 25 ++----
include/uapi/linux/i2c.h | 128 ++++++++++++++-------------
6 files changed, 76 insertions(+), 87 deletions(-)
--
2.29.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 8/8] i2c: s3c2410: advertise SMBus transfers using RECV_LEN
2021-01-09 12:43 [PATCH 0/8] i2c: improve RECV_LEN documentation & usage Wolfram Sang
@ 2021-01-09 12:43 ` Wolfram Sang
2021-01-22 9:02 ` [PATCH 0/8] i2c: improve RECV_LEN documentation & usage Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2021-01-09 12:43 UTC (permalink / raw)
To: linux-i2c
Cc: linux-renesas-soc, Wolfram Sang, Krzysztof Kozlowski,
linux-arm-kernel, linux-samsung-soc, linux-kernel
This driver implements I2C_M_RECV_LEN, so it can advertise the SMBus
transfers needing it. This also enables client devices to check for the
RECV_LEN capability.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-s3c2410.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 3eafe0eb3e4c..62a903fbe912 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -781,7 +781,7 @@ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap,
/* declare our i2c functionality */
static u32 s3c24xx_i2c_func(struct i2c_adapter *adap)
{
- return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_NOSTART |
+ return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL_ALL | I2C_FUNC_NOSTART |
I2C_FUNC_PROTOCOL_MANGLING;
}
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 0/8] i2c: improve RECV_LEN documentation & usage
2021-01-09 12:43 [PATCH 0/8] i2c: improve RECV_LEN documentation & usage Wolfram Sang
2021-01-09 12:43 ` [PATCH 8/8] i2c: s3c2410: advertise SMBus transfers using RECV_LEN Wolfram Sang
@ 2021-01-22 9:02 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2021-01-22 9:02 UTC (permalink / raw)
To: linux-i2c
Cc: linux-renesas-soc, linux-arm-kernel, linux-arm-msm, linux-kernel,
linux-samsung-soc
[-- Attachment #1: Type: text/plain, Size: 1791 bytes --]
On Sat, Jan 09, 2021 at 01:43:04PM +0100, Wolfram Sang wrote:
> Because I want to clarify I2C_M_RECV len usage, this series updates the
> documentation and some of its users. Patch 1 refactors the whole
> documentation of 'i2c_msg', so all usage of I2C_M_* flags and their
> conditions hopefully become clearer. Patch 2+3 remove some obvious
> boilerplate in the UAPI headers while here. Patch 4 is a driver fix I
> found while working on this series. Patch 5 introduces a new convenience
> macro to enable SMBus transfers which need I2C_M_RECV_LEN. Then, some
> drivers use the new macro, sometimes to remove boilerplate, sometimes
> because these SMBus transfers have been forgotten before.
>
> This series is the first part of a larger work to extend I2C_M_RECV_LEN
> to allow larger transfer sizes (as specified in the SMBus 3.0 standard)
> and to enable this on Renesas R-Car hardware.
>
> Looking forward to comments and/or reviews; the driver patches are only
> build-tested.
>
> Happy hacking,
>
> Wolfram
>
>
> Wolfram Sang (8):
> i2c: refactor documentation of struct i2c_msg
> i2c: remove licence boilerplate from main UAPI header
> i2c: remove licence boilerplate from i2c-dev UAPI header
> i2c: octeon: check correct size of maximum RECV_LEN packet
> i2c: uapi: add macro to describe support for all SMBus transfers
> i2c: algo: bit: use new macro to specifiy capabilities
> i2c: qup: advertise SMBus transfers using RECV_LEN
> i2c: s3c2410: advertise SMBus transfers using RECV_LEN
>
> drivers/i2c/algos/i2c-algo-bit.c | 4 +-
> drivers/i2c/busses/i2c-octeon-core.c | 2 +-
> drivers/i2c/busses/i2c-qup.c | 2 +-
> drivers/i2c/busses/i2c-s3c2410.c | 2 +-
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-22 10:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09 12:43 [PATCH 0/8] i2c: improve RECV_LEN documentation & usage Wolfram Sang
2021-01-09 12:43 ` [PATCH 8/8] i2c: s3c2410: advertise SMBus transfers using RECV_LEN Wolfram Sang
2021-01-22 9:02 ` [PATCH 0/8] i2c: improve RECV_LEN documentation & usage 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).