summaryrefslogtreecommitdiffstats
path: root/common/ratp/i2c.c
Commit message (Collapse)AuthorAgeFilesLines
* ratp: implement i2c read/write supportAleksander Morgado2018-09-171-0/+284
Introduce two new RATP commands that allow running i2c read/write operations, very similar in format to the already existing md/mw RATP commands. The messages are defined with a fixed 16-bit long register field, but it will only be treated as a 16-bit address if I2C_FLAG_WIDE_ADDRESS is set in the message flags field. If this flag is unset, the start register address is assumed 8-bit long. If the message includes the I2C_FLAG_MASTER_MODE flag, the start register field is ignored and a i2c master send/receive operation is performed. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>