Re: [PATCH 3/5] hwmon: (pmbus/ltc2978) Use pmbus_read_smbus_i2c_block_data for block commands

[email protected] Mon, 03 Aug 2026 19:50:05 +0000
Newsgroups org.kernel.vger.linux-hwmon
Message-ID <[email protected]>
> The driver uses a mix of pmbus_read_smbus_i2c_block_data() and
> i2c_smbus_read_i2c_block_data() for PMBus block commands.
>=20
> Use pmbus_read_smbus_i2c_block_data() instead to enable the driver to work
> I2C controllers which do not support both block commands.
>=20
> Drop the functionality check to simplify the code and to trigger a return
> with -EOPNOTSUPP if SMBus block commands are not supported.
>=20
> As part of this patch, rework detection of LT7170 and LT7171. The return
> length of pmbus_read_smbus_i2c_block_data() may be less than the requested
> number of bytes, meaning the return length needs to be checked. Also,
> checking for "LT7170-1" after checking for "LT7170" and checking for
> "LT7171-1" after checking for "LT7171" is pointless since the first check
> will already produce a match, so drop the second part of the check.
>=20
> Cc: Alexis Czezar Torreno <[email protected]>
> Cc: Nuno S=C3=A1 <[email protected]>
> Signed-off-by: Guenter Roeck <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

--=20
Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260803193535.2286=
[email protected]?part=3D3