]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
HID: mcp2221: use mcp_i2c_smbus_read for block reads
authorRomain Sioen <romain.sioen@microchip.com>
Fri, 6 Feb 2026 16:31:53 +0000 (17:31 +0100)
committerJiri Kosina <jkosina@suse.com>
Fri, 27 Feb 2026 17:55:22 +0000 (18:55 +0100)
commitab05515757fcb77edbbe7c68fbc7c0c930c0f668
treed60de3ae283cc3022341cd4bd9465fd1f234d048
parentf50822fd8675c68d294e89bd102f7b487ca3acd3
HID: mcp2221: use mcp_i2c_smbus_read for block reads

Refactor mcp_smbus_xfer() to use the mcp_i2c_smbus_read() helper function
for I2C_SMBUS_BLOCK_DATA and I2C_SMBUS_I2C_BLOCK_DATA read operations.

This replaces the manual setup of the receive buffer and explicit calls
to mcp_send_data_req_status(), making the code cleaner and more consistent
with other read paths in the driver.

Signed-off-by: Romain Sioen <romain.sioen@microchip.com>
Signed-off-by: Marius Cristea <marius.cristea@microchip.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-mcp2221.c