From: Hans de Goede <hdegoede@redhat.com>
To: "Rafael J . Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Aditya Garg <gargaditya08@live.com>,
Mark Gross <mgross@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
Lukas Wunner <lukas@wunner.de>,
linux-acpi@vger.kernel.org, Andy Shevchenko <andy@infradead.org>,
platform-driver-x86@vger.kernel.org
Subject: [PATCH 1/3] platform/x86: apple-gmux: Move port defines to apple-gmux.h
Date: Mon, 23 Jan 2023 12:37:48 +0100 [thread overview]
Message-ID: <20230123113750.462144-2-hdegoede@redhat.com> (raw)
In-Reply-To: <20230123113750.462144-1-hdegoede@redhat.com>
This is a preparation patch for adding a new static inline
apple_gmux_detect() helper which actually checks a supported
gmux is present, rather then only checking an ACPI device with
the HID is there as apple_gmux_present() does.
Fixes: 21245df307cb ("ACPI: video: Add Apple GMUX brightness control detection")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/platform/x86/apple-gmux.c | 23 -----------------------
include/linux/apple-gmux.h | 23 +++++++++++++++++++++++
2 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
index ca33df7ea550..a0af01f6a0fd 100644
--- a/drivers/platform/x86/apple-gmux.c
+++ b/drivers/platform/x86/apple-gmux.c
@@ -64,29 +64,6 @@ struct apple_gmux_data {
static struct apple_gmux_data *apple_gmux_data;
-/*
- * gmux port offsets. Many of these are not yet used, but may be in the
- * future, and it's useful to have them documented here anyhow.
- */
-#define GMUX_PORT_VERSION_MAJOR 0x04
-#define GMUX_PORT_VERSION_MINOR 0x05
-#define GMUX_PORT_VERSION_RELEASE 0x06
-#define GMUX_PORT_SWITCH_DISPLAY 0x10
-#define GMUX_PORT_SWITCH_GET_DISPLAY 0x11
-#define GMUX_PORT_INTERRUPT_ENABLE 0x14
-#define GMUX_PORT_INTERRUPT_STATUS 0x16
-#define GMUX_PORT_SWITCH_DDC 0x28
-#define GMUX_PORT_SWITCH_EXTERNAL 0x40
-#define GMUX_PORT_SWITCH_GET_EXTERNAL 0x41
-#define GMUX_PORT_DISCRETE_POWER 0x50
-#define GMUX_PORT_MAX_BRIGHTNESS 0x70
-#define GMUX_PORT_BRIGHTNESS 0x74
-#define GMUX_PORT_VALUE 0xc2
-#define GMUX_PORT_READ 0xd0
-#define GMUX_PORT_WRITE 0xd4
-
-#define GMUX_MIN_IO_LEN (GMUX_PORT_BRIGHTNESS + 4)
-
#define GMUX_INTERRUPT_ENABLE 0xff
#define GMUX_INTERRUPT_DISABLE 0x00
diff --git a/include/linux/apple-gmux.h b/include/linux/apple-gmux.h
index ddb10aa67b14..80efaaf89e07 100644
--- a/include/linux/apple-gmux.h
+++ b/include/linux/apple-gmux.h
@@ -11,6 +11,29 @@
#define GMUX_ACPI_HID "APP000B"
+/*
+ * gmux port offsets. Many of these are not yet used, but may be in the
+ * future, and it's useful to have them documented here anyhow.
+ */
+#define GMUX_PORT_VERSION_MAJOR 0x04
+#define GMUX_PORT_VERSION_MINOR 0x05
+#define GMUX_PORT_VERSION_RELEASE 0x06
+#define GMUX_PORT_SWITCH_DISPLAY 0x10
+#define GMUX_PORT_SWITCH_GET_DISPLAY 0x11
+#define GMUX_PORT_INTERRUPT_ENABLE 0x14
+#define GMUX_PORT_INTERRUPT_STATUS 0x16
+#define GMUX_PORT_SWITCH_DDC 0x28
+#define GMUX_PORT_SWITCH_EXTERNAL 0x40
+#define GMUX_PORT_SWITCH_GET_EXTERNAL 0x41
+#define GMUX_PORT_DISCRETE_POWER 0x50
+#define GMUX_PORT_MAX_BRIGHTNESS 0x70
+#define GMUX_PORT_BRIGHTNESS 0x74
+#define GMUX_PORT_VALUE 0xc2
+#define GMUX_PORT_READ 0xd0
+#define GMUX_PORT_WRITE 0xd4
+
+#define GMUX_MIN_IO_LEN (GMUX_PORT_BRIGHTNESS + 4)
+
#if IS_ENABLED(CONFIG_APPLE_GMUX)
/**
--
2.39.0
next prev parent reply other threads:[~2023-01-23 11:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 11:37 [PATCH 0/3] ACPI: video/apple-gmux: Improve apple-gmux backlight detection Hans de Goede
2023-01-23 11:37 ` Hans de Goede [this message]
2023-01-23 11:37 ` [PATCH 2/3] platform/x86: apple-gmux: Add apple_gmux_detect() helper Hans de Goede
2023-01-23 13:49 ` Lukas Wunner
2023-01-23 14:13 ` Hans de Goede
2023-01-23 14:23 ` Lukas Wunner
2023-01-23 15:05 ` Hans de Goede
2023-01-23 15:10 ` Hans de Goede
2023-01-23 16:35 ` Andy Shevchenko
2023-01-23 11:37 ` [PATCH 3/3] ACPI: video: Fix apple gmux detection Hans de Goede
2023-01-23 16:37 ` Andy Shevchenko
2023-01-23 17:25 ` Hans de Goede
2023-01-23 19:20 ` Rafael J. Wysocki
2023-01-23 12:09 ` [PATCH 0/3] ACPI: video/apple-gmux: Improve apple-gmux backlight detection Lukas Wunner
2023-01-23 12:38 ` Hans de Goede
2023-01-23 13:58 ` Lukas Wunner
2023-01-23 15:05 ` Hans de Goede
2023-01-23 14:53 ` Aditya Garg
2023-01-24 8:21 ` Orlando Chamberlain
2023-01-24 10:26 ` Aditya Garg
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=20230123113750.462144-2-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy@infradead.org \
--cc=gargaditya08@live.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mgross@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@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