Usage of get_random_bytes() in i2c-cp2615

2021-04-12 Thread Bence Csókás
Normally, `cp2615_i2c_transfer.tag` is a random number that identifies a given request-reply pair (the chip sends its response with the same tag it got in the request). Currently, for the sake of ease, my driver sends its requests with a fixed tag of 0xDD for all requests. This defeats the purpose

[PATCH] Fix 'assignment to __be16' warning

2021-04-12 Thread Bence Csókás
While the preamble field _is_ technically big-endian, its value is always 0x2A2A, which is the same in either endianness, therefore it should be u16 instead. Signed-off-by: Bence Csókás --- drivers/i2c/busses/i2c-cp2615.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a

[PATCH v4 2/2] Adding i2c-cp2615: i2c support for Silicon Labs' CP2615 Digital Audio Bridge

2021-03-31 Thread Bence Csókás
Create an i2c_adapter for CP2615's I2C master interface Signed-off-by: Bence Csókás --- MAINTAINERS | 5 + drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-cp2615.c | 336 4

[PATCH v4 0/2] Adding i2c-cp2615: i2c support for Silicon Labs' CP2615 Digital Audio

2021-03-31 Thread Bence Csókás
formatting, warning fixing (ex. identicalConditionAfterEarlyExit) etc. Bence Csókás (2): i2c: Add I2C_AQ_NO_REP_START adapter quirk Adding i2c-cp2615: i2c support for Silicon Labs' CP2615 Digital Audio Bridge MAINTAINERS | 5 + drivers/i2c/busses/Kconfig | 10 + dr

[PATCH v4 1/2] i2c: Add I2C_AQ_NO_REP_START adapter quirk

2021-03-31 Thread Bence Csókás
This quirk signifies that the adapter cannot do a repeated START, it always issues a STOP condition after transfers. Suggested-by: Wolfram Sang Signed-off-by: Bence Csókás --- include/linux/i2c.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/i2c.h b/include/linux/i2c.h

Re: [PATCH v3 2/2] Adding i2c-cp2615: i2c support for Silicon Labs' CP2615 Digital Audio Bridge

2021-03-31 Thread Bence Csókás
> drivers/i2c/busses/i2c-cp2615.c:88:21: warning: incorrect type in assignment > (different base types) > drivers/i2c/busses/i2c-cp2615.c:88:21:expected unsigned short [usertype] > length > drivers/i2c/busses/i2c-cp2615.c:88:21:got restricted __be16 [usertype] > ... Yes, I have already co

[PATCH v3 1/2] i2c: Add I2C_AQ_NO_REP_START adapter quirk

2021-03-18 Thread Bence Csókás
This quirk signifies that the adapter cannot do a repeated START, it always issues a STOP condition after transfers. Signed-off-by: Bence Csókás --- include/linux/i2c.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 56622658b215

[PATCH v3 2/2] Adding i2c-cp2615: i2c support for Silicon Labs' CP2615 Digital Audio Bridge

2021-03-18 Thread Bence Csókás
Create an i2c_adapter for CP2615's I2C master interface by implementing parts of the CP2615's I/O Protocol (IOP) Signed-off-by: Bence Csókás --- drivers/i2c/busses/Kconfig | 10 ++ drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-cp26

[PATCH v3 0/2] Add i2c-cp2615

2021-03-18 Thread Bence Csókás
taken from SiLabs' Application Note, I thought it made sense to preserve these as-is. Bence Csókás (2): i2c: Add I2C_AQ_NO_REP_START adapter quirk Adding i2c-cp2615: i2c support for Silicon Labs' CP2615 Digital Audio Bridge drivers/i2c/busses/Kconfig | 10 ++ drivers

Re: [PATCH v2] Adding i2c-cp2615: i2c support for Silicon Labs' CP2615 Digital Audio Bridge

2021-03-17 Thread Bence Csókás
Thanks for the lightning quick response! Wolfram Sang ezt írta (időpont: 2021. márc. 17., Sze, 13:34): > > On Wed, Mar 17, 2021 at 10:30:21AM +, Bence Csókás wrote: > > Signed-off-by: Bence Csókás > > Thanks, this looks good now and I think we are very close. > > >

[PATCH v2] Adding i2c-cp2615: i2c support for Silicon Labs' CP2615 Digital Audio Bridge

2021-03-17 Thread Bence Csókás
Signed-off-by: Bence Csókás --- drivers/i2c/busses/Kconfig | 10 ++ drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-cp2615.c | 282 3 files changed, 293 insertions(+) create mode 100644 drivers/i2c/busses/i2c-cp2615.c diff --git a/drivers