From: "Michał Kępień" <kernel@kempniu.pl>
To: Jonathan Woithe <jwoithe@just42.net>,
Darren Hart <dvhart@infradead.org>,
Andy Shevchenko <andy@infradead.org>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/7] platform/x86: fujitsu-laptop: Rename constants defining hotkey codes
Date: Tue, 27 Feb 2018 22:15:36 +0100 [thread overview]
Message-ID: <20180227211539.5708-5-kernel@kempniu.pl> (raw)
In-Reply-To: <20180227211539.5708-1-kernel@kempniu.pl>
Rename KEYx_CODE constants to EVENT_HKx, so that their names better fit
the OP_GET_EVENTS operation they are used with.
Signed-off-by: Michał Kępień <kernel@kempniu.pl>
---
drivers/platform/x86/fujitsu-laptop.c | 36 +++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 3e824e961260..5f8c89155b51 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -120,11 +120,11 @@
#define STATE_BACKLIGHT_ON 0
/* Scancodes read from the GIRB register */
-#define KEY1_CODE 0x410
-#define KEY2_CODE 0x411
-#define KEY3_CODE 0x412
-#define KEY4_CODE 0x413
-#define KEY5_CODE 0x420
+#define EVENT_HK1 0x410
+#define EVENT_HK2 0x411
+#define EVENT_HK3 0x412
+#define EVENT_HK4 0x413
+#define EVENT_HK5 0x420
/* Hotkey ringbuffer limits */
#define MAX_HOTKEY_RINGBUFFER_SIZE 100
@@ -470,28 +470,28 @@ static void acpi_fujitsu_bl_notify(struct acpi_device *device, u32 event)
/* ACPI device for hotkey handling */
static const struct key_entry keymap_default[] = {
- { KE_KEY, KEY1_CODE, { KEY_PROG1 } },
- { KE_KEY, KEY2_CODE, { KEY_PROG2 } },
- { KE_KEY, KEY3_CODE, { KEY_PROG3 } },
- { KE_KEY, KEY4_CODE, { KEY_PROG4 } },
- { KE_KEY, KEY5_CODE, { KEY_RFKILL } },
+ { KE_KEY, EVENT_HK1, { KEY_PROG1 } },
+ { KE_KEY, EVENT_HK2, { KEY_PROG2 } },
+ { KE_KEY, EVENT_HK3, { KEY_PROG3 } },
+ { KE_KEY, EVENT_HK4, { KEY_PROG4 } },
+ { KE_KEY, EVENT_HK5, { KEY_RFKILL } },
{ KE_KEY, BIT(26), { KEY_TOUCHPAD_TOGGLE } },
{ KE_END, 0 }
};
static const struct key_entry keymap_s64x0[] = {
- { KE_KEY, KEY1_CODE, { KEY_SCREENLOCK } }, /* "Lock" */
- { KE_KEY, KEY2_CODE, { KEY_HELP } }, /* "Mobility Center */
- { KE_KEY, KEY3_CODE, { KEY_PROG3 } },
- { KE_KEY, KEY4_CODE, { KEY_PROG4 } },
+ { KE_KEY, EVENT_HK1, { KEY_SCREENLOCK } }, /* "Lock" */
+ { KE_KEY, EVENT_HK2, { KEY_HELP } }, /* "Mobility Center */
+ { KE_KEY, EVENT_HK3, { KEY_PROG3 } },
+ { KE_KEY, EVENT_HK4, { KEY_PROG4 } },
{ KE_END, 0 }
};
static const struct key_entry keymap_p8010[] = {
- { KE_KEY, KEY1_CODE, { KEY_HELP } }, /* "Support" */
- { KE_KEY, KEY2_CODE, { KEY_PROG2 } },
- { KE_KEY, KEY3_CODE, { KEY_SWITCHVIDEOMODE } }, /* "Presentation" */
- { KE_KEY, KEY4_CODE, { KEY_WWW } }, /* "WWW" */
+ { KE_KEY, EVENT_HK1, { KEY_HELP } }, /* "Support" */
+ { KE_KEY, EVENT_HK2, { KEY_PROG2 } },
+ { KE_KEY, EVENT_HK3, { KEY_SWITCHVIDEOMODE } }, /* "Presentation" */
+ { KE_KEY, EVENT_HK4, { KEY_WWW } }, /* "WWW" */
{ KE_END, 0 }
};
--
2.16.2
next prev parent reply other threads:[~2018-02-27 21:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 21:15 [PATCH 0/7] fujitsu-laptop: Consistent naming of constants Michał Kępień
2018-02-27 21:15 ` [PATCH 1/7] platform/x86: fujitsu-laptop: Define constants for FUNC operations Michał Kępień
2018-02-28 16:08 ` Andy Shevchenko
2018-03-04 5:08 ` Jonathan Woithe
2018-03-04 19:44 ` Michał Kępień
2018-03-04 22:49 ` Jonathan Woithe
2018-03-05 23:16 ` Darren Hart
2018-03-06 9:37 ` Andy Shevchenko
2018-03-06 20:59 ` Michał Kępień
2018-03-07 12:34 ` Andy Shevchenko
2018-03-10 20:10 ` Michał Kępień
2018-03-12 9:27 ` Andy Shevchenko
2018-02-27 21:15 ` [PATCH 2/7] platform/x86: fujitsu-laptop: Define constants for FUNC features Michał Kępień
2018-02-27 21:15 ` [PATCH 3/7] platform/x86: fujitsu-laptop: Define constants for FUNC feature states Michał Kępień
2018-02-27 21:15 ` Michał Kępień [this message]
2018-02-27 21:15 ` [PATCH 5/7] platform/x86: fujitsu-laptop: Tweak how constants are commented and laid out Michał Kępień
2018-02-27 21:15 ` [PATCH 6/7] platform/x86: fujitsu-laptop: More accurately represent the hotkey ring buffer managed by firmware Michał Kępień
2018-02-28 16:13 ` Andy Shevchenko
2018-03-04 19:57 ` Michał Kępień
2018-02-27 21:15 ` [PATCH 7/7] platform/x86: fujitsu-laptop: Introduce fext_*() helper functions Michał Kępień
2018-03-04 5:37 ` [PATCH 0/7] fujitsu-laptop: Consistent naming of constants Jonathan Woithe
2018-03-21 23:25 ` Darren Hart
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=20180227211539.5708-5-kernel@kempniu.pl \
--to=kernel@kempniu.pl \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=jwoithe@just42.net \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).