Skip to contentSkip to conversation

HID: i2c-hid: use correct type for ACPI _DSM parameter

PATCH Applied Mika Westerberg 3 participants 3 messages Aug 19, 2013 – Aug 20, 2013 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: i2c-hid: use correct type for ACPI _DSM parameter

ACPI 5.0 specification requires the fourth parameter to the _DSM (Device Specific Method) to be of type package instead of integer. Failing to do that we get following warning on the console:

ACPI Warning: \_SB_.PCI0.I2C1.TPL0._DSM: Argument #4 type mismatch - Found [Integer],

                ACPI requires [Package] (20130517/nsarguments-95)

Fix this by passing an empty package to the _DSM method. The HID over I2C specification doesn't require any specific values to be passed with this parameter.

---
 drivers/hid/i2c-hid/i2c-hid.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/hid/i2c-hid/i2c-hid.c +3 -2
index 879b0ed..d2e0eea 100644
@@ -897,8 +897,9 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,
 	params[1].integer.value = 1;
 	params[2].type = ACPI_TYPE_INTEGER;
 	params[2].integer.value = 1; /* HID function */
-	params[3].type = ACPI_TYPE_INTEGER;
-	params[3].integer.value = 0;
+	params[3].type = ACPI_TYPE_PACKAGE;
+	params[3].package.count = 0;
+	params[3].package.elements = NULL;
 
 	if (ACPI_FAILURE(acpi_evaluate_object(handle, "_DSM", &input, &buf))) {
 		dev_err(&client->dev, "device _DSM execution failed\n");
Signature · 1 line
1.8.4.rc2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Mika Westerberg

ACPI 5.0 specification requires the fourth parameter to the _DSM (Device Specific Method) to be of type package instead of integer. Failing to do that we get following warning on the console:

ACPI Warning: \_SB_.PCI0.I2C1.TPL0._DSM: Argument #4 type mismatch - Found [Integer],

Quoted 8 lines
                ACPI requires [Package] (20130517/nsarguments-95)

Fix this by passing an empty package to the _DSM method. The HID over I2C specification doesn't require any specific values to be passed with this parameter.

---

Looks simple and straightforward :)

Cheers,
Benjamin

Applied
#2 lore raw
Quoted 11 lines · Benjamin Tissoires
Quoted 11 lines

ACPI 5.0 specification requires the fourth parameter to the _DSM (Device Specific Method) to be of type package instead of integer. Failing to do that we get following warning on the console:

ACPI Warning: \_SB_.PCI0.I2C1.TPL0._DSM: Argument #4 type mismatch - Found [Integer],

                ACPI requires [Package] (20130517/nsarguments-95)

Fix this by passing an empty package to the _DSM method. The HID over I2C specification doesn't require any specific values to be passed with this parameter.

Quoted 6 lines
Quoted 2 lines

---

Looks simple and straightforward :)

Applied, thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs