mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
i2c: slave: rework the slave API
After more discussion, brave users, and additional datasheet evaluation, some API updates for the new I2C slave framework became imminent. The slave events now get some easier to understand naming. Also, the event handling has been simplified to only need a single call to the slave callback when an action by the backend is required. Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
4a7a08226d
commit
5b77d162a3
3 changed files with 14 additions and 16 deletions
|
@ -253,10 +253,10 @@ static inline void i2c_set_clientdata(struct i2c_client *dev, void *data)
|
|||
|
||||
#if IS_ENABLED(CONFIG_I2C_SLAVE)
|
||||
enum i2c_slave_event {
|
||||
I2C_SLAVE_REQ_READ_START,
|
||||
I2C_SLAVE_REQ_READ_END,
|
||||
I2C_SLAVE_REQ_WRITE_START,
|
||||
I2C_SLAVE_REQ_WRITE_END,
|
||||
I2C_SLAVE_READ_REQUESTED,
|
||||
I2C_SLAVE_WRITE_REQUESTED,
|
||||
I2C_SLAVE_READ_PROCESSED,
|
||||
I2C_SLAVE_WRITE_RECEIVED,
|
||||
I2C_SLAVE_STOP,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue