From: Andreas Jaggi <andreas.jaggi@waterwave.ch>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
debian-powerpc@lists.debian.org,
linux-input@atrey.karlen.mff.cuni.cz
Subject: [PATCH 2.6.11.7] macintosh/adbhid.c: adb buttons support for aluminium PowerBook G4
Date: Sun, 17 Apr 2005 15:42:23 +0200 [thread overview]
Message-ID: <20050417154223.6d1af254@localhost> (raw)
Hi,
This patch adds support for the special adb buttons of the aluminium
PowerBook G4.
Signed-off-by: Andreas Jaggi <andreas.jaggi@waterwave.ch>
diff -uNr a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c
--- a/drivers/macintosh/adbhid.c 2005-04-09 22:49:49.000000000 +0200
+++ b/drivers/macintosh/adbhid.c 2005-04-10 15:27:54.000000000 +0200
@@ -555,6 +555,42 @@
#endif /* CONFIG_PMAC_BACKLIGHT */
input_report_key(&adbhid[id]->input, KEY_BRIGHTNESSUP, down);
break;
+
+ case 0xc: /* videomode switch */
+ input_report_key(&adbhid[id]->input, KEY_SWITCHVIDEOMODE, down);
+ break;
+
+ case 0xd: /* keyboard illumination toggle */
+ input_report_key(&adbhid[id]->input, KEY_KBDILLUMTOGGLE, down);
+ break;
+
+ case 0xe: /* keyboard illumination decrease */
+ input_report_key(&adbhid[id]->input, KEY_KBDILLUMDOWN, down);
+ break;
+
+ case 0xf:
+ switch (data[1]) {
+ case 0x8f:
+ case 0x0f:
+ /* keyboard illumination increase */
+ input_report_key(&adbhid[id]->input, KEY_KBDILLUMUP, down);
+ break;
+
+ case 0x7f:
+ case 0xff:
+ /* keypad overlay toogle */
+ break;
+
+ default:
+ printk(KERN_INFO "Unhandled ADB_MISC event %02x, %02x, %02x, %02x\n",
+ data[0], data[1], data[2], data[3]);
+ break;
+ }
+ break;
+ default:
+ printk(KERN_INFO "Unhandled ADB_MISC event %02x, %02x, %02x, %02x\n",
+ data[0], data[1], data[2], data[3]);
+ break;
}
}
break;
@@ -775,6 +811,10 @@
set_bit(KEY_BRIGHTNESSUP, adbhid[id]->input.keybit);
set_bit(KEY_BRIGHTNESSDOWN, adbhid[id]->input.keybit);
set_bit(KEY_EJECTCD, adbhid[id]->input.keybit);
+ set_bit(KEY_SWITCHVIDEOMODE, adbhid[id]->input.keybit);
+ set_bit(KEY_KBDILLUMTOGGLE, adbhid[id]->input.keybit);
+ set_bit(KEY_KBDILLUMDOWN, adbhid[id]->input.keybit);
+ set_bit(KEY_KBDILLUMUP, adbhid[id]->input.keybit);
break;
}
if (adbhid[id]->name[0])
diff -uNr a/include/linux/input.h b/include/linux/input.h
--- a/include/linux/input.h 2005-04-09 22:49:49.000000000 +0200
+++ b/include/linux/input.h 2005-04-10 15:28:33.214974136 +0200
@@ -328,6 +328,11 @@
#define KEY_BRIGHTNESSUP 225
#define KEY_MEDIA 226
+#define KEY_SWITCHVIDEOMODE 227
+#define KEY_KBDILLUMTOGGLE 228
+#define KEY_KBDILLUMDOWN 229
+#define KEY_KBDILLUMUP 230
+
#define KEY_UNKNOWN 240
#define BTN_MISC 0x100
WARNING: multiple messages have this Message-ID (diff)
From: Andreas Jaggi <andreas.jaggi@waterwave.ch>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Andrew Morton <akpm@osdl.org>,
linux-input@atrey.karlen.mff.cuni.cz,
linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
debian-powerpc@lists.debian.org
Subject: [PATCH 2.6.11.7] macintosh/adbhid.c: adb buttons support for aluminium PowerBook G4
Date: Sun, 17 Apr 2005 15:42:23 +0200 [thread overview]
Message-ID: <20050417154223.6d1af254@localhost> (raw)
Hi,
This patch adds support for the special adb buttons of the aluminium
PowerBook G4.
Signed-off-by: Andreas Jaggi <andreas.jaggi@waterwave.ch>
diff -uNr a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c
--- a/drivers/macintosh/adbhid.c 2005-04-09 22:49:49.000000000 +0200
+++ b/drivers/macintosh/adbhid.c 2005-04-10 15:27:54.000000000 +0200
@@ -555,6 +555,42 @@
#endif /* CONFIG_PMAC_BACKLIGHT */
input_report_key(&adbhid[id]->input, KEY_BRIGHTNESSUP, down);
break;
+
+ case 0xc: /* videomode switch */
+ input_report_key(&adbhid[id]->input, KEY_SWITCHVIDEOMODE, down);
+ break;
+
+ case 0xd: /* keyboard illumination toggle */
+ input_report_key(&adbhid[id]->input, KEY_KBDILLUMTOGGLE, down);
+ break;
+
+ case 0xe: /* keyboard illumination decrease */
+ input_report_key(&adbhid[id]->input, KEY_KBDILLUMDOWN, down);
+ break;
+
+ case 0xf:
+ switch (data[1]) {
+ case 0x8f:
+ case 0x0f:
+ /* keyboard illumination increase */
+ input_report_key(&adbhid[id]->input, KEY_KBDILLUMUP, down);
+ break;
+
+ case 0x7f:
+ case 0xff:
+ /* keypad overlay toogle */
+ break;
+
+ default:
+ printk(KERN_INFO "Unhandled ADB_MISC event %02x, %02x, %02x, %02x\n",
+ data[0], data[1], data[2], data[3]);
+ break;
+ }
+ break;
+ default:
+ printk(KERN_INFO "Unhandled ADB_MISC event %02x, %02x, %02x, %02x\n",
+ data[0], data[1], data[2], data[3]);
+ break;
}
}
break;
@@ -775,6 +811,10 @@
set_bit(KEY_BRIGHTNESSUP, adbhid[id]->input.keybit);
set_bit(KEY_BRIGHTNESSDOWN, adbhid[id]->input.keybit);
set_bit(KEY_EJECTCD, adbhid[id]->input.keybit);
+ set_bit(KEY_SWITCHVIDEOMODE, adbhid[id]->input.keybit);
+ set_bit(KEY_KBDILLUMTOGGLE, adbhid[id]->input.keybit);
+ set_bit(KEY_KBDILLUMDOWN, adbhid[id]->input.keybit);
+ set_bit(KEY_KBDILLUMUP, adbhid[id]->input.keybit);
break;
}
if (adbhid[id]->name[0])
diff -uNr a/include/linux/input.h b/include/linux/input.h
--- a/include/linux/input.h 2005-04-09 22:49:49.000000000 +0200
+++ b/include/linux/input.h 2005-04-10 15:28:33.214974136 +0200
@@ -328,6 +328,11 @@
#define KEY_BRIGHTNESSUP 225
#define KEY_MEDIA 226
+#define KEY_SWITCHVIDEOMODE 227
+#define KEY_KBDILLUMTOGGLE 228
+#define KEY_KBDILLUMDOWN 229
+#define KEY_KBDILLUMUP 230
+
#define KEY_UNKNOWN 240
#define BTN_MISC 0x100
next reply other threads:[~2005-04-17 14:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-17 13:42 Andreas Jaggi [this message]
2005-04-17 13:42 ` [PATCH 2.6.11.7] macintosh/adbhid.c: adb buttons support for aluminium PowerBook G4 Andreas Jaggi
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=20050417154223.6d1af254@localhost \
--to=andreas.jaggi@waterwave.ch \
--cc=akpm@osdl.org \
--cc=debian-powerpc@lists.debian.org \
--cc=linux-input@atrey.karlen.mff.cuni.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=vojtech@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.