From patchwork Mon Dec 9 22:05:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 13900450 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7452319C54C for ; Mon, 9 Dec 2024 22:05:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733781935; cv=none; b=QXmM+Rn+N/l2lXQHE6/lI6lIS4sS46G/WZ8x3gFylIwavoE0XDqySM9RQtwRUR3/zTDlVZg0D2FAJ8Iua7ughCZn+zUPnTgKkbcpF8Oz+vV664AX6PLpN2oKYf4g6BW/vt5siLBOWAem0G+7/bQB7j/9JdK72C4qUIo6No9wxyU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733781935; c=relaxed/simple; bh=Aj9j0Jhp/boH81DZLsgKLqumciNts4Gm+6quYDJdug0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QcfqGJ3oP6FgHZbpPV8PfUqOSGDOPNCqm1wWoOYgV4baQcxpsqP4aRFUwAx640OdT9+PTggmZti0S64puWOnvE62JenzaAXyAKmygkoYbeDFsLnqZ+EPycltHl5cZQrX/g18kUySlNYRgxAGkunaeqtrJ+Q72H/d/qXBHde7yv4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=bvPi8DuE; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bvPi8DuE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733781932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0m4Vuodr9OU6acTTUVglkcuEGxIwPVWrhRDwLTDpOAc=; b=bvPi8DuEo3bUVbnj+0GdPCw0TIX/W2/u3bxog0TuHE1IKq1ycI2fb2BTAxqhvRUOjNRmsr V0/57iUDVUMGJDoomLgjZUEbneHa8Du1ekLqkJZW3idOn7NgyJwkR1FHzxXmXSxGe9tBAW MmElTX4d9nEO7OkEX+xFTAutZLgE+5Y= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-94-xBssw4krN4Oos9mPYg7aMg-1; Mon, 09 Dec 2024 17:05:26 -0500 X-MC-Unique: xBssw4krN4Oos9mPYg7aMg-1 X-Mimecast-MFC-AGG-ID: xBssw4krN4Oos9mPYg7aMg Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5F4D01955F45; Mon, 9 Dec 2024 22:05:25 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.3]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0D60019560A7; Mon, 9 Dec 2024 22:05:23 +0000 (UTC) From: Hans de Goede To: =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Andy Shevchenko Cc: Hans de Goede , platform-driver-x86@vger.kernel.org Subject: [PATCH v2 1/4] platform/x86: int3472: Check for adev == NULL Date: Mon, 9 Dec 2024 23:05:19 +0100 Message-ID: <20241209220522.25288-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Not all devices have an ACPI companion fwnode, so adev might be NULL. This can e.g. (theoretically) happen when a user manually binds one of the int3472 drivers to another i2c/platform device through sysfs. Add a check for adev not being set and return -ENODEV in that case to avoid a possible NULL pointer deref in skl_int3472_get_acpi_buffer(). Signed-off-by: Hans de Goede --- Changes in v2: - Improve commit message --- drivers/platform/x86/intel/int3472/discrete.c | 3 +++ drivers/platform/x86/intel/int3472/tps68470.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c index d881b2cfcdfc..09fff213b091 100644 --- a/drivers/platform/x86/intel/int3472/discrete.c +++ b/drivers/platform/x86/intel/int3472/discrete.c @@ -336,6 +336,9 @@ static int skl_int3472_discrete_probe(struct platform_device *pdev) struct int3472_cldb cldb; int ret; + if (!adev) + return -ENODEV; + ret = skl_int3472_fill_cldb(adev, &cldb); if (ret) { dev_err(&pdev->dev, "Couldn't fill CLDB structure\n"); diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c index 1e107fd49f82..81ac4c691963 100644 --- a/drivers/platform/x86/intel/int3472/tps68470.c +++ b/drivers/platform/x86/intel/int3472/tps68470.c @@ -152,6 +152,9 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client) int ret; int i; + if (!adev) + return -ENODEV; + n_consumers = skl_int3472_fill_clk_pdata(&client->dev, &clk_pdata); if (n_consumers < 0) return n_consumers; From patchwork Mon Dec 9 22:05:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 13900451 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C300019CC34 for ; Mon, 9 Dec 2024 22:05:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733781935; cv=none; b=LuBYQnEWrH5scw9glprtTQUZfExnMG2AmarAgKNZwYZg3rH3hguUmWBiIKbmH9DYLBSI6D3KlRik2hfzvVcezhvL5YVUd5QVf2YkSIQVxKiNcjNd9XaXKj9LqcoweDyGOpeejKdGn7kR8JWZ01Tkszn2LFBYP+3sScV9N9PAeAg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733781935; c=relaxed/simple; bh=5t7gmCARs05F6X//SHIKGMg+44sahrNtKrK1mIRX6Qo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NZBqSUUF8dJxkoahvDl8b7Cbw6NR55SZaFYYU4hyjTIlQIGJPNqVgPdmAY1pih1+NEgQDW40BAQTWiQw46fudd7VwpPdvP7gdBusHTKOM9IZwaWN/2HMnje77dZfbVrOB0rj6MdkLPoNz+J86rGrEHGdbzKpko9Y9tgw/b6NAGc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=PehcGvcQ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PehcGvcQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733781932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UocOw5NfV55u+cpvqWoVncO5O88QKHEI2mBMIavnmhc=; b=PehcGvcQXeySeZz4FBLsRWmBJm2ba8I3bUyZRSxcATYptN3y94oLOB3tKru1glpoJGTbIY ligCSx5JPZBE9+xXE8+sda6c3jouOaRLFCNK1BanfOxLfDvZex5KMrkYs0MkkvdFAX0xY3 ihEW4+IEP7W8dnwZS0XDgIAxUCSG5Fw= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-136-ED0WCReqPi-uhdmxYfhE4A-1; Mon, 09 Dec 2024 17:05:28 -0500 X-MC-Unique: ED0WCReqPi-uhdmxYfhE4A-1 X-Mimecast-MFC-AGG-ID: ED0WCReqPi-uhdmxYfhE4A Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1B8261955F40; Mon, 9 Dec 2024 22:05:27 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.3]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C2F4419560A2; Mon, 9 Dec 2024 22:05:25 +0000 (UTC) From: Hans de Goede To: =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Andy Shevchenko Cc: Hans de Goede , platform-driver-x86@vger.kernel.org Subject: [PATCH v2 2/4] platform/x86: int3472: Make "pin number mismatch" message a debug message Date: Mon, 9 Dec 2024 23:05:20 +0100 Message-ID: <20241209220522.25288-2-hdegoede@redhat.com> In-Reply-To: <20241209220522.25288-1-hdegoede@redhat.com> References: <20241209220522.25288-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 It seems that Windows is only using the ACPI GPIO resources and never looks at the part of the _DSM return value which encodes the pin number. For example on a Terra Pad 1262 v2 the following messages are printend: int3472-discrete INT3472:01: reset \_SB.GPI0 pin number mismatch _DSM 103 resource 359 int3472-discrete INT3472:01: powerdown \_SB.GPI0 pin number mismatch _DSM 207 resource 335 int3472-discrete INT3472:02: reset \_SB.GPI0 pin number mismatch _DSM 101 resource 357 Notice for the 2 reset pins that the _DSM value is off by 256, this is caused by there only being 8 bits reserved in the _DSM return value for the pin-number. As for the powerdown pin, testing has shown that the pin-number 335 from the ACPI GPIO resource is correct and the _DSM value is bogus. Lower the warning about these mismatches to a debug message and only look at the lower 8 bits of the GPIO resource pin numbers. Signed-off-by: Hans de Goede --- Changes in v2: - Lower message to debug level instead of dropping it --- drivers/platform/x86/intel/int3472/discrete.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c index 09fff213b091..6e2b81da2d68 100644 --- a/drivers/platform/x86/intel/int3472/discrete.c +++ b/drivers/platform/x86/intel/int3472/discrete.c @@ -220,10 +220,10 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares, int3472_get_func_and_polarity(type, &func, &polarity); pin = FIELD_GET(INT3472_GPIO_DSM_PIN, obj->integer.value); - if (pin != agpio->pin_table[0]) - dev_warn(int3472->dev, "%s %s pin number mismatch _DSM %d resource %d\n", - func, agpio->resource_source.string_ptr, pin, - agpio->pin_table[0]); + /* Pin field is not really used under Windows and wraps around at 8 bits */ + if (pin != (agpio->pin_table[0] & 0xff)) + dev_dbg(int3472->dev, FW_BUG "%s %s pin number mismatch _DSM %d resource %d\n", + func, agpio->resource_source.string_ptr, pin, agpio->pin_table[0]); active_value = FIELD_GET(INT3472_GPIO_DSM_SENSOR_ON_VAL, obj->integer.value); if (!active_value) From patchwork Mon Dec 9 22:05:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 13900452 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7420578C9C for ; Mon, 9 Dec 2024 22:05:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733781935; cv=none; b=cZ/ZkSimdMPoZWLbtVcBr5cS75Zbi0TsI+AkzPJaxRbFaE9HscC/mdWaBWQrdZoLejnZMqSc9C5WueTZFELTXYsl+EJfvrQFPzw9iyj2iKIIKa4uoxaqiBPeDWUf5xkZrwswZWP9vuUiJ8TFLNRwwpT1YreNjt3DwfMAqDyOpGk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733781935; c=relaxed/simple; bh=WWbFPiAFwElfiJVrgNLN+suaztbR/Db6EZwrKBMIFeE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dmYtDPy9nODhZDffDUTpq/Odz72me9QFj1WpbFugpdYwPYta84O8TmONBx5MN9gm0F1YIPaD4OsUZlvgXugZOt7LvL6C+VQWe9wu3ExtCHf2E2/7+69WpOfS7vTsOIbzmu2SHFDlQLnpqsEXRQD69aAiMAXbh2NoGwwComAeMh4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ZxOAJeOI; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZxOAJeOI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733781932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CGALN4PUAUgTaVcM63LKTXweykneJB19TUf/d6kMnmI=; b=ZxOAJeOIxuErlQvKKZBahBCem5gBMXIpXkdUrJV33ppDAgmdNnONzeG/3gF1Z7xKSaYp14 mOXnoN/ehVcLcn60Bmjz+5fTLgz0uAFl+S5mvO9FJVEA1L29FLcpFxyqhC+1PGOFfwS/4P 8o5QAsbun/O+bow3uhkDK0zYGLE0vl8= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-333-FJJ_7TJ4N_-cFVEwzibk4Q-1; Mon, 09 Dec 2024 17:05:31 -0500 X-MC-Unique: FJJ_7TJ4N_-cFVEwzibk4Q-1 X-Mimecast-MFC-AGG-ID: FJJ_7TJ4N_-cFVEwzibk4Q Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E8F3619560B0; Mon, 9 Dec 2024 22:05:28 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.3]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 81DED19560A7; Mon, 9 Dec 2024 22:05:27 +0000 (UTC) From: Hans de Goede To: =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Andy Shevchenko Cc: Hans de Goede , platform-driver-x86@vger.kernel.org Subject: [PATCH v2 3/4] platform/x86: int3472: Fix skl_int3472_handle_gpio_resources() return value Date: Mon, 9 Dec 2024 23:05:21 +0100 Message-ID: <20241209220522.25288-3-hdegoede@redhat.com> In-Reply-To: <20241209220522.25288-1-hdegoede@redhat.com> References: <20241209220522.25288-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 The INT3472 code never wants a copy of the ACPI resource to be added to the list-head passed to acpi_dev_get_resources(). Make skl_int3472_handle_gpio_resources() always return -errno or 1. Also update the inaccurate comment about the return value. skl_int3472_handle_gpio_resources() was already returning 1 in the case of not a GPIO resource or invalid _DSM return and not -EINVAL / -ENODEV as the comment claimed. Signed-off-by: Hans de Goede --- Despite the "Fix" in the subject this is not really a bugfix, the old code works fine too, so no Fixes tag --- Changes in v2: - Keep the acpi_dev_free_resource_list() call in place --- drivers/platform/x86/intel/int3472/discrete.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c index 6e2b81da2d68..31015ebe20d8 100644 --- a/drivers/platform/x86/intel/int3472/discrete.c +++ b/drivers/platform/x86/intel/int3472/discrete.c @@ -178,11 +178,11 @@ static void int3472_get_func_and_polarity(u8 type, const char **func, u32 *polar * to create clocks and regulators via the usual frameworks. * * Return: - * * 1 - To continue the loop - * * 0 - When all resources found are handled properly. - * * -EINVAL - If the resource is not a GPIO IO resource - * * -ENODEV - If the resource has no corresponding _DSM entry - * * -Other - Errors propagated from one of the sub-functions. + * * 1 - Continue the loop without adding a copy of the resource to + * * the list passed to acpi_dev_get_resources() + * * 0 - Continue the loop after adding a copy of the resource to + * * the list passed to acpi_dev_get_resources() + * * -errno - Error, break loop */ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares, void *data) @@ -289,7 +289,8 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares, if (ret < 0) return dev_err_probe(int3472->dev, ret, err_msg); - return ret; + /* Tell acpi_dev_get_resources() to not make a copy of the resource */ + return 1; } static int skl_int3472_parse_crs(struct int3472_discrete_device *int3472) From patchwork Mon Dec 9 22:05:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 13900453 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B424919D8A4 for ; Mon, 9 Dec 2024 22:05:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733781937; cv=none; b=M543RpKtcI3d1NhVnSq0yrKUeNwukF+JpyBru8PcO/7N75K1ZLHbWZXZP5ND46RxtB83WEj5aVkQ2Xs2XYwLVCvr/mLbVfJLK/Oa1//oTwF/OzmHZ4913iVqqjJeruy7TcWhDxuBAMu2EARIC5x7l95DpDl89pMhw1Nu+2VapX0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733781937; c=relaxed/simple; bh=76AOEka2W2co8esIXGOMv7O2DlXnHn8kCxhT66TTCls=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sqPfkTvpaQJ9o7Rgw+oFJsTN7g0jUX5NM0xGQfD9f4WM14sXK341eO8yijK5U9g42/RmDHvPtpLLCD1hjD4JBxA5hMCxa3HG8v9Ql3p1UHHVKQbP1V5mnWzeenDa3lQWWCs8ls6cDsqUAc4l0Fwjk4KNWAM20mxB06BE8yIbXyM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=IFo6iTTH; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IFo6iTTH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733781933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zpvK2U0MJ4Iq+VR//nM2mfOPpz5MARTjIJNCfXkuDcg=; b=IFo6iTTHXs+4VsfG11EqEOTU8xrUX5b45mNahTEb7VK1uYm0RpU2ap5wK2qu/y1C/7HiNJ CNyOaIEGFclaSm+uKb78mfaWbaFidGA0/Ql/BtC65BK+V+q3EotRbfS2ylmf+u4bhAEzPQ 3O2TvsYa4OirBZNlmw2dqKa92WtABzo= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-346-EDYm4BpgPSqGktZfW8ClmA-1; Mon, 09 Dec 2024 17:05:31 -0500 X-MC-Unique: EDYm4BpgPSqGktZfW8ClmA-1 X-Mimecast-MFC-AGG-ID: EDYm4BpgPSqGktZfW8ClmA Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A0E6B1956089; Mon, 9 Dec 2024 22:05:30 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.3]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 48DE019560A2; Mon, 9 Dec 2024 22:05:29 +0000 (UTC) From: Hans de Goede To: =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Andy Shevchenko Cc: Hans de Goede , platform-driver-x86@vger.kernel.org Subject: [PATCH v2 4/4] platform/x86: int3472: Debug log the sensor name Date: Mon, 9 Dec 2024 23:05:22 +0100 Message-ID: <20241209220522.25288-4-hdegoede@redhat.com> In-Reply-To: <20241209220522.25288-1-hdegoede@redhat.com> References: <20241209220522.25288-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Debug log the sensor name to make it easier to figure out which INT3472 device is associated with which sensor. Signed-off-by: Hans de Goede --- drivers/platform/x86/intel/int3472/common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/x86/intel/int3472/common.c b/drivers/platform/x86/intel/int3472/common.c index b3a2578e06c1..1638be8fa71e 100644 --- a/drivers/platform/x86/intel/int3472/common.c +++ b/drivers/platform/x86/intel/int3472/common.c @@ -70,6 +70,8 @@ int skl_int3472_get_sensor_adev_and_name(struct device *dev, return -ENODEV; } + dev_dbg(dev, "Sensor name %s\n", acpi_dev_name(sensor)); + *name_ret = devm_kasprintf(dev, GFP_KERNEL, I2C_DEV_NAME_FORMAT, acpi_dev_name(sensor)); if (!*name_ret)