Message ID | 20180422175800.6315-1-hdegoede@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] i2c: core: APCI: Improve OpRegion read errors | expand |
On Sun, Apr 22, 2018 at 07:57:59PM +0200, Hans de Goede wrote: > 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>
On Sun, Apr 22, 2018 at 07:57:59PM +0200, Hans de Goede wrote: > 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> Fixed the APCI typo in subject ;) and applied to for-current, thanks!
diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c index a9126b3cda61..3dc43a009f5d 100644 --- a/drivers/i2c/i2c-core-acpi.c +++ b/drivers/i2c/i2c-core-acpi.c @@ -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);
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> --- drivers/i2c/i2c-core-acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)