From: Hans de Goede <hdegoede@redhat.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Andy Shevchenko" <andy@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
Dan Scally <djrscally@gmail.com>,
Alan Stern <stern@rowland.harvard.edu>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Hao Yao <hao.yao@intel.com>, Bingbu Cao <bingbu.cao@intel.com>,
platform-driver-x86@vger.kernel.org, linux-media@vger.kernel.org
Subject: [PATCH 8/8] platform/x86: int3472: Debug log when remapping pins
Date: Tue, 25 Mar 2025 17:13:40 +0100 [thread overview]
Message-ID: <20250325161340.342192-9-hdegoede@redhat.com> (raw)
In-Reply-To: <20250325161340.342192-1-hdegoede@redhat.com>
Debug log when remapping a pin/function because of a int3472_gpio_map[]
match.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/platform/x86/intel/int3472/discrete.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
index 903b35f999d0..eab4235f4b38 100644
--- a/drivers/platform/x86/intel/int3472/discrete.c
+++ b/drivers/platform/x86/intel/int3472/discrete.c
@@ -146,9 +146,10 @@ static const struct int3472_gpio_map int3472_gpio_map[] = {
{ "INT347E", INT3472_GPIO_TYPE_RESET, INT3472_GPIO_TYPE_RESET, false, "enable" },
};
-static void int3472_get_con_id_and_polarity(struct acpi_device *adev, u8 *type,
+static void int3472_get_con_id_and_polarity(struct int3472_discrete_device *int3472, u8 *type,
const char **con_id, unsigned long *gpio_flags)
{
+ struct acpi_device *adev = int3472->sensor;
unsigned int i;
for (i = 0; i < ARRAY_SIZE(int3472_gpio_map); i++) {
@@ -163,6 +164,9 @@ static void int3472_get_con_id_and_polarity(struct acpi_device *adev, u8 *type,
if (!acpi_dev_hid_uid_match(adev, int3472_gpio_map[i].hid, NULL))
continue;
+ dev_dbg(int3472->dev, "mapping type 0x%02x pin to 0x%02x %s\n",
+ *type, int3472_gpio_map[i].type_to, int3472_gpio_map[i].con_id);
+
*type = int3472_gpio_map[i].type_to;
*gpio_flags = int3472_gpio_map[i].polarity_low ?
GPIO_ACTIVE_LOW : GPIO_ACTIVE_HIGH;
@@ -267,7 +271,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
type = FIELD_GET(INT3472_GPIO_DSM_TYPE, obj->integer.value);
- int3472_get_con_id_and_polarity(int3472->sensor, &type, &con_id, &gpio_flags);
+ int3472_get_con_id_and_polarity(int3472, &type, &con_id, &gpio_flags);
pin = FIELD_GET(INT3472_GPIO_DSM_PIN, obj->integer.value);
/* Pin field is not really used under Windows and wraps around at 8 bits */
--
2.49.0
prev parent reply other threads:[~2025-03-25 16:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 16:13 [PATCH 0/8] platform/x86: int3472: Add handshake pin support Hans de Goede
2025-03-25 16:13 ` [PATCH 1/8] platform/x86: int3472: Add skl_int3472_register_clock() helper Hans de Goede
2025-03-25 16:43 ` Andy Shevchenko
2025-03-25 16:13 ` [PATCH 2/8] platform/x86: int3472: Stop setting a supply-name for GPIO regulators Hans de Goede
2025-03-25 16:44 ` Andy Shevchenko
2025-03-25 16:13 ` [PATCH 3/8] platform/x86: int3472: Drop unused gpio field from struct int3472_gpio_regulator Hans de Goede
2025-03-25 16:47 ` Andy Shevchenko
2025-03-25 16:13 ` [PATCH 4/8] platform/x86: int3472: Rework AVDD second sensor quirk handling Hans de Goede
2025-03-25 16:13 ` [PATCH 5/8] platform/x86: int3472: Make regulator supply name configurable Hans de Goede
2025-03-25 16:53 ` Andy Shevchenko
2025-03-25 18:08 ` Hans de Goede
2025-03-25 16:13 ` [PATCH 6/8] platform/x86: int3472: Prepare for registering more then 1 GPIO regulator Hans de Goede
2025-03-25 16:13 ` [PATCH 7/8] platform/x86: int3472: Add handshake pin support Hans de Goede
2025-03-25 16:13 ` Hans de Goede [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250325161340.342192-9-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy@kernel.org \
--cc=bingbu.cao@intel.com \
--cc=djrscally@gmail.com \
--cc=hao.yao@intel.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-media@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox