From: Hans de Goede <hdegoede@redhat.com>
To: "Andy Shevchenko" <andy@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Dan Scally" <dan.scally@ideasonboard.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
platform-driver-x86@vger.kernel.org, linux-media@vger.kernel.org
Subject: [PATCH 1/2] platform/x86: int3472: discrete: Fix getting active_value
Date: Mon, 12 Jun 2023 16:16:31 +0200 [thread overview]
Message-ID: <20230612141632.5232-1-hdegoede@redhat.com> (raw)
acpi_object.integer.value is 64 bit, so to get bits 31-24
the value not only needs to be shifted but also masked.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/platform/x86/intel/int3472/discrete.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
index fc839a73e411..4ef60883154d 100644
--- a/drivers/platform/x86/intel/int3472/discrete.c
+++ b/drivers/platform/x86/intel/int3472/discrete.c
@@ -179,7 +179,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
int3472_get_func_and_polarity(type, &func, &polarity);
/* If bits 31-24 of the _DSM entry are all 0 then the signal is inverted */
- active_value = obj->integer.value >> 24;
+ active_value = (obj->integer.value >> 24) & 0xff;
if (!active_value)
polarity ^= GPIO_ACTIVE_LOW;
--
2.40.1
next reply other threads:[~2023-06-12 14:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 14:16 Hans de Goede [this message]
2023-06-12 14:16 ` [PATCH 2/2] platform/x86: int3472: discrete: Log a warning if the pin-numbers don't match Hans de Goede
2023-06-12 14:20 ` Andy Shevchenko
2023-06-12 14:20 ` Dan Scally
2023-06-12 15:26 ` Hans de Goede
2023-06-12 15:30 ` Dan Scally
2023-06-12 15:36 ` Hans de Goede
2023-06-13 8:10 ` Ilpo Järvinen
2023-06-13 11:02 ` Hans de Goede
2023-06-12 14:18 ` [PATCH 1/2] platform/x86: int3472: discrete: Fix getting active_value Andy Shevchenko
2023-06-12 15:25 ` Hans de Goede
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=20230612141632.5232-1-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy@kernel.org \
--cc=dan.scally@ideasonboard.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-media@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/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