On Tue, Sep 17, 2024 at 11:51:27PM +0530, Shyam Sundar S K wrote: > On 9/14/2024 00:47, Andy Shevchenko wrote: > > On Fri, Sep 13, 2024 at 05:41:08PM +0530, Shyam Sundar S K wrote: ... > >> + i2c_slave_event(dev->target, I2C_SLAVE_WRITE_REQUESTED, &val); > > > > Can this fail / return an error code? (I haven't checked) > > i2c_slave_event() returns an error code, but here it is done with the > workqueue callback context. Hence I skipped the error checking part. This requires a comment why it's okay. ... > >> + for (idx = 0; idx < len; idx++) { > >> + val = data[idx]; > >> + i2c_slave_event(dev->target, I2C_SLAVE_WRITE_RECEIVED, &val); > >> + } > >> + i2c_slave_event(dev->target, I2C_SLAVE_STOP, &val); Same here. > >> +} -- With Best Regards, Andy Shevchenko