RE: [PATCH 2/2] hwmon: (pmbus/max20830) add driver for max20830
"Torreno, Alexis Czezar" <[email protected]>
| Newsgroups | dev.linux.lists.sashiko,org.kernel.vger.linux-hwmon |
|---|---|
| Message-ID | <PH0PR03MB6351026955AFF2D037BF0266F1232@PH0PR03MB6351.namprd03.prod.outlook.com> |
> > > > I may need to keep i2c_smbus_read_i2c_block_data. I'm testing this on > > an rpi4 and it seems i2c_smbus_read_block_data isn't supported by the > adapter. > > > > Odd. I can see that the bcm2835 controller driver sets > I2C_FUNC_SMBUS_EMUL but not I2C_FUNC_SMBUS_BLOCK_DATA. That > makes me wonder if the controller really does not support block reads. Any > chance you can try setting that flag in ./drivers/i2c/busses/i2c-bcm2835.c and > see what happens ? > I tried using i2c_smbus_read_block_data, and here's some log messages [ 6857.261998] max20830: adapter does NOT support I2C_FUNC_SMBUS_BLOCK_DATA [ 6857.262006] max20830: adapter supports I2C_FUNC_SMBUS_READ_I2C_BLOCK [ 6857.265228] max20830: i2c_block_data read 32 bytes: ' MAX20830' [ 6857.265648] max20830: smbus_block_data read 9 bytes: '' i2c_smbus_read_i2c_block_data returns 32 for 32 bytes read and the buffer content is expected "MAX20830" i2c_smbus_read_block_data returned 9 so I think it read the payload length of 1byte but no data beyond it, hence buffer = ''