Re: [PATCH v5 6/8] i2c: amd-asf: Add routine to handle the ASF slave process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux