i2c: core: ACPI: Improve OpRegion read errors

When we get an error doing an ACPI SerialBus I2C OpRegion read log some
useful details, like the client address and which register is being
read.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
Hans de Goede 2018-04-22 19:57:59 +02:00 committed by Wolfram Sang
parent 6da6c0db53
commit c8016fa215
1 changed files with 2 additions and 1 deletions

View File

@ -446,7 +446,8 @@ static int acpi_gsb_i2c_read_bytes(struct i2c_client *client,
ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
if (ret < 0)
dev_err(&client->adapter->dev, "i2c read failed\n");
dev_err(&client->adapter->dev, "i2c read %d bytes from client@%#x starting at reg %#x failed, error: %d\n",
data_len, client->addr, cmd, ret);
else
memcpy(data, buffer, data_len);