Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b07a73e9
Commit
b07a73e9
authored
Jul 13, 2002
by
Vojtech Pavlik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Franz Sirl's ADB/PPC keyboard handling update - move fully
to using the input core
parent
ab308751
Changes
21
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
148 additions
and
675 deletions
+148
-675
arch/ppc/4xx_io/stb_kb.c
arch/ppc/4xx_io/stb_kb.c
+0
-4
arch/ppc/Config.help
arch/ppc/Config.help
+19
-42
arch/ppc/config.in
arch/ppc/config.in
+1
-4
arch/ppc/kernel/m8260_setup.c
arch/ppc/kernel/m8260_setup.c
+0
-8
arch/ppc/kernel/m8xx_setup.c
arch/ppc/kernel/m8xx_setup.c
+0
-8
arch/ppc/kernel/ppc4xx_setup.c
arch/ppc/kernel/ppc4xx_setup.c
+0
-16
arch/ppc/kernel/setup.c
arch/ppc/kernel/setup.c
+1
-1
arch/ppc/platforms/apus_setup.c
arch/ppc/platforms/apus_setup.c
+0
-7
arch/ppc/platforms/chrp_setup.c
arch/ppc/platforms/chrp_setup.c
+4
-26
arch/ppc/platforms/gemini_setup.c
arch/ppc/platforms/gemini_setup.c
+0
-8
arch/ppc/platforms/iSeries_setup.c
arch/ppc/platforms/iSeries_setup.c
+0
-10
arch/ppc/platforms/oak_setup.c
arch/ppc/platforms/oak_setup.c
+0
-8
arch/ppc/platforms/pmac_setup.c
arch/ppc/platforms/pmac_setup.c
+0
-49
arch/ppc/platforms/pplus_setup.c
arch/ppc/platforms/pplus_setup.c
+0
-22
arch/ppc/platforms/prep_setup.c
arch/ppc/platforms/prep_setup.c
+0
-22
arch/ppc/platforms/sandpoint_setup.c
arch/ppc/platforms/sandpoint_setup.c
+0
-22
arch/ppc/platforms/spruce_setup.c
arch/ppc/platforms/spruce_setup.c
+0
-21
drivers/macintosh/adbhid.c
drivers/macintosh/adbhid.c
+59
-26
drivers/macintosh/mac_hid.c
drivers/macintosh/mac_hid.c
+51
-350
include/asm-ppc/keyboard.h
include/asm-ppc/keyboard.h
+13
-15
include/asm-ppc/machdep.h
include/asm-ppc/machdep.h
+0
-6
No files found.
arch/ppc/4xx_io/stb_kb.c
View file @
b07a73e9
...
@@ -283,11 +283,7 @@ void redwood_irkb_init(void)
...
@@ -283,11 +283,7 @@ void redwood_irkb_init(void)
{
{
extern
struct
machdep_calls
ppc_md
;
extern
struct
machdep_calls
ppc_md
;
ppc_md
.
kbd_setkeycode
=
rawirkbd_setkeycode
;
ppc_md
.
kbd_getkeycode
=
rawirkbd_getkeycode
;
ppc_md
.
kbd_translate
=
rawirkbd_translate
;
ppc_md
.
kbd_translate
=
rawirkbd_translate
;
ppc_md
.
kbd_unexpected_up
=
rawirkbd_unexpected_up
;
ppc_md
.
kbd_unexpected_up
=
rawirkbd_unexpected_up
;
ppc_md
.
kbd_leds
=
NULL
;
/*rawirkbd_leds;*/
ppc_md
.
kbd_init_hw
=
rawirkbd_init_hw
;
}
}
arch/ppc/Config.help
View file @
b07a73e9
...
@@ -321,19 +321,6 @@ CONFIG_CD_NO_IDESCSI
...
@@ -321,19 +321,6 @@ CONFIG_CD_NO_IDESCSI
answer will get "defaulted" for you if you enable any of the Linux
answer will get "defaulted" for you if you enable any of the Linux
CD-ROM drivers).
CD-ROM drivers).
CONFIG_INPUT_ADBHID
Say Y here if you want to have ADB (Apple Desktop Bus) HID devices
such as keyboards, mice, joysticks, or graphic tablets handled by
the input layer. If you say Y here, make sure to say Y to the
corresponding drivers "Keyboard support" (CONFIG_INPUT_KEYBDEV),
"Mouse Support" (CONFIG_INPUT_MOUSEDEV) and "Event interface
support" (CONFIG_INPUT_EVDEV) as well.
If you say N here, you still have the option of using the old ADB
keyboard and mouse drivers.
If unsure, say Y.
CONFIG_PREP_RESIDUAL
CONFIG_PREP_RESIDUAL
Some PReP systems have residual data passed to the kernel by the
Some PReP systems have residual data passed to the kernel by the
firmware. This allows detection of memory size, devices present and
firmware. This allows detection of memory size, devices present and
...
@@ -382,14 +369,26 @@ CONFIG_ADB_MACIO
...
@@ -382,14 +369,26 @@ CONFIG_ADB_MACIO
also includes a MESH II SCSI controller, DBDMA controller, VIA chip,
also includes a MESH II SCSI controller, DBDMA controller, VIA chip,
OpenPIC controller and two RS422/Geoports.)
OpenPIC controller and two RS422/Geoports.)
CONFIG_ADB_KEYBOARD
CONFIG_INPUT_ADBHID
This option allows you to use an ADB keyboard attached to your
Say Y here if you want to have ADB (Apple Desktop Bus) HID devices
machine. Note that this disables any other (ie. PS/2) keyboard
such as keyboards, mice, joysticks, trackpads or graphic tablets
support, even if your machine is physically capable of using both at
handled by the input layer. If you say Y here, make sure to say Y to
the same time.
the corresponding drivers "Keyboard support" (CONFIG_INPUT_KEYBDEV),
"Mouse Support" (CONFIG_INPUT_MOUSEDEV) and "Event interface
support" (CONFIG_INPUT_EVDEV) as well.
If unsure, say Y.
CONFIG_MAC_EMUMOUSEBTN
This provides generic support for emulating the 2nd and 3rd mouse
button with keypresses. If you say Y here, the emulation is still
disabled by default. The emulation is controlled by these sysctl
entries:
/proc/sys/dev/mac_hid/mouse_button_emulation
/proc/sys/dev/mac_hid/mouse_button2_keycode
/proc/sys/dev/mac_hid/mouse_button3_keycode
If you use an ADB keyboard (4 pin connector), say Y here.
If you have an Apple machine with a 1-button mouse, say Y here.
If you use a PS/2 keyboard (6 pin connector), say N here.
CONFIG_SERIAL_CONSOLE
CONFIG_SERIAL_CONSOLE
If you say Y here, it will be possible to use a serial port as the
If you say Y here, it will be possible to use a serial port as the
...
@@ -886,28 +885,6 @@ CONFIG_EST8260
...
@@ -886,28 +885,6 @@ CONFIG_EST8260
End of life: -
End of life: -
URL: <http://www.microsys.de/html/cu824.html>
URL: <http://www.microsys.de/html/cu824.html>
CONFIG_MAC_ADBKEYCODES
This provides support for sending ADB keycodes to console devices in
raw mode, rather than generic "Linux" keycodes. This is the default
up to 2.4.0, but in future this may be phased out in favor of
generic Linux keycodes. If you say Y here, you can dynamically
switch via the /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
sysctl and with the "keyboard_sends_linux_keycodes=" kernel
argument.
If unsure, say Y here.
CONFIG_MAC_EMUMOUSEBTN
This provides generic support for emulating the 2nd and 3rd mouse
button with keypresses. If you say Y here, the emulation is still
disabled by default. The emulation is controlled by these sysctl
entries:
/proc/sys/dev/mac_hid/mouse_button_emulation
/proc/sys/dev/mac_hid/mouse_button2_keycode
/proc/sys/dev/mac_hid/mouse_button3_keycode
If you have an Apple machine with a 1-button mouse, say Y here.
CONFIG_PPC_RTC
CONFIG_PPC_RTC
If you say Y here and create a character special file /dev/rtc with
If you say Y here and create a character special file /dev/rtc with
major number 10 and minor number 135 using mknod ("man mknod"), you
major number 10 and minor number 135 using mknod ("man mknod"), you
...
...
arch/ppc/config.in
View file @
b07a73e9
...
@@ -536,12 +536,9 @@ if [ "$CONFIG_ALL_PPC" = "y" ]; then
...
@@ -536,12 +536,9 @@ if [ "$CONFIG_ALL_PPC" = "y" ]; then
bool 'Apple Desktop Bus (ADB) support' CONFIG_ADB
bool 'Apple Desktop Bus (ADB) support' CONFIG_ADB
if [ "$CONFIG_ADB" = "y" ]; then
if [ "$CONFIG_ADB" = "y" ]; then
bool ' Include MacIO (CHRP) ADB driver' CONFIG_ADB_MACIO
bool ' Include MacIO (CHRP) ADB driver' CONFIG_ADB_MACIO
dep_bool '
Use input layer for ADB devices
' CONFIG_INPUT_ADBHID $CONFIG_INPUT
dep_bool '
Support for ADB input devices (keyboard, mice, ...)
' CONFIG_INPUT_ADBHID $CONFIG_INPUT
if [ "$CONFIG_INPUT_ADBHID" = "y" ]; then
if [ "$CONFIG_INPUT_ADBHID" = "y" ]; then
bool ' Support for ADB raw keycodes' CONFIG_MAC_ADBKEYCODES
bool ' Support for mouse button 2+3 emulation' CONFIG_MAC_EMUMOUSEBTN
bool ' Support for mouse button 2+3 emulation' CONFIG_MAC_EMUMOUSEBTN
else
bool ' Support for ADB keyboard (old driver)' CONFIG_ADB_KEYBOARD
fi
fi
fi
fi
# This is for drivers/macintosh/mac_hid.o, which is needed if the input
# This is for drivers/macintosh/mac_hid.o, which is needed if the input
...
...
arch/ppc/kernel/m8260_setup.c
View file @
b07a73e9
...
@@ -266,14 +266,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -266,14 +266,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md
.
find_end_of_memory
=
m8260_find_end_of_memory
;
ppc_md
.
find_end_of_memory
=
m8260_find_end_of_memory
;
ppc_md
.
setup_io_mappings
=
m8260_map_io
;
ppc_md
.
setup_io_mappings
=
m8260_map_io
;
ppc_md
.
kbd_setkeycode
=
NULL
;
ppc_md
.
kbd_getkeycode
=
NULL
;
ppc_md
.
kbd_translate
=
NULL
;
ppc_md
.
kbd_unexpected_up
=
NULL
;
ppc_md
.
kbd_leds
=
NULL
;
ppc_md
.
kbd_init_hw
=
NULL
;
ppc_md
.
ppc_kbd_sysrq_xlate
=
NULL
;
}
}
/* Mainly for ksyms.
/* Mainly for ksyms.
...
...
arch/ppc/kernel/m8xx_setup.c
View file @
b07a73e9
...
@@ -396,14 +396,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -396,14 +396,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md
.
find_end_of_memory
=
m8xx_find_end_of_memory
;
ppc_md
.
find_end_of_memory
=
m8xx_find_end_of_memory
;
ppc_md
.
setup_io_mappings
=
m8xx_map_io
;
ppc_md
.
setup_io_mappings
=
m8xx_map_io
;
ppc_md
.
kbd_setkeycode
=
NULL
;
ppc_md
.
kbd_getkeycode
=
NULL
;
ppc_md
.
kbd_translate
=
NULL
;
ppc_md
.
kbd_unexpected_up
=
NULL
;
ppc_md
.
kbd_leds
=
NULL
;
ppc_md
.
kbd_init_hw
=
NULL
;
ppc_md
.
ppc_kbd_sysrq_xlate
=
NULL
;
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
m8xx_ide_init
();
m8xx_ide_init
();
#endif
#endif
...
...
arch/ppc/kernel/ppc4xx_setup.c
View file @
b07a73e9
...
@@ -59,15 +59,6 @@
...
@@ -59,15 +59,6 @@
extern
void
abort
(
void
);
extern
void
abort
(
void
);
extern
void
ppc4xx_find_bridges
(
void
);
extern
void
ppc4xx_find_bridges
(
void
);
extern
int
pckbd_setkeycode
(
unsigned
int
scancode
,
unsigned
int
keycode
);
extern
int
pckbd_getkeycode
(
unsigned
int
scancode
);
extern
int
pckbd_pretranslate
(
unsigned
char
scancode
,
char
raw_mode
);
extern
int
pckbd_translate
(
unsigned
char
scancode
,
unsigned
char
*
keycode
,
char
raw_mode
);
extern
char
pckbd_unexpected_up
(
unsigned
char
keycode
);
extern
void
pckbd_leds
(
unsigned
char
leds
);
extern
void
pckbd_init_hw
(
void
);
extern
void
ppc4xx_wdt_heartbeat
(
void
);
extern
void
ppc4xx_wdt_heartbeat
(
void
);
extern
int
wdt_enable
;
extern
int
wdt_enable
;
extern
unsigned
long
wdt_period
;
extern
unsigned
long
wdt_period
;
...
@@ -357,13 +348,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -357,13 +348,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
#if defined(CONFIG_VT) && defined(CONFIG_PC_KEYBOARD)
#if defined(CONFIG_VT) && defined(CONFIG_PC_KEYBOARD)
#if defined(CONFIG_REDWOOD_4) && defined(CONFIG_STB_KB)
#if defined(CONFIG_REDWOOD_4) && defined(CONFIG_STB_KB)
redwood_irkb_init
();
redwood_irkb_init
();
#else
ppc_md
.
kbd_setkeycode
=
pckbd_setkeycode
;
ppc_md
.
kbd_getkeycode
=
pckbd_getkeycode
;
ppc_md
.
kbd_translate
=
pckbd_translate
;
ppc_md
.
kbd_unexpected_up
=
pckbd_unexpected_up
;
ppc_md
.
kbd_leds
=
pckbd_leds
;
ppc_md
.
kbd_init_hw
=
pckbd_init_hw
;
#endif
#endif
#endif
#endif
...
...
arch/ppc/kernel/setup.c
View file @
b07a73e9
...
@@ -83,7 +83,7 @@ extern void chrp_init(unsigned long r3, unsigned long r4,
...
@@ -83,7 +83,7 @@ extern void chrp_init(unsigned long r3, unsigned long r4,
#endif
/* CONFIG_ALL_PPC */
#endif
/* CONFIG_ALL_PPC */
#ifdef CONFIG_MAGIC_SYSRQ
#ifdef CONFIG_MAGIC_SYSRQ
unsigned
long
SYSRQ_KEY
;
unsigned
long
SYSRQ_KEY
=
0x54
;
#endif
/* CONFIG_MAGIC_SYSRQ */
#endif
/* CONFIG_MAGIC_SYSRQ */
#ifdef CONFIG_VGA_CONSOLE
#ifdef CONFIG_VGA_CONSOLE
...
...
arch/ppc/platforms/apus_setup.c
View file @
b07a73e9
...
@@ -854,13 +854,6 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -854,13 +854,6 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
/* These should not be used for the APUS yet, since it uses
/* These should not be used for the APUS yet, since it uses
the M68K keyboard now. */
the M68K keyboard now. */
ppc_md
.
kbd_setkeycode
=
apus_kbd_setkeycode
;
ppc_md
.
kbd_getkeycode
=
apus_kbd_getkeycode
;
ppc_md
.
kbd_translate
=
amiga_kbd_translate
;
ppc_md
.
kbd_translate
=
amiga_kbd_translate
;
ppc_md
.
kbd_unexpected_up
=
apus_kbd_unexpected_up
;
ppc_md
.
kbd_unexpected_up
=
apus_kbd_unexpected_up
;
ppc_md
.
kbd_init_hw
=
apus_kbd_init_hw
;
#ifdef CONFIG_SYSRQ
ppc_md
.
ppc_kbd_sysrq_xlate
=
amiga_sysrq_xlate
;
SYSRQ_KEY
=
0xff
;
#endif
}
}
arch/ppc/platforms/chrp_setup.c
View file @
b07a73e9
...
@@ -69,14 +69,6 @@ void rtas_indicator_progress(char *, unsigned short);
...
@@ -69,14 +69,6 @@ void rtas_indicator_progress(char *, unsigned short);
void
btext_progress
(
char
*
,
unsigned
short
);
void
btext_progress
(
char
*
,
unsigned
short
);
extern
unsigned
long
pmac_find_end_of_memory
(
void
);
extern
unsigned
long
pmac_find_end_of_memory
(
void
);
extern
int
pckbd_setkeycode
(
unsigned
int
scancode
,
unsigned
int
keycode
);
extern
int
pckbd_getkeycode
(
unsigned
int
scancode
);
extern
int
pckbd_translate
(
unsigned
char
scancode
,
unsigned
char
*
keycode
,
char
raw_mode
);
extern
char
pckbd_unexpected_up
(
unsigned
char
keycode
);
extern
void
pckbd_leds
(
unsigned
char
leds
);
extern
void
pckbd_init_hw
(
void
);
extern
unsigned
char
pckbd_sysrq_xlate
[
128
];
extern
void
select_adb_keyboard
(
void
);
extern
void
select_adb_keyboard
(
void
);
extern
int
of_show_percpuinfo
(
struct
seq_file
*
,
int
);
extern
int
of_show_percpuinfo
(
struct
seq_file
*
,
int
);
...
@@ -389,7 +381,7 @@ void __init chrp_init_IRQ(void)
...
@@ -389,7 +381,7 @@ void __init chrp_init_IRQ(void)
int
i
;
int
i
;
unsigned
long
chrp_int_ack
;
unsigned
long
chrp_int_ack
;
unsigned
char
init_senses
[
NR_IRQS
-
NUM_8259_INTERRUPTS
];
unsigned
char
init_senses
[
NR_IRQS
-
NUM_8259_INTERRUPTS
];
#if defined(CONFIG_VT) && defined(CONFIG_
ADB_KEYBOAR
D) && defined(XMON)
#if defined(CONFIG_VT) && defined(CONFIG_
INPUT_ADBHI
D) && defined(XMON)
struct
device_node
*
kbd
;
struct
device_node
*
kbd
;
#endif
#endif
...
@@ -417,7 +409,7 @@ void __init chrp_init_IRQ(void)
...
@@ -417,7 +409,7 @@ void __init chrp_init_IRQ(void)
irq_desc
[
i
].
handler
=
&
i8259_pic
;
irq_desc
[
i
].
handler
=
&
i8259_pic
;
i8259_init
(
chrp_int_ack
);
i8259_init
(
chrp_int_ack
);
#if defined(CONFIG_VT) && defined(CONFIG_
ADB_KEYBOAR
D) && defined(XMON)
#if defined(CONFIG_VT) && defined(CONFIG_
INPUT_ADBHI
D) && defined(XMON)
/* see if there is a keyboard in the device tree
/* see if there is a keyboard in the device tree
with a parent of type "adb" */
with a parent of type "adb" */
for
(
kbd
=
find_devices
(
"keyboard"
);
kbd
;
kbd
=
kbd
->
next
)
for
(
kbd
=
find_devices
(
"keyboard"
);
kbd
;
kbd
=
kbd
->
next
)
...
@@ -447,7 +439,7 @@ chrp_init2(void)
...
@@ -447,7 +439,7 @@ chrp_init2(void)
if
(
ppc_md
.
progress
)
if
(
ppc_md
.
progress
)
ppc_md
.
progress
(
" Have fun! "
,
0x7777
);
ppc_md
.
progress
(
" Have fun! "
,
0x7777
);
#if defined(CONFIG_VT) &&
(defined(CONFIG_ADB_KEYBOARD) || defined(CONFIG_INPUT)
)
#if defined(CONFIG_VT) &&
defined(CONFIG_INPUT
)
/* see if there is a keyboard in the device tree
/* see if there is a keyboard in the device tree
with a parent of type "adb" */
with a parent of type "adb" */
{
{
...
@@ -461,7 +453,7 @@ chrp_init2(void)
...
@@ -461,7 +453,7 @@ chrp_init2(void)
}
}
}
}
}
}
#endif
/* CONFIG_VT &&
(CONFIG_ADB_KEYBOARD || CONFIG_INPUT)
*/
#endif
/* CONFIG_VT &&
CONFIG_INPUT
*/
}
}
void
__init
void
__init
...
@@ -502,20 +494,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -502,20 +494,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md
.
find_end_of_memory
=
pmac_find_end_of_memory
;
ppc_md
.
find_end_of_memory
=
pmac_find_end_of_memory
;
#ifdef CONFIG_VT
/* these are adjusted in chrp_init2 if we have an ADB keyboard */
ppc_md
.
kbd_setkeycode
=
pckbd_setkeycode
;
ppc_md
.
kbd_getkeycode
=
pckbd_getkeycode
;
ppc_md
.
kbd_translate
=
pckbd_translate
;
ppc_md
.
kbd_unexpected_up
=
pckbd_unexpected_up
;
ppc_md
.
kbd_leds
=
pckbd_leds
;
ppc_md
.
kbd_init_hw
=
pckbd_init_hw
;
#ifdef CONFIG_MAGIC_SYSRQ
ppc_md
.
ppc_kbd_sysrq_xlate
=
pckbd_sysrq_xlate
;
SYSRQ_KEY
=
0x54
;
#endif
/* CONFIG_MAGIC_SYSRQ */
#endif
/* CONFIG_VT */
if
(
rtas_data
)
{
if
(
rtas_data
)
{
struct
device_node
*
rtas
;
struct
device_node
*
rtas
;
unsigned
int
*
p
;
unsigned
int
*
p
;
...
...
arch/ppc/platforms/gemini_setup.c
View file @
b07a73e9
...
@@ -576,14 +576,6 @@ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -576,14 +576,6 @@ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md
.
find_end_of_memory
=
gemini_find_end_of_memory
;
ppc_md
.
find_end_of_memory
=
gemini_find_end_of_memory
;
ppc_md
.
setup_io_mappings
=
gemini_map_io
;
ppc_md
.
setup_io_mappings
=
gemini_map_io
;
/* no keyboard/mouse/video stuff yet.. */
ppc_md
.
kbd_setkeycode
=
NULL
;
ppc_md
.
kbd_getkeycode
=
NULL
;
ppc_md
.
kbd_translate
=
NULL
;
ppc_md
.
kbd_unexpected_up
=
NULL
;
ppc_md
.
kbd_leds
=
NULL
;
ppc_md
.
kbd_init_hw
=
NULL
;
ppc_md
.
ppc_kbd_sysrq_xlate
=
NULL
;
ppc_md
.
pcibios_fixup_bus
=
gemini_pcibios_fixup
;
ppc_md
.
pcibios_fixup_bus
=
gemini_pcibios_fixup
;
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
...
...
arch/ppc/platforms/iSeries_setup.c
View file @
b07a73e9
...
@@ -216,12 +216,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -216,12 +216,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md
.
progress
=
iSeries_progress
;
ppc_md
.
progress
=
iSeries_progress
;
ppc_md
.
find_end_of_memory
=
iSeries_find_end_of_memory
;
ppc_md
.
find_end_of_memory
=
iSeries_find_end_of_memory
;
ppc_md
.
kbd_setkeycode
=
NULL
;
ppc_md
.
kbd_getkeycode
=
NULL
;
ppc_md
.
kbd_translate
=
NULL
;
ppc_md
.
kbd_unexpected_up
=
NULL
;
ppc_md
.
kbd_leds
=
NULL
;
ppc_md
.
kbd_init_hw
=
NULL
;
#ifdef CONFIG_PCI
#ifdef CONFIG_PCI
ppc_md
.
pcibios_fixup_bus
=
iSeries_fixup_bus
;
ppc_md
.
pcibios_fixup_bus
=
iSeries_fixup_bus
;
ppc_md
.
pcibios_fixup
=
iSeries_fixup
;
ppc_md
.
pcibios_fixup
=
iSeries_fixup
;
...
@@ -230,10 +224,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -230,10 +224,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md
.
pcibios_fixup
=
NULL
;
ppc_md
.
pcibios_fixup
=
NULL
;
#endif
/* CONFIG_PCI */
#endif
/* CONFIG_PCI */
#if defined(CONFIG_MAGIC_SYSRQ)
ppc_md
.
ppc_kbd_sysrq_xlate
=
NULL
;
#endif
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
ppc_md
.
smp_ops
=
&
iSeries_smp_ops
;
ppc_md
.
smp_ops
=
&
iSeries_smp_ops
;
#endif
/* CONFIG_SMP */
#endif
/* CONFIG_SMP */
...
...
arch/ppc/platforms/oak_setup.c
View file @
b07a73e9
...
@@ -117,14 +117,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -117,14 +117,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md
.
set_rtc_time
=
oak_set_rtc_time
;
ppc_md
.
set_rtc_time
=
oak_set_rtc_time
;
ppc_md
.
get_rtc_time
=
oak_get_rtc_time
;
ppc_md
.
get_rtc_time
=
oak_get_rtc_time
;
ppc_md
.
calibrate_decr
=
oak_calibrate_decr
;
ppc_md
.
calibrate_decr
=
oak_calibrate_decr
;
ppc_md
.
kbd_setkeycode
=
NULL
;
ppc_md
.
kbd_getkeycode
=
NULL
;
ppc_md
.
kbd_translate
=
NULL
;
ppc_md
.
kbd_unexpected_up
=
NULL
;
ppc_md
.
kbd_leds
=
NULL
;
ppc_md
.
kbd_init_hw
=
NULL
;
ppc_md
.
ppc_kbd_sysrq_xlate
=
NULL
;
}
}
/*
/*
...
...
arch/ppc/platforms/pmac_setup.c
View file @
b07a73e9
...
@@ -88,26 +88,6 @@ extern void pmac_find_bridges(void);
...
@@ -88,26 +88,6 @@ extern void pmac_find_bridges(void);
extern
int
pmac_ide_check_base
(
ide_ioreg_t
base
);
extern
int
pmac_ide_check_base
(
ide_ioreg_t
base
);
extern
ide_ioreg_t
pmac_ide_get_base
(
int
index
);
extern
ide_ioreg_t
pmac_ide_get_base
(
int
index
);
extern
int
mackbd_setkeycode
(
unsigned
int
scancode
,
unsigned
int
keycode
);
extern
int
mackbd_getkeycode
(
unsigned
int
scancode
);
extern
int
mackbd_translate
(
unsigned
char
keycode
,
unsigned
char
*
keycodep
,
char
raw_mode
);
extern
char
mackbd_unexpected_up
(
unsigned
char
keycode
);
extern
void
mackbd_leds
(
unsigned
char
leds
);
extern
void
__init
mackbd_init_hw
(
void
);
extern
int
mac_hid_kbd_translate
(
unsigned
char
scancode
,
unsigned
char
*
keycode
,
char
raw_mode
);
extern
char
mac_hid_kbd_unexpected_up
(
unsigned
char
keycode
);
extern
void
mac_hid_init_hw
(
void
);
extern
unsigned
char
mac_hid_kbd_sysrq_xlate
[];
extern
unsigned
char
pckbd_sysrq_xlate
[];
extern
unsigned
char
mackbd_sysrq_xlate
[];
extern
int
pckbd_setkeycode
(
unsigned
int
scancode
,
unsigned
int
keycode
);
extern
int
pckbd_getkeycode
(
unsigned
int
scancode
);
extern
int
pckbd_translate
(
unsigned
char
scancode
,
unsigned
char
*
keycode
,
char
raw_mode
);
extern
char
pckbd_unexpected_up
(
unsigned
char
keycode
);
extern
int
keyboard_sends_linux_keycodes
;
extern
void
pmac_nvram_update
(
void
);
extern
void
pmac_nvram_update
(
void
);
extern
unsigned
char
pmac_nvram_read_byte
(
int
addr
);
extern
unsigned
char
pmac_nvram_read_byte
(
int
addr
);
extern
void
pmac_nvram_write_byte
(
int
addr
,
unsigned
char
val
);
extern
void
pmac_nvram_write_byte
(
int
addr
,
unsigned
char
val
);
...
@@ -641,37 +621,8 @@ void __init
...
@@ -641,37 +621,8 @@ void __init
select_adb_keyboard
(
void
)
select_adb_keyboard
(
void
)
{
{
#ifdef CONFIG_VT
#ifdef CONFIG_VT
#ifdef CONFIG_INPUT
ppc_md
.
kbd_init_hw
=
mac_hid_init_hw
;
ppc_md
.
kbd_translate
=
mac_hid_kbd_translate
;
ppc_md
.
kbd_translate
=
mac_hid_kbd_translate
;
ppc_md
.
kbd_unexpected_up
=
mac_hid_kbd_unexpected_up
;
ppc_md
.
kbd_unexpected_up
=
mac_hid_kbd_unexpected_up
;
ppc_md
.
kbd_setkeycode
=
0
;
ppc_md
.
kbd_getkeycode
=
0
;
ppc_md
.
kbd_leds
=
0
;
#ifdef CONFIG_MAGIC_SYSRQ
#ifdef CONFIG_MAC_ADBKEYCODES
if
(
!
keyboard_sends_linux_keycodes
)
{
ppc_md
.
ppc_kbd_sysrq_xlate
=
mac_hid_kbd_sysrq_xlate
;
SYSRQ_KEY
=
0x69
;
}
else
#endif
/* CONFIG_MAC_ADBKEYCODES */
{
ppc_md
.
ppc_kbd_sysrq_xlate
=
pckbd_sysrq_xlate
;
SYSRQ_KEY
=
0x54
;
}
#endif
/* CONFIG_MAGIC_SYSRQ */
#elif defined(CONFIG_ADB_KEYBOARD)
ppc_md
.
kbd_setkeycode
=
mackbd_setkeycode
;
ppc_md
.
kbd_getkeycode
=
mackbd_getkeycode
;
ppc_md
.
kbd_translate
=
mackbd_translate
;
ppc_md
.
kbd_unexpected_up
=
mackbd_unexpected_up
;
ppc_md
.
kbd_leds
=
mackbd_leds
;
ppc_md
.
kbd_init_hw
=
mackbd_init_hw
;
#ifdef CONFIG_MAGIC_SYSRQ
ppc_md
.
ppc_kbd_sysrq_xlate
=
mackbd_sysrq_xlate
;
SYSRQ_KEY
=
0x69
;
#endif
/* CONFIG_MAGIC_SYSRQ */
#endif
/* CONFIG_INPUT_ADBHID/CONFIG_ADB_KEYBOARD */
#endif
/* CONFIG_VT */
#endif
/* CONFIG_VT */
}
}
...
...
arch/ppc/platforms/pplus_setup.c
View file @
b07a73e9
...
@@ -77,15 +77,6 @@
...
@@ -77,15 +77,6 @@
TODC_ALLOC
();
TODC_ALLOC
();
extern
int
pckbd_setkeycode
(
unsigned
int
scancode
,
unsigned
int
keycode
);
extern
int
pckbd_getkeycode
(
unsigned
int
scancode
);
extern
int
pckbd_translate
(
unsigned
char
scancode
,
unsigned
char
*
keycode
,
char
raw_mode
);
extern
char
pckbd_unexpected_up
(
unsigned
char
keycode
);
extern
void
pckbd_leds
(
unsigned
char
leds
);
extern
void
pckbd_init_hw
(
void
);
extern
unsigned
char
pckbd_sysrq_xlate
[
128
];
extern
void
pplus_setup_hose
(
void
);
extern
void
pplus_setup_hose
(
void
);
extern
void
pplus_set_VIA_IDE_native
(
void
);
extern
void
pplus_set_VIA_IDE_native
(
void
);
...
@@ -508,19 +499,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -508,19 +499,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_ide_md
.
ide_init_hwif
=
pplus_ide_init_hwif_ports
;
ppc_ide_md
.
ide_init_hwif
=
pplus_ide_init_hwif_ports
;
#endif
#endif
#ifdef CONFIG_VT
ppc_md
.
kbd_setkeycode
=
pckbd_setkeycode
;
ppc_md
.
kbd_getkeycode
=
pckbd_getkeycode
;
ppc_md
.
kbd_translate
=
pckbd_translate
;
ppc_md
.
kbd_unexpected_up
=
pckbd_unexpected_up
;
ppc_md
.
kbd_leds
=
pckbd_leds
;
ppc_md
.
kbd_init_hw
=
pckbd_init_hw
;
#ifdef CONFIG_MAGIC_SYSRQ
ppc_md
.
ppc_kbd_sysrq_xlate
=
pckbd_sysrq_xlate
;
SYSRQ_KEY
=
0x54
;
#endif
#endif
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
ppc_md
.
smp_ops
=
&
pplus_smp_ops
;
ppc_md
.
smp_ops
=
&
pplus_smp_ops
;
#endif
/* CONFIG_SMP */
#endif
/* CONFIG_SMP */
...
...
arch/ppc/platforms/prep_setup.c
View file @
b07a73e9
...
@@ -79,15 +79,6 @@ extern void rs_nvram_write_val(int addr,
...
@@ -79,15 +79,6 @@ extern void rs_nvram_write_val(int addr,
unsigned
char
val
);
unsigned
char
val
);
extern
void
ibm_prep_init
(
void
);
extern
void
ibm_prep_init
(
void
);
extern
int
pckbd_setkeycode
(
unsigned
int
scancode
,
unsigned
int
keycode
);
extern
int
pckbd_getkeycode
(
unsigned
int
scancode
);
extern
int
pckbd_translate
(
unsigned
char
scancode
,
unsigned
char
*
keycode
,
char
raw_mode
);
extern
char
pckbd_unexpected_up
(
unsigned
char
keycode
);
extern
void
pckbd_leds
(
unsigned
char
leds
);
extern
void
pckbd_init_hw
(
void
);
extern
unsigned
char
pckbd_sysrq_xlate
[];
extern
void
prep_find_bridges
(
void
);
extern
void
prep_find_bridges
(
void
);
extern
char
saved_command_line
[];
extern
char
saved_command_line
[];
...
@@ -895,19 +886,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -895,19 +886,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_ide_md
.
default_io_base
=
prep_ide_default_io_base
;
ppc_ide_md
.
default_io_base
=
prep_ide_default_io_base
;
#endif
#endif
#ifdef CONFIG_VT
ppc_md
.
kbd_setkeycode
=
pckbd_setkeycode
;
ppc_md
.
kbd_getkeycode
=
pckbd_getkeycode
;
ppc_md
.
kbd_translate
=
pckbd_translate
;
ppc_md
.
kbd_unexpected_up
=
pckbd_unexpected_up
;
ppc_md
.
kbd_leds
=
pckbd_leds
;
ppc_md
.
kbd_init_hw
=
pckbd_init_hw
;
#ifdef CONFIG_MAGIC_SYSRQ
ppc_md
.
ppc_kbd_sysrq_xlate
=
pckbd_sysrq_xlate
;
SYSRQ_KEY
=
0x54
;
#endif
#endif
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
ppc_md
.
smp_ops
=
&
prep_smp_ops
;
ppc_md
.
smp_ops
=
&
prep_smp_ops
;
#endif
/* CONFIG_SMP */
#endif
/* CONFIG_SMP */
...
...
arch/ppc/platforms/sandpoint_setup.c
View file @
b07a73e9
...
@@ -97,15 +97,6 @@
...
@@ -97,15 +97,6 @@
extern
u_int
openpic_irq
(
void
);
extern
u_int
openpic_irq
(
void
);
extern
void
openpic_eoi
(
void
);
extern
void
openpic_eoi
(
void
);
extern
int
pckbd_setkeycode
(
unsigned
int
scancode
,
unsigned
int
keycode
);
extern
int
pckbd_getkeycode
(
unsigned
int
scancode
);
extern
int
pckbd_translate
(
unsigned
char
scancode
,
unsigned
char
*
keycode
,
char
raw_mode
);
extern
char
pckbd_unexpected_up
(
unsigned
char
keycode
);
extern
void
pckbd_leds
(
unsigned
char
leds
);
extern
void
pckbd_init_hw
(
void
);
extern
unsigned
char
pckbd_sysrq_xlate
[
128
];
static
void
sandpoint_halt
(
void
);
static
void
sandpoint_halt
(
void
);
...
@@ -645,19 +636,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -645,19 +636,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md
.
progress
=
NULL
;
ppc_md
.
progress
=
NULL
;
#endif
/* CONFIG_SERIAL_TEXT_DEBUG */
#endif
/* CONFIG_SERIAL_TEXT_DEBUG */
#ifdef CONFIG_VT
ppc_md
.
kbd_setkeycode
=
pckbd_setkeycode
;
ppc_md
.
kbd_getkeycode
=
pckbd_getkeycode
;
ppc_md
.
kbd_translate
=
pckbd_translate
;
ppc_md
.
kbd_unexpected_up
=
pckbd_unexpected_up
;
ppc_md
.
kbd_leds
=
pckbd_leds
;
ppc_md
.
kbd_init_hw
=
pckbd_init_hw
;
#ifdef CONFIG_MAGIC_SYSRQ
ppc_md
.
ppc_kbd_sysrq_xlate
=
pckbd_sysrq_xlate
;
SYSRQ_KEY
=
0x54
;
#endif
#endif
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md
.
default_irq
=
sandpoint_ide_default_irq
;
ppc_ide_md
.
default_irq
=
sandpoint_ide_default_irq
;
ppc_ide_md
.
default_io_base
=
sandpoint_ide_default_io_base
;
ppc_ide_md
.
default_io_base
=
sandpoint_ide_default_io_base
;
...
...
arch/ppc/platforms/spruce_setup.c
View file @
b07a73e9
...
@@ -64,13 +64,6 @@ extern void spruce_init_IRQ(void);
...
@@ -64,13 +64,6 @@ extern void spruce_init_IRQ(void);
extern
int
spruce_get_irq
(
struct
pt_regs
*
);
extern
int
spruce_get_irq
(
struct
pt_regs
*
);
extern
void
spruce_setup_hose
(
void
);
extern
void
spruce_setup_hose
(
void
);
extern
int
pckbd_setkeycode
(
unsigned
int
,
unsigned
int
);
extern
int
pckbd_getkeycode
(
unsigned
int
);
extern
int
pckbd_translate
(
unsigned
char
,
unsigned
char
*
,
char
);
extern
char
pckbd_unexpected_up
(
unsigned
char
);
extern
void
pckbd_leds
(
unsigned
char
);
extern
void
pckbd_init_hw
(
void
);
extern
unsigned
char
pckbd_sysrq_xlate
[
128
];
extern
char
cmd_line
[];
extern
char
cmd_line
[];
/*
/*
...
@@ -279,18 +272,4 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -279,18 +272,4 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md
.
nvram_read_val
=
todc_direct_read_val
;
ppc_md
.
nvram_read_val
=
todc_direct_read_val
;
ppc_md
.
nvram_write_val
=
todc_direct_write_val
;
ppc_md
.
nvram_write_val
=
todc_direct_write_val
;
#ifdef CONFIG_VT
/* Spruce has a PS2 style keyboard */
ppc_md
.
kbd_setkeycode
=
pckbd_setkeycode
;
ppc_md
.
kbd_getkeycode
=
pckbd_getkeycode
;
ppc_md
.
kbd_translate
=
pckbd_translate
;
ppc_md
.
kbd_unexpected_up
=
pckbd_unexpected_up
;
ppc_md
.
kbd_leds
=
pckbd_leds
;
ppc_md
.
kbd_init_hw
=
pckbd_init_hw
;
#ifdef CONFIG_MAGIC_SYSRQ
ppc_md
.
kbd_sysrq_xlate
=
pckbd_sysrq_xlate
;
SYSRQ_KEY
=
0x54
;
#endif
#endif
}
}
drivers/macintosh/adbhid.c
View file @
b07a73e9
...
@@ -77,6 +77,7 @@ struct adbhid {
...
@@ -77,6 +77,7 @@ struct adbhid {
int
mouse_kind
;
int
mouse_kind
;
unsigned
char
*
keycode
;
unsigned
char
*
keycode
;
char
name
[
64
];
char
name
[
64
];
char
phys
[
32
];
};
};
static
struct
adbhid
*
adbhid
[
16
]
=
{
0
};
static
struct
adbhid
*
adbhid
[
16
]
=
{
0
};
...
@@ -273,9 +274,34 @@ adbhid_buttons_input(unsigned char *data, int nb, struct pt_regs *regs, int auto
...
@@ -273,9 +274,34 @@ adbhid_buttons_input(unsigned char *data, int nb, struct pt_regs *regs, int auto
switch
(
adbhid
[
id
]
->
original_handler_id
)
{
switch
(
adbhid
[
id
]
->
original_handler_id
)
{
default:
default:
case
0x02
:
/* Adjustable keyboard button device */
case
0x02
:
/* Adjustable keyboard button device */
{
int
down
=
(
data
[
1
]
==
(
data
[
1
]
&
0xf
));
switch
(
data
[
1
]
&
0x0f
)
{
case
0x0
:
/* microphone */
input_report_key
(
&
adbhid
[
id
]
->
input
,
KEY_SOUND
,
down
);
break
;
case
0x1
:
/* mute */
input_report_key
(
&
adbhid
[
id
]
->
input
,
KEY_MUTE
,
down
);
break
;
case
0x2
:
/* volume decrease */
input_report_key
(
&
adbhid
[
id
]
->
input
,
KEY_VOLUMEDOWN
,
down
);
break
;
case
0x3
:
/* volume increase */
input_report_key
(
&
adbhid
[
id
]
->
input
,
KEY_VOLUMEUP
,
down
);
break
;
default:
printk
(
KERN_INFO
"Unhandled ADB_MISC event %02x, %02x, %02x, %02x
\n
"
,
printk
(
KERN_INFO
"Unhandled ADB_MISC event %02x, %02x, %02x, %02x
\n
"
,
data
[
0
],
data
[
1
],
data
[
2
],
data
[
3
]);
data
[
0
],
data
[
1
],
data
[
2
],
data
[
3
]);
break
;
break
;
}
}
break
;
case
0x1f
:
/* Powerbook button device */
case
0x1f
:
/* Powerbook button device */
{
{
int
down
=
(
data
[
1
]
==
(
data
[
1
]
&
0xf
));
int
down
=
(
data
[
1
]
==
(
data
[
1
]
&
0xf
));
...
@@ -303,6 +329,7 @@ adbhid_buttons_input(unsigned char *data, int nb, struct pt_regs *regs, int auto
...
@@ -303,6 +329,7 @@ adbhid_buttons_input(unsigned char *data, int nb, struct pt_regs *regs, int auto
case
0xb
:
/* eject */
case
0xb
:
/* eject */
input_report_key
(
&
adbhid
[
id
]
->
input
,
KEY_EJECTCD
,
down
);
input_report_key
(
&
adbhid
[
id
]
->
input
,
KEY_EJECTCD
,
down
);
break
;
break
;
case
0xa
:
/* brightness decrease */
case
0xa
:
/* brightness decrease */
#ifdef CONFIG_PMAC_BACKLIGHT
#ifdef CONFIG_PMAC_BACKLIGHT
if
(
!
disable_kernel_backlight
)
{
if
(
!
disable_kernel_backlight
)
{
...
@@ -317,6 +344,7 @@ adbhid_buttons_input(unsigned char *data, int nb, struct pt_regs *regs, int auto
...
@@ -317,6 +344,7 @@ adbhid_buttons_input(unsigned char *data, int nb, struct pt_regs *regs, int auto
#endif
/* CONFIG_PMAC_BACKLIGHT */
#endif
/* CONFIG_PMAC_BACKLIGHT */
input_report_key
(
&
adbhid
[
id
]
->
input
,
KEY_BRIGHTNESSDOWN
,
down
);
input_report_key
(
&
adbhid
[
id
]
->
input
,
KEY_BRIGHTNESSDOWN
,
down
);
break
;
break
;
case
0x9
:
/* brightness increase */
case
0x9
:
/* brightness increase */
#ifdef CONFIG_PMAC_BACKLIGHT
#ifdef CONFIG_PMAC_BACKLIGHT
if
(
!
disable_kernel_backlight
)
{
if
(
!
disable_kernel_backlight
)
{
...
@@ -442,6 +470,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
...
@@ -442,6 +470,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
return
;
return
;
memset
(
adbhid
[
id
],
0
,
sizeof
(
struct
adbhid
));
memset
(
adbhid
[
id
],
0
,
sizeof
(
struct
adbhid
));
sprintf
(
adbhid
[
id
]
->
phys
,
"adb%d:%d.%02x/input"
,
id
,
default_id
,
original_handler_id
);
adbhid
[
id
]
->
id
=
default_id
;
adbhid
[
id
]
->
id
=
default_id
;
adbhid
[
id
]
->
original_handler_id
=
original_handler_id
;
adbhid
[
id
]
->
original_handler_id
=
original_handler_id
;
...
@@ -449,6 +478,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
...
@@ -449,6 +478,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
adbhid
[
id
]
->
mouse_kind
=
mouse_kind
;
adbhid
[
id
]
->
mouse_kind
=
mouse_kind
;
adbhid
[
id
]
->
input
.
private
=
adbhid
[
id
];
adbhid
[
id
]
->
input
.
private
=
adbhid
[
id
];
adbhid
[
id
]
->
input
.
name
=
adbhid
[
id
]
->
name
;
adbhid
[
id
]
->
input
.
name
=
adbhid
[
id
]
->
name
;
adbhid
[
id
]
->
input
.
phys
=
adbhid
[
id
]
->
phys
;
adbhid
[
id
]
->
input
.
idbus
=
BUS_ADB
;
adbhid
[
id
]
->
input
.
idbus
=
BUS_ADB
;
adbhid
[
id
]
->
input
.
idvendor
=
0x0001
;
adbhid
[
id
]
->
input
.
idvendor
=
0x0001
;
adbhid
[
id
]
->
input
.
idproduct
=
(
id
<<
12
)
|
(
default_id
<<
8
)
|
original_handler_id
;
adbhid
[
id
]
->
input
.
idproduct
=
(
id
<<
12
)
|
(
default_id
<<
8
)
|
original_handler_id
;
...
@@ -461,8 +491,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
...
@@ -461,8 +491,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
return
;
return
;
}
}
sprintf
(
adbhid
[
id
]
->
name
,
"ADB keyboard on ID %d:%d.%02x"
,
sprintf
(
adbhid
[
id
]
->
name
,
"ADB keyboard"
);
id
,
default_id
,
original_handler_id
);
memcpy
(
adbhid
[
id
]
->
keycode
,
adb_to_linux_keycodes
,
sizeof
(
adb_to_linux_keycodes
));
memcpy
(
adbhid
[
id
]
->
keycode
,
adb_to_linux_keycodes
,
sizeof
(
adb_to_linux_keycodes
));
...
@@ -509,8 +538,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
...
@@ -509,8 +538,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
break
;
break
;
case
ADB_MOUSE
:
case
ADB_MOUSE
:
sprintf
(
adbhid
[
id
]
->
name
,
"ADB mouse on ID %d:%d.%02x"
,
sprintf
(
adbhid
[
id
]
->
name
,
"ADB mouse"
);
id
,
default_id
,
original_handler_id
);
adbhid
[
id
]
->
input
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_REL
);
adbhid
[
id
]
->
input
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_REL
);
adbhid
[
id
]
->
input
.
keybit
[
LONG
(
BTN_MOUSE
)]
=
BIT
(
BTN_LEFT
)
|
BIT
(
BTN_MIDDLE
)
|
BIT
(
BTN_RIGHT
);
adbhid
[
id
]
->
input
.
keybit
[
LONG
(
BTN_MOUSE
)]
=
BIT
(
BTN_LEFT
)
|
BIT
(
BTN_MIDDLE
)
|
BIT
(
BTN_RIGHT
);
...
@@ -520,12 +548,15 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
...
@@ -520,12 +548,15 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
case
ADB_MISC
:
case
ADB_MISC
:
switch
(
original_handler_id
)
{
switch
(
original_handler_id
)
{
case
0x02
:
/* Adjustable keyboard button device */
case
0x02
:
/* Adjustable keyboard button device */
sprintf
(
adbhid
[
id
]
->
name
,
"ADB adjustable keyboard buttons on ID %d:%d.%02x"
,
sprintf
(
adbhid
[
id
]
->
name
,
"ADB adjustable keyboard buttons"
);
id
,
default_id
,
original_handler_id
);
adbhid
[
id
]
->
input
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_REP
);
set_bit
(
KEY_SOUND
,
adbhid
[
id
]
->
input
.
keybit
);
set_bit
(
KEY_MUTE
,
adbhid
[
id
]
->
input
.
keybit
);
set_bit
(
KEY_VOLUMEUP
,
adbhid
[
id
]
->
input
.
keybit
);
set_bit
(
KEY_VOLUMEDOWN
,
adbhid
[
id
]
->
input
.
keybit
);
break
;
break
;
case
0x1f
:
/* Powerbook button device */
case
0x1f
:
/* Powerbook button device */
sprintf
(
adbhid
[
id
]
->
name
,
"ADB Powerbook buttons on ID %d:%d.%02x"
,
sprintf
(
adbhid
[
id
]
->
name
,
"ADB Powerbook buttons"
);
id
,
default_id
,
original_handler_id
);
adbhid
[
id
]
->
input
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_REP
);
adbhid
[
id
]
->
input
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_REP
);
set_bit
(
KEY_MUTE
,
adbhid
[
id
]
->
input
.
keybit
);
set_bit
(
KEY_MUTE
,
adbhid
[
id
]
->
input
.
keybit
);
set_bit
(
KEY_VOLUMEUP
,
adbhid
[
id
]
->
input
.
keybit
);
set_bit
(
KEY_VOLUMEUP
,
adbhid
[
id
]
->
input
.
keybit
);
...
@@ -549,8 +580,8 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
...
@@ -549,8 +580,8 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
input_register_device
(
&
adbhid
[
id
]
->
input
);
input_register_device
(
&
adbhid
[
id
]
->
input
);
printk
(
KERN_INFO
"input
%d: ADB HID on ID %d:%d.%02x
\n
"
,
printk
(
KERN_INFO
"input
: %s on %s
\n
"
,
adbhid
[
id
]
->
input
.
number
,
id
,
default_id
,
original_handler_id
);
adbhid
[
id
]
->
name
,
adbhid
[
id
]
->
phys
);
if
(
default_id
==
ADB_KEYBOARD
)
{
if
(
default_id
==
ADB_KEYBOARD
)
{
/* HACK WARNING!! This should go away as soon there is an utility
/* HACK WARNING!! This should go away as soon there is an utility
...
@@ -631,14 +662,16 @@ adbhid_probe(void)
...
@@ -631,14 +662,16 @@ adbhid_probe(void)
printk
(
"ADB keyboard at %d, handler 1
\n
"
,
id
);
printk
(
"ADB keyboard at %d, handler 1
\n
"
,
id
);
adb_get_infos
(
id
,
&
default_id
,
&
cur_handler_id
);
adb_get_infos
(
id
,
&
default_id
,
&
cur_handler_id
);
reg
|=
adbhid_input_reregister
(
id
,
default_id
,
org_handler_id
,
cur_handler_id
,
0
);
reg
|=
adbhid_input_reregister
(
id
,
default_id
,
org_handler_id
,
cur_handler_id
,
0
);
}
}
for
(
i
=
0
;
i
<
buttons_ids
.
nids
;
i
++
)
{
for
(
i
=
0
;
i
<
buttons_ids
.
nids
;
i
++
)
{
int
id
=
buttons_ids
.
id
[
i
];
int
id
=
buttons_ids
.
id
[
i
];
adb_get_infos
(
id
,
&
default_id
,
&
org_handler_id
);
adb_get_infos
(
id
,
&
default_id
,
&
org_handler_id
);
reg
|=
adbhid_input_reregister
(
id
,
default_id
,
org_handler_id
,
org_handler_id
,
0
);
reg
|=
adbhid_input_reregister
(
id
,
default_id
,
org_handler_id
,
org_handler_id
,
0
);
}
}
/* Try to switch all mice to handler 4, or 2 for three-button
/* Try to switch all mice to handler 4, or 2 for three-button
...
...
drivers/macintosh/mac_hid.c
View file @
b07a73e9
This diff is collapsed.
Click to expand it.
include/asm-ppc/keyboard.h
View file @
b07a73e9
...
@@ -36,19 +36,21 @@
...
@@ -36,19 +36,21 @@
#define DISABLE_KBD_DURING_INTERRUPTS 0
#define DISABLE_KBD_DURING_INTERRUPTS 0
#define INIT_KBD
#define INIT_KBD
extern
int
mac_hid_kbd_translate
(
unsigned
char
scancode
,
unsigned
char
*
keycode
,
char
raw_mode
);
extern
char
mac_hid_kbd_unexpected_up
(
unsigned
char
keycode
);
extern
int
pckbd_translate
(
unsigned
char
scancode
,
unsigned
char
*
keycode
,
char
raw_mode
);
extern
char
pckbd_unexpected_up
(
unsigned
char
keycode
);
extern
unsigned
char
pckbd_sysrq_xlate
[
128
];
static
inline
int
kbd_setkeycode
(
unsigned
int
scancode
,
unsigned
int
keycode
)
static
inline
int
kbd_setkeycode
(
unsigned
int
scancode
,
unsigned
int
keycode
)
{
{
if
(
ppc_md
.
kbd_setkeycode
)
return
ppc_md
.
kbd_setkeycode
(
scancode
,
keycode
);
else
return
0
;
return
0
;
}
}
static
inline
int
kbd_getkeycode
(
unsigned
int
scancode
)
static
inline
int
kbd_getkeycode
(
unsigned
int
scancode
)
{
{
if
(
ppc_md
.
kbd_getkeycode
)
return
ppc_md
.
kbd_getkeycode
(
scancode
);
else
return
0
;
return
0
;
}
}
...
@@ -58,7 +60,7 @@ static inline int kbd_translate(unsigned char keycode, unsigned char *keycodep,
...
@@ -58,7 +60,7 @@ static inline int kbd_translate(unsigned char keycode, unsigned char *keycodep,
if
(
ppc_md
.
kbd_translate
)
if
(
ppc_md
.
kbd_translate
)
return
ppc_md
.
kbd_translate
(
keycode
,
keycodep
,
raw_mode
);
return
ppc_md
.
kbd_translate
(
keycode
,
keycodep
,
raw_mode
);
else
else
return
0
;
return
pckbd_translate
(
keycode
,
keycodep
,
raw_mode
)
;
}
}
static
inline
int
kbd_unexpected_up
(
unsigned
char
keycode
)
static
inline
int
kbd_unexpected_up
(
unsigned
char
keycode
)
...
@@ -66,22 +68,18 @@ static inline int kbd_unexpected_up(unsigned char keycode)
...
@@ -66,22 +68,18 @@ static inline int kbd_unexpected_up(unsigned char keycode)
if
(
ppc_md
.
kbd_unexpected_up
)
if
(
ppc_md
.
kbd_unexpected_up
)
return
ppc_md
.
kbd_unexpected_up
(
keycode
);
return
ppc_md
.
kbd_unexpected_up
(
keycode
);
else
else
return
0
;
return
pckbd_unexpected_up
(
keycode
)
;
}
}
static
inline
void
kbd_leds
(
unsigned
char
leds
)
static
inline
void
kbd_leds
(
unsigned
char
leds
)
{
{
if
(
ppc_md
.
kbd_leds
)
ppc_md
.
kbd_leds
(
leds
);
}
}
static
inline
void
kbd_init_hw
(
void
)
static
inline
void
kbd_init_hw
(
void
)
{
{
if
(
ppc_md
.
kbd_init_hw
)
ppc_md
.
kbd_init_hw
();
}
}
#define kbd_sysrq_xlate
(ppc_md.ppc_kbd_sysrq_xlate)
#define kbd_sysrq_xlate
pckbd_sysrq_xlate
extern
unsigned
long
SYSRQ_KEY
;
extern
unsigned
long
SYSRQ_KEY
;
...
...
include/asm-ppc/machdep.h
View file @
b07a73e9
...
@@ -57,16 +57,10 @@ struct machdep_calls {
...
@@ -57,16 +57,10 @@ struct machdep_calls {
void
(
*
nvram_write_val
)(
int
addr
,
unsigned
char
val
);
void
(
*
nvram_write_val
)(
int
addr
,
unsigned
char
val
);
/* Tons of keyboard stuff. */
/* Tons of keyboard stuff. */
int
(
*
kbd_setkeycode
)(
unsigned
int
scancode
,
unsigned
int
keycode
);
int
(
*
kbd_getkeycode
)(
unsigned
int
scancode
);
int
(
*
kbd_translate
)(
unsigned
char
scancode
,
int
(
*
kbd_translate
)(
unsigned
char
scancode
,
unsigned
char
*
keycode
,
unsigned
char
*
keycode
,
char
raw_mode
);
char
raw_mode
);
char
(
*
kbd_unexpected_up
)(
unsigned
char
keycode
);
char
(
*
kbd_unexpected_up
)(
unsigned
char
keycode
);
void
(
*
kbd_leds
)(
unsigned
char
leds
);
void
(
*
kbd_init_hw
)(
void
);
unsigned
char
*
ppc_kbd_sysrq_xlate
;
/*
/*
* optional PCI "hooks"
* optional PCI "hooks"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment