diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-07 22:36:18 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-07 22:36:18 +0300 |
commit | 0d5b1bd332e09acffa6569dd6458199b3894d496 (patch) | |
tree | 6c103cb045f0990ae4aae9a2ea4af1c26bfe6390 /drivers/i2c/busses/i2c-scmi.c | |
parent | 49a695ba723224875df50e327bd7b0b65dd9a56b (diff) | |
parent | 0d676a6c439028b046610f7593f4ddb62680f1fb (diff) | |
download | linux-0d5b1bd332e09acffa6569dd6458199b3894d496.tar.xz |
Merge branch 'i2c/for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang:
-I2C core now reports proper OF style module alias. I'd like to repeat
the note from the commit msg here (Thanks, Javier!):
NOTE: This patch may break out-of-tree drivers that were relying
on this behavior, and only had an I2C device ID table even
when the device was registered via OF.
There are no remaining drivers in mainline that do this, but
out-of-tree drivers have to be fixed and define a proper OF
device ID table to have module auto-loading working.
- new driver for the SynQuacer I2C controller
- major refactoring of the QUP driver
- the piix4 driver now uses request_muxed_region which should fix a
long standing resource conflict with the sp5100_tco watchdog
- a bunch of small core & driver improvements
* 'i2c/for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (53 commits)
i2c: add support for Socionext SynQuacer I2C controller
dt-bindings: i2c: add binding for Socionext SynQuacer I2C
i2c: Update i2c_trace_msg static key to modern api
i2c: fix parameter of trace_i2c_result
i2c: imx: avoid taking clk_prepare mutex in PM callbacks
i2c: imx: use clk notifier for rate changes
i2c: make i2c_check_addr_validity() static
i2c: rcar: fix mask value of prohibited bit
dt-bindings: i2c: document R8A77965 bindings
i2c: pca-platform: drop gpio from platform data
i2c: pca-platform: use device_property_read_u32
i2c: pca-platform: unconditionally use devm_gpiod_get_optional
sh: sh7785lcr: add GPIO lookup table for i2c controller reset
i2c: qup: reorganization of driver code to remove polling for qup v2
i2c: qup: reorganization of driver code to remove polling for qup v1
i2c: qup: send NACK for last read sub transfers
i2c: qup: fix buffer overflow for multiple msg of maximum xfer len
i2c: qup: change completion timeout according to transfer length
i2c: qup: use the complete transfer length to choose DMA mode
i2c: qup: proper error handling for i2c error in BAM mode
...
Diffstat (limited to 'drivers/i2c/busses/i2c-scmi.c')
-rw-r--r-- | drivers/i2c/busses/i2c-scmi.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/drivers/i2c/busses/i2c-scmi.c b/drivers/i2c/busses/i2c-scmi.c index 7aa7b9cb6203..a01389b85f13 100644 --- a/drivers/i2c/busses/i2c-scmi.c +++ b/drivers/i2c/busses/i2c-scmi.c @@ -182,7 +182,8 @@ acpi_smbus_cmi_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, status = acpi_evaluate_object(smbus_cmi->handle, method, &input, &buffer); if (ACPI_FAILURE(status)) { - ACPI_ERROR((AE_INFO, "Evaluating %s: %i", method, status)); + acpi_handle_err(smbus_cmi->handle, + "Failed to evaluate %s: %i\n", method, status); return -EIO; } @@ -190,19 +191,19 @@ acpi_smbus_cmi_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, if (pkg && pkg->type == ACPI_TYPE_PACKAGE) obj = pkg->package.elements; else { - ACPI_ERROR((AE_INFO, "Invalid argument type")); + acpi_handle_err(smbus_cmi->handle, "Invalid argument type\n"); result = -EIO; goto out; } if (obj == NULL || obj->type != ACPI_TYPE_INTEGER) { - ACPI_ERROR((AE_INFO, "Invalid argument type")); + acpi_handle_err(smbus_cmi->handle, "Invalid argument type\n"); result = -EIO; goto out; } result = obj->integer.value; - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s return status: %i\n", - method, result)); + acpi_handle_debug(smbus_cmi->handle, "%s return status: %i\n", method, + result); switch (result) { case ACPI_SMBUS_STATUS_OK: @@ -227,7 +228,7 @@ acpi_smbus_cmi_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, obj = pkg->package.elements + 1; if (obj->type != ACPI_TYPE_INTEGER) { - ACPI_ERROR((AE_INFO, "Invalid argument type")); + acpi_handle_err(smbus_cmi->handle, "Invalid argument type\n"); result = -EIO; goto out; } @@ -239,7 +240,8 @@ acpi_smbus_cmi_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, case I2C_SMBUS_BYTE_DATA: case I2C_SMBUS_WORD_DATA: if (obj->type != ACPI_TYPE_INTEGER) { - ACPI_ERROR((AE_INFO, "Invalid argument type")); + acpi_handle_err(smbus_cmi->handle, + "Invalid argument type\n"); result = -EIO; goto out; } @@ -250,7 +252,8 @@ acpi_smbus_cmi_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, break; case I2C_SMBUS_BLOCK_DATA: if (obj->type != ACPI_TYPE_BUFFER) { - ACPI_ERROR((AE_INFO, "Invalid argument type")); + acpi_handle_err(smbus_cmi->handle, + "Invalid argument type\n"); result = -EIO; goto out; } @@ -300,6 +303,7 @@ static int acpi_smbus_cmi_add_cap(struct acpi_smbus_cmi *smbus_cmi, const char *name) { struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; + struct acpi_handle *handle = smbus_cmi->handle; union acpi_object *obj; acpi_status status; @@ -308,8 +312,8 @@ static int acpi_smbus_cmi_add_cap(struct acpi_smbus_cmi *smbus_cmi, smbus_cmi->methods->mt_info, NULL, &buffer); if (ACPI_FAILURE(status)) { - ACPI_ERROR((AE_INFO, "Evaluating %s: %i", - smbus_cmi->methods->mt_info, status)); + acpi_handle_err(handle, "Failed to evaluate %s: %i\n", + smbus_cmi->methods->mt_info, status); return -EIO; } @@ -317,18 +321,18 @@ static int acpi_smbus_cmi_add_cap(struct acpi_smbus_cmi *smbus_cmi, if (obj && obj->type == ACPI_TYPE_PACKAGE) obj = obj->package.elements; else { - ACPI_ERROR((AE_INFO, "Invalid argument type")); + acpi_handle_err(handle, "Invalid argument type\n"); kfree(buffer.pointer); return -EIO; } if (obj->type != ACPI_TYPE_INTEGER) { - ACPI_ERROR((AE_INFO, "Invalid argument type")); + acpi_handle_err(handle, "Invalid argument type\n"); kfree(buffer.pointer); return -EIO; } else - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "SMBus CMI Version %x" - "\n", (int)obj->integer.value)); + acpi_handle_debug(handle, "SMBus CMI Version %x\n", + (int)obj->integer.value); kfree(buffer.pointer); smbus_cmi->cap_info = 1; @@ -337,8 +341,7 @@ static int acpi_smbus_cmi_add_cap(struct acpi_smbus_cmi *smbus_cmi, else if (!strcmp(name, smbus_cmi->methods->mt_sbw)) smbus_cmi->cap_write = 1; else - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Unsupported CMI method: %s\n", - name)); + acpi_handle_debug(handle, "Unsupported CMI method: %s\n", name); return 0; } |