Re: [PATCH v19 2/4] i2c: Add support for Intel LJCA USB I2C driver

Wolfram Sang
2023-09-29T07:51:52Z

[-- Attachment #1: Type: text/plain, Size: 671 bytes --]

> +static u32 ljca_i2c_func(struct i2c_adapter *adap)
> +{
> + return I2C_FUNC_I2C;

You could use this here to make the driver way more useful:

return I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK);

Except I2C_FUNC_SMBUS_QUICK, emulated SMBUS calls work out of the box.

For I2C_FUNC_SMBUS_QUICK, you need to test zero-length transfers indeed
('i2cdetect <busnum>' will use it and is a good testcase). Which would
be good anyway, because if it is not supporting zero-length, we need to
add an adapter->quirk flag as well.

We could add this incrementally, but it will be better to have this
correct right away. i2cdetect is a good and simple testcase.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]