]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge omap-drivers
authorTony Lindgren <tony@atomide.com>
Wed, 11 Jul 2007 10:02:22 +0000 (03:02 -0700)
committerTony Lindgren <tony@atomide.com>
Wed, 11 Jul 2007 10:02:22 +0000 (03:02 -0700)
Merge branches 'master' and 'omap-drivers'

Conflicts:

arch/arm/boot/.gitignore
arch/arm/configs/omap_h2_1610_defconfig
arch/arm/configs/omap_osk_5912_defconfig
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-palmte.c
arch/arm/mach-omap1/board-palmtt.c
arch/arm/mach-omap1/board-palmz71.c
arch/arm/mach-omap1/board-sx1.c
arch/arm/mach-omap2/Kconfig
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-apollon-keys.c
arch/arm/mach-omap2/board-apollon.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/board-n800-audio.c
arch/arm/mach-omap2/board-n800-dsp.c
arch/arm/mach-omap2/board-n800-usb.c
arch/arm/mach-omap2/board-n800.c
arch/arm/mach-omap2/devices.c
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/irq.c
arch/arm/mach-omap2/memory.c
arch/arm/mach-omap2/pm.c
arch/arm/mach-omap2/sleep.S
arch/arm/plat-omap/Makefile
arch/arm/plat-omap/common.c
arch/arm/plat-omap/dsp/dsp_common.c
arch/arm/plat-omap/dsp/dsp_common.h
arch/arm/plat-omap/dsp/omap2_dsp.h
arch/arm/plat-omap/timer32k.c
drivers/Makefile
drivers/i2c/busses/i2c-omap.c
drivers/i2c/chips/Kconfig
drivers/i2c/chips/Makefile
drivers/i2c/chips/menelaus.c
drivers/i2c/chips/tlv320aic23.c
drivers/i2c/chips/twl4030_core.c
drivers/mtd/onenand/omap2.c
drivers/spi/Kconfig
drivers/spi/omap2_mcspi.c
drivers/spi/tsc2101.c
drivers/spi/tsc2102.c
drivers/spi/tsc2301-core.c
drivers/video/omap/Kconfig
drivers/video/omap/Makefile
drivers/video/omap/dispc.c
drivers/video/omap/hwa742.c
drivers/video/omap/lcd_apollon.c
drivers/video/omap/lcd_h2.c
drivers/video/omap/lcd_h3.c
drivers/video/omap/lcd_h4.c
drivers/video/omap/lcd_inn1510.c
drivers/video/omap/lcd_inn1610.c
drivers/video/omap/lcd_mipid.c
drivers/video/omap/lcd_osk.c
drivers/video/omap/lcd_p2.c
drivers/video/omap/lcd_palmte.c
drivers/video/omap/lcd_palmtt.c
drivers/video/omap/lcd_palmz71.c
drivers/video/omap/lcd_sx1.c
drivers/video/omap/lcdc.c
drivers/video/omap/omapfb_main.c
drivers/video/omap/rfbi.c
drivers/video/omap/sossi.c
include/asm-arm/arch-omap/board-2430sdp.h
include/asm-arm/arch-omap/eac.h
include/asm-arm/arch-omap/gpio.h
include/asm-arm/arch-omap/hardware.h
include/asm-arm/arch-omap/io.h
include/asm-arm/arch-omap/menelaus.h
include/asm-arm/arch-omap/mmc.h
include/asm-arm/arch-omap/omap24xx.h
include/asm-arm/arch-omap/onenand.h
include/asm-arm/arch-omap/pm.h
include/asm-arm/arch-omap/twl4030.h
include/asm-arm/hardware/tsc2101.h
include/linux/spi/tsc2102.h
net/ipv4/netfilter/Kconfig

1  2 
Makefile
arch/arm/boot/.gitignore
arch/arm/boot/compressed/head.S
drivers/input/keyboard/Kconfig
drivers/media/radio/Kconfig
drivers/media/video/Kconfig
include/linux/input.h

diff --combined Makefile
index a9d1b550ddc4c45f8257f103f3190269fbb3a909,de4f8f7d396c6435065a02ebb8274b54165ec2a6..7ffc37ef7b1e61d5b8c0a4d546638272ecb3a1a2
+++ b/Makefile
@@@ -1,7 -1,7 +1,7 @@@
  VERSION = 2
  PATCHLEVEL = 6
  SUBLEVEL = 22
- EXTRAVERSION = -rc5
+ EXTRAVERSION =
  NAME = Holy Dancing Manatees, Batman!
  
  # *DOCUMENTATION*
@@@ -16,9 -16,6 +16,9 @@@
  # o  print "Entering directory ...";
  MAKEFLAGS += -rR --no-print-directory
  
 +# Add custom flags here to avoid conflict with updates
 +EXTRAVERSION := $(EXTRAVERSION)-omap1
 +
  # We are using a recursive build, so we need to do a little thinking
  # to get the ordering right.
  #
@@@ -166,8 -163,6 +166,8 @@@ SUBARCH := $(shell uname -m | sed -e s/
                                  -e s/s390x/s390/ -e s/parisc64/parisc/ \
                                  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ )
  
 +SUBARCH := arm
 +
  # Cross compiling and selecting different set of gcc/bin-utils
  # ---------------------------------------------------------------------------
  #
  # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
  
  ARCH          ?= $(SUBARCH)
 -CROSS_COMPILE ?=
 +CROSS_COMPILE ?= arm-linux-
  
  # Architecture as present in compile.h
  UTS_MACHINE := $(ARCH)
diff --combined arch/arm/boot/.gitignore
index fc9b99cfcdd0ada120c333f80aa6872c281db4cb,ce1c5ff746e7d2930fc0ec2005b6e65b35bd9a91..bbe9905f3ae79aff1c7d3c2814b351d33fd82537
@@@ -1,3 -1,5 +1,5 @@@
  Image
  zImage
 -uImage
 +uImage
+ xipImage
+ bootpImage
index a8bdecf1af24b256741bb4d29c11803aba913a20,680ea6ed77b89c746715f0a38c42142f52a0b4b3..d7fb5ee1637e8f25e23edcd69b7acbeca019b539
@@@ -436,28 -436,6 +436,28 @@@ __armv4_mmu_cache_on
                mcr     p15, 0, r0, c8, c7, 0   @ flush I,D TLBs
                mov     pc, r12
  
 +__armv7_mmu_cache_on:
 +              mov     r12, lr
 +              mrc     p15, 0, r11, c0, c1, 4  @ read ID_MMFR0
 +              tst     r11, #0xf               @ VMSA
 +              blne    __setup_mmu
 +              mov     r0, #0
 +              mcr     p15, 0, r0, c7, c10, 4  @ drain write buffer
 +              tst     r11, #0xf               @ VMSA
 +              mcrne   p15, 0, r0, c8, c7, 0   @ flush I,D TLBs
 +              mrc     p15, 0, r0, c1, c0, 0   @ read control reg
 +              orr     r0, r0, #0x5000         @ I-cache enable, RR cache replacement
 +              orr     r0, r0, #0x003c         @ write buffer
 +              orrne   r0, r0, #1              @ MMU enabled
 +              movne   r1, #-1
 +              mcrne   p15, 0, r3, c2, c0, 0   @ load page table pointer
 +              mcrne   p15, 0, r1, c3, c0, 0   @ load domain access control
 +              mcr     p15, 0, r0, c1, c0, 0   @ load control register
 +              mrc     p15, 0, r0, c1, c0, 0   @ and read it back
 +              mov     r0, #0
 +              mcr     p15, 0, r0, c7, c5, 4   @ ISB
 +              mov     pc, r12
 +
  __arm6_mmu_cache_on:
                mov     r12, lr
                bl      __setup_mmu
@@@ -644,17 -622,11 +644,17 @@@ proc_types
                b       __armv4_mmu_cache_flush
  
                .word   0x0007b000              @ ARMv6
 -              .word   0x0007f000
 +              .word   0x000ff000
                b       __armv4_mmu_cache_on
                b       __armv4_mmu_cache_off
                b       __armv6_mmu_cache_flush
  
 +              .word   0x000f0000              @ new CPU Id
 +              .word   0x000f0000
 +              b       __armv7_mmu_cache_on
 +              b       __armv7_mmu_cache_off
 +              b       __armv7_mmu_cache_flush
 +
                .word   0                       @ unrecognised type
                .word   0
                mov     pc, lr
@@@ -702,16 -674,6 +702,16 @@@ __armv4_mmu_cache_off
                mcr     p15, 0, r0, c8, c7      @ invalidate whole TLB v4
                mov     pc, lr
  
 +__armv7_mmu_cache_off:
 +              mrc     p15, 0, r0, c1, c0
 +              bic     r0, r0, #0x000d
 +              mcr     p15, 0, r0, c1, c0      @ turn MMU and cache off
 +              mov     r12, lr
 +              bl      __armv7_mmu_cache_flush
 +              mov     r0, #0
 +              mcr     p15, 0, r0, c8, c7, 0   @ invalidate whole TLB
 +              mov     pc, r12
 +
  __arm6_mmu_cache_off:
                mov     r0, #0x00000030         @ ARM6 control reg.
                b       __armv3_mmu_cache_off
@@@ -768,59 -730,6 +768,59 @@@ __armv6_mmu_cache_flush
                mcr     p15, 0, r1, c7, c10, 4  @ drain WB
                mov     pc, lr
  
 +__armv7_mmu_cache_flush:
 +              mrc     p15, 0, r10, c0, c1, 5  @ read ID_MMFR1
 +              tst     r10, #0xf << 16         @ hierarchical cache (ARMv7)
 +              beq     hierarchical
 +              mov     r10, #0
 +              mcr     p15, 0, r10, c7, c14, 0 @ clean+invalidate D
 +              b       iflush
 +hierarchical:
 +              stmfd   sp!, {r0-r5, r7, r9-r11}
 +              mrc     p15, 1, r0, c0, c0, 1   @ read clidr
 +              ands    r3, r0, #0x7000000      @ extract loc from clidr
 +              mov     r3, r3, lsr #23         @ left align loc bit field
 +              beq     finished                @ if loc is 0, then no need to clean
 +              mov     r10, #0                 @ start clean at cache level 0
 +loop1:
 +              add     r2, r10, r10, lsr #1    @ work out 3x current cache level
 +              mov     r1, r0, lsr r2          @ extract cache type bits from clidr
 +              and     r1, r1, #7              @ mask of the bits for current cache only
 +              cmp     r1, #2                  @ see what cache we have at this level
 +              blt     skip                    @ skip if no cache, or just i-cache
 +              mcr     p15, 2, r10, c0, c0, 0  @ select current cache level in cssr
 +              mcr     p15, 0, r10, c7, c5, 4  @ isb to sych the new cssr&csidr
 +              mrc     p15, 1, r1, c0, c0, 0   @ read the new csidr
 +              and     r2, r1, #7              @ extract the length of the cache lines
 +              add     r2, r2, #4              @ add 4 (line length offset)
 +              ldr     r4, =0x3ff
 +              ands    r4, r4, r1, lsr #3      @ find maximum number on the way size
 +              .word   0xe16f5f14              @ clz r5, r4 - find bit position of way size increment
 +              ldr     r7, =0x7fff
 +              ands    r7, r7, r1, lsr #13     @ extract max number of the index size
 +loop2:
 +              mov     r9, r4                  @ create working copy of max way size
 +loop3:
 +              orr     r11, r10, r9, lsl r5    @ factor way and cache number into r11
 +              orr     r11, r11, r7, lsl r2    @ factor index number into r11
 +              mcr     p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way
 +              subs    r9, r9, #1              @ decrement the way
 +              bge     loop3
 +              subs    r7, r7, #1              @ decrement the index
 +              bge     loop2
 +skip:
 +              add     r10, r10, #2            @ increment cache number
 +              cmp     r3, r10
 +              bgt     loop1
 +finished:
 +              mov     r10, #0                 @ swith back to cache level 0
 +              mcr     p15, 2, r10, c0, c0, 0  @ select current cache level in cssr
 +              ldmfd   sp!, {r0-r5, r7, r9-r11}
 +iflush:
 +              mcr     p15, 0, r10, c7, c5, 0  @ invalidate I+BTB
 +              mcr     p15, 0, r10, c7, c10, 4 @ drain WB
 +              mov     pc, lr
 +
  __armv4_mmu_cache_flush:
                mov     r2, #64*1024            @ default: 32K dcache size (*2)
                mov     r11, #32                @ default: 32 byte line size
@@@ -927,6 -836,7 +927,7 @@@ memdump:   mov     r12, r
                mov     pc, r10
  #endif
  
+               .ltorg
  reloc_end:
  
                .align
index f303b6e127085dc4d67fe814a5f3028043ad8681,c97d5eb0075df2954c3eb741a6d91f9e78e7e182..0dddbb04868e3e67d2a3eb85efbef86953627a93
@@@ -164,6 -164,9 +164,9 @@@ config KEYBOARD_AMIG
          To compile this driver as a module, choose M here: the
          module will be called amikbd.
  
+ config ATARI_KBD_CORE
+       bool
  config KEYBOARD_ATARI
        tristate "Atari keyboard"
        depends on ATARI
@@@ -214,26 -217,6 +217,26 @@@ config KEYBOARD_OMA
          To compile this driver as a module, choose M here: the
          module will be called omap-keypad.
  
 +config KEYBOARD_TWL4030
 +      tristate "TI TWL4030 keypad support"
 +      depends on TWL4030_CORE && MACH_OMAP_2430SDP
 +      help
 +        Say Y here if you want to use the OMAP TWL4030 keypad.
 +
 +        To compile this driver as a module, choose M here: the
 +        module will be called omap-twl4030keypad. This driver depends on
 +        TWL4030 Core and TWL4030 GPIO I2C client driver
 +
 +config OMAP_PS2
 +      tristate "TI OMAP Innovator 1510 PS/2 keyboard & mouse support"
 +      depends on ARCH_OMAP15XX && MACH_OMAP_INNOVATOR
 +      help
 +        Say Y here if you want to use the OMAP Innovator 1510 PS/2
 +        keyboard and mouse.
 +
 +        To compile this driver as a module, choose M here: the
 +        module will be called innovator_ps2.
 +
  config KEYBOARD_PXA27x
        tristate "PXA27x keyboard support"
        depends on PXA27x
@@@ -270,10 -253,4 +273,10 @@@ config KEYBOARD_GPI
          To compile this driver as a module, choose M here: the
          module will be called gpio-keys.
  
 +config KEYBOARD_TSC2301
 +      tristate "TSC2301 keypad support"
 +      depends on SPI_TSC2301
 +      help
 +        Say Y here for if you are using the keypad features of TSC2301.
 +
  endif
index 87cae00bc2dada46e07337052289ba4b6bc10dd8,194b102140ef5f03501631f803cf54f2b614299b..d8557f2f0d5c3794818b3c77edb24a1011d0da7d
@@@ -9,7 -9,7 +9,7 @@@ menuconfig RADIO_ADAPTER
        ---help---
          Say Y here to enable selecting AM/FM radio adapters.
  
- if RADIO_ADAPTERS
+ if RADIO_ADAPTERS && VIDEO_DEV
  
  config RADIO_CADET
        tristate "ADS Cadet AM/FM Tuner"
@@@ -323,21 -323,6 +323,21 @@@ config RADIO_ZOLTRIX_POR
        help
          Enter the I/O port of your Zoltrix radio card.
  
 +config RADIO_TEA5761
 +      tristate "Philips Semiconductors TEA5761 I2C FM Radio"
 +      select I2C
 +      select VIDEO_V4L2
 +      help
 +        Choose Y here if you have one of these AM/FM radio cards.
 +
 +        In order to control your radio card, you will need to use programs
 +        that are compatible with the Video For Linux 2 API.  Information on
 +        this API and pointers to "v4l" programs may be found at
 +        <file:Documentation/video4linux/API.html>.
 +
 +        To compile this driver as a module, choose M here: the
 +        module will be called radio-tea5761.
 +
  config USB_DSBR
        tristate "D-Link USB FM radio support (EXPERIMENTAL)"
        depends on USB && VIDEO_V4L2 && EXPERIMENTAL
index 2f43d7aeebee49b865156b53a3e568f8c7afa7bd,4d45a40016deec706dda8d011653aa27c73193d7..a675126a52c3c464189297a4a554b1089244c972
@@@ -11,7 -11,7 +11,7 @@@ menuconfig VIDEO_CAPTURE_DRIVER
          webcams, analog TV, and hybrid analog/digital TV.
          Some of those devices also supports FM radio.
  
- if VIDEO_CAPTURE_DRIVERS
+ if VIDEO_CAPTURE_DRIVERS && VIDEO_DEV
  
  config VIDEO_ADV_DEBUG
        bool "Enable advanced debug functionality"
@@@ -347,7 -347,7 +347,7 @@@ endmenu # encoder / decoder chip
  
  config VIDEO_VIVI
        tristate "Virtual Video Driver"
-       depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 && PCI && VIDEO_DEV
+       depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 && PCI
        select VIDEO_BUF
        default n
        ---help---
@@@ -654,8 -654,6 +654,8 @@@ source "drivers/media/video/cx88/Kconfi
  
  source "drivers/media/video/ivtv/Kconfig"
  
 +source drivers/media/video/omap/Kconfig
 +
  config VIDEO_M32R_AR
        tristate "AR devices"
        depends on M32R && VIDEO_V4L1
@@@ -693,7 -691,7 +693,7 @@@ menuconfig V4L_USB_DRIVER
        depends on USB
        default y
  
- if V4L_USB_DRIVERS
+ if V4L_USB_DRIVERS && USB
  
  source "drivers/media/video/pvrusb2/Kconfig"
  
diff --combined include/linux/input.h
index a6315593a0d818384c70f9811a4257d1ed966543,d8521c72f69f9ff4aad1fc97223cd6dbadd5923d..36fa51ecf340f5109ce327f0dbb21f29ba11fc85
@@@ -108,6 -108,13 +108,13 @@@ struct input_absinfo 
  
  /*
   * Keys and buttons
+  *
+  * Most of the keys/buttons are modeled after USB HUT 1.12
+  * (see http://www.usb.org/developers/hidpage).
+  * Abbreviations in the comments:
+  * AC - Application Control
+  * AL - Application Launch Button
+  * SC - System Control
   */
  
  #define KEY_RESERVED          0
  #define KEY_MUTE              113
  #define KEY_VOLUMEDOWN                114
  #define KEY_VOLUMEUP          115
- #define KEY_POWER             116
+ #define KEY_POWER             116     /* SC System Power Down */
  #define KEY_KPEQUAL           117
  #define KEY_KPPLUSMINUS               118
  #define KEY_PAUSE             119
  #define KEY_RIGHTMETA         126
  #define KEY_COMPOSE           127
  
- #define KEY_STOP              128
+ #define KEY_STOP              128     /* AC Stop */
  #define KEY_AGAIN             129
- #define KEY_PROPS             130
- #define KEY_UNDO              131
+ #define KEY_PROPS             130     /* AC Properties */
+ #define KEY_UNDO              131     /* AC Undo */
  #define KEY_FRONT             132
- #define KEY_COPY              133
- #define KEY_OPEN              134
- #define KEY_PASTE             135
- #define KEY_FIND              136
- #define KEY_CUT                       137
- #define KEY_HELP              138
- #define KEY_MENU              139
- #define KEY_CALC              140
+ #define KEY_COPY              133     /* AC Copy */
+ #define KEY_OPEN              134     /* AC Open */
+ #define KEY_PASTE             135     /* AC Paste */
+ #define KEY_FIND              136     /* AC Search */
+ #define KEY_CUT                       137     /* AC Cut */
+ #define KEY_HELP              138     /* AL Integrated Help Center */
+ #define KEY_MENU              139     /* Menu (show menu) */
+ #define KEY_CALC              140     /* AL Calculator */
  #define KEY_SETUP             141
- #define KEY_SLEEP             142
- #define KEY_WAKEUP            143
- #define KEY_FILE              144
+ #define KEY_SLEEP             142     /* SC System Sleep */
+ #define KEY_WAKEUP            143     /* System Wake Up */
+ #define KEY_FILE              144     /* AL Local Machine Browser */
  #define KEY_SENDFILE          145
  #define KEY_DELETEFILE                146
  #define KEY_XFER              147
  #define KEY_PROG1             148
  #define KEY_PROG2             149
- #define KEY_WWW                       150
+ #define KEY_WWW                       150     /* AL Internet Browser */
  #define KEY_MSDOS             151
- #define KEY_COFFEE            152
+ #define KEY_COFFEE            152     /* AL Terminal Lock/Screensaver */
+ #define KEY_SCREENLOCK                KEY_COFFEE
  #define KEY_DIRECTION         153
  #define KEY_CYCLEWINDOWS      154
  #define KEY_MAIL              155
- #define KEY_BOOKMARKS         156
+ #define KEY_BOOKMARKS         156     /* AC Bookmarks */
  #define KEY_COMPUTER          157
- #define KEY_BACK              158
- #define KEY_FORWARD           159
+ #define KEY_BACK              158     /* AC Back */
+ #define KEY_FORWARD           159     /* AC Forward */
  #define KEY_CLOSECD           160
  #define KEY_EJECTCD           161
  #define KEY_EJECTCLOSECD      162
  #define KEY_STOPCD            166
  #define KEY_RECORD            167
  #define KEY_REWIND            168
- #define KEY_PHONE             169
+ #define KEY_PHONE             169     /* Media Select Telephone */
  #define KEY_ISO                       170
- #define KEY_CONFIG            171
- #define KEY_HOMEPAGE          172
- #define KEY_REFRESH           173
- #define KEY_EXIT              174
+ #define KEY_CONFIG            171     /* AL Consumer Control Configuration */
+ #define KEY_HOMEPAGE          172     /* AC Home */
+ #define KEY_REFRESH           173     /* AC Refresh */
+ #define KEY_EXIT              174     /* AC Exit */
  #define KEY_MOVE              175
  #define KEY_EDIT              176
  #define KEY_SCROLLUP          177
  #define KEY_SCROLLDOWN                178
  #define KEY_KPLEFTPAREN               179
  #define KEY_KPRIGHTPAREN      180
- #define KEY_NEW                       181
- #define KEY_REDO              182
+ #define KEY_NEW                       181     /* AC New */
+ #define KEY_REDO              182     /* AC Redo/Repeat */
  
  #define KEY_F13                       183
  #define KEY_F14                       184
  #define KEY_PROG3             202
  #define KEY_PROG4             203
  #define KEY_SUSPEND           205
- #define KEY_CLOSE             206
+ #define KEY_CLOSE             206     /* AC Close */
  #define KEY_PLAY              207
  #define KEY_FASTFORWARD               208
  #define KEY_BASSBOOST         209
- #define KEY_PRINT             210
+ #define KEY_PRINT             210     /* AC Print */
  #define KEY_HP                        211
  #define KEY_CAMERA            212
  #define KEY_SOUND             213
  #define KEY_CHAT              216
  #define KEY_SEARCH            217
  #define KEY_CONNECT           218
- #define KEY_FINANCE           219
+ #define KEY_FINANCE           219     /* AL Checkbook/Finance */
  #define KEY_SPORT             220
  #define KEY_SHOP              221
  #define KEY_ALTERASE          222
- #define KEY_CANCEL            223
+ #define KEY_CANCEL            223     /* AC Cancel */
  #define KEY_BRIGHTNESSDOWN    224
  #define KEY_BRIGHTNESSUP      225
  #define KEY_MEDIA             226
  
 -#define KEY_SWITCHVIDEOMODE   227
 -#define KEY_KBDILLUMTOGGLE    228
 -#define KEY_KBDILLUMDOWN      229
 -#define KEY_KBDILLUMUP                230
 +
 +/*Zeus: these keys are defined for OMAP730 Perseus2*/
 +#define KEY_STAR              227
 +#define KEY_SHARP             228
 +#define KEY_SOFT1             229
 +#define KEY_SOFT2             230
 +#define KEY_SEND              231
 +#define KEY_CENTER            232
 +#define KEY_HEADSETHOOK               233
 +#define KEY_0_5                       234
 +#define KEY_2_5                       235
 +
 +#define KEY_SWITCHVIDEOMODE   236
 +#define KEY_KBDILLUMTOGGLE    237
 +#define KEY_KBDILLUMDOWN      238
 +#define KEY_KBDILLUMUP                239
  
- #define KEY_SEND              231
- #define KEY_REPLY             232
- #define KEY_FORWARDMAIL               233
- #define KEY_SAVE              234
+ #define KEY_SEND              231     /* AC Send */
+ #define KEY_REPLY             232     /* AC Reply */
+ #define KEY_FORWARDMAIL               233     /* AC Forward Msg */
+ #define KEY_SAVE              234     /* AC Save */
  #define KEY_DOCUMENTS         235
  
  #define KEY_BATTERY           236
  #define KEY_CLEAR             0x163
  #define KEY_POWER2            0x164
  #define KEY_OPTION            0x165
- #define KEY_INFO              0x166
+ #define KEY_INFO              0x166   /* AL OEM Features/Tips/Tutorial */
  #define KEY_TIME              0x167
  #define KEY_VENDOR            0x168
  #define KEY_ARCHIVE           0x169
- #define KEY_PROGRAM           0x16a
+ #define KEY_PROGRAM           0x16a   /* Media Select Program Guide */
  #define KEY_CHANNEL           0x16b
  #define KEY_FAVORITES         0x16c
  #define KEY_EPG                       0x16d
- #define KEY_PVR                       0x16e
+ #define KEY_PVR                       0x16e   /* Media Select Home */
  #define KEY_MHP                       0x16f
  #define KEY_LANGUAGE          0x170
  #define KEY_TITLE             0x171
  #define KEY_MODE              0x175
  #define KEY_KEYBOARD          0x176
  #define KEY_SCREEN            0x177
- #define KEY_PC                        0x178
- #define KEY_TV                        0x179
- #define KEY_TV2                       0x17a
- #define KEY_VCR                       0x17b
- #define KEY_VCR2              0x17c
- #define KEY_SAT                       0x17d
+ #define KEY_PC                        0x178   /* Media Select Computer */
+ #define KEY_TV                        0x179   /* Media Select TV */
+ #define KEY_TV2                       0x17a   /* Media Select Cable */
+ #define KEY_VCR                       0x17b   /* Media Select VCR */
+ #define KEY_VCR2              0x17c   /* VCR Plus */
+ #define KEY_SAT                       0x17d   /* Media Select Satellite */
  #define KEY_SAT2              0x17e
- #define KEY_CD                        0x17f
- #define KEY_TAPE              0x180
+ #define KEY_CD                        0x17f   /* Media Select CD */
+ #define KEY_TAPE              0x180   /* Media Select Tape */
  #define KEY_RADIO             0x181
- #define KEY_TUNER             0x182
+ #define KEY_TUNER             0x182   /* Media Select Tuner */
  #define KEY_PLAYER            0x183
  #define KEY_TEXT              0x184
- #define KEY_DVD                       0x185
+ #define KEY_DVD                       0x185   /* Media Select DVD */
  #define KEY_AUX                       0x186
  #define KEY_MP3                       0x187
  #define KEY_AUDIO             0x188
  #define KEY_VIDEO             0x189
  #define KEY_DIRECTORY         0x18a
  #define KEY_LIST              0x18b
- #define KEY_MEMO              0x18c
+ #define KEY_MEMO              0x18c   /* Media Select Messages */
  #define KEY_CALENDAR          0x18d
  #define KEY_RED                       0x18e
  #define KEY_GREEN             0x18f
  #define KEY_YELLOW            0x190
  #define KEY_BLUE              0x191
- #define KEY_CHANNELUP         0x192
- #define KEY_CHANNELDOWN               0x193
+ #define KEY_CHANNELUP         0x192   /* Channel Increment */
+ #define KEY_CHANNELDOWN               0x193   /* Channel Decrement */
  #define KEY_FIRST             0x194
- #define KEY_LAST              0x195
+ #define KEY_LAST              0x195   /* Recall Last */
  #define KEY_AB                        0x196
  #define KEY_NEXT              0x197
  #define KEY_RESTART           0x198
  #define KEY_DIGITS            0x19d
  #define KEY_TEEN              0x19e
  #define KEY_TWEN              0x19f
- #define KEY_VIDEOPHONE                0x1a0
- #define KEY_GAMES             0x1a1
- #define KEY_ZOOMIN            0x1a2
- #define KEY_ZOOMOUT           0x1a3
- #define KEY_ZOOMRESET         0x1a4
- #define KEY_WORDPROCESSOR     0x1a5
- #define KEY_EDITOR            0x1a6
- #define KEY_SPREADSHEET               0x1a7
- #define KEY_GRAPHICSEDITOR    0x1a8
- #define KEY_PRESENTATION      0x1a9
- #define KEY_DATABASE          0x1aa
- #define KEY_NEWS              0x1ab
- #define KEY_VOICEMAIL         0x1ac
- #define KEY_ADDRESSBOOK               0x1ad
- #define KEY_MESSENGER         0x1ae
+ #define KEY_VIDEOPHONE                0x1a0   /* Media Select Video Phone */
+ #define KEY_GAMES             0x1a1   /* Media Select Games */
+ #define KEY_ZOOMIN            0x1a2   /* AC Zoom In */
+ #define KEY_ZOOMOUT           0x1a3   /* AC Zoom Out */
+ #define KEY_ZOOMRESET         0x1a4   /* AC Zoom */
+ #define KEY_WORDPROCESSOR     0x1a5   /* AL Word Processor */
+ #define KEY_EDITOR            0x1a6   /* AL Text Editor */
+ #define KEY_SPREADSHEET               0x1a7   /* AL Spreadsheet */
+ #define KEY_GRAPHICSEDITOR    0x1a8   /* AL Graphics Editor */
+ #define KEY_PRESENTATION      0x1a9   /* AL Presentation App */
+ #define KEY_DATABASE          0x1aa   /* AL Database App */
+ #define KEY_NEWS              0x1ab   /* AL Newsreader */
+ #define KEY_VOICEMAIL         0x1ac   /* AL Voicemail */
+ #define KEY_ADDRESSBOOK               0x1ad   /* AL Contacts/Address Book */
+ #define KEY_MESSENGER         0x1ae   /* AL Instant Messaging */
  #define KEY_DISPLAYTOGGLE     0x1af   /* Turn display (LCD) on and off */
  
  #define KEY_DEL_EOL           0x1c0
  #define SW_LID                        0x00  /* set = lid shut */
  #define SW_TABLET_MODE                0x01  /* set = tablet mode */
  #define SW_HEADPHONE_INSERT   0x02  /* set = inserted */
+ #define SW_RADIO              0x03  /* set = radio enabled */
  #define SW_MAX                        0x0f
  
  /*