Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
imon.c File Reference
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/ratelimit.h>
#include <linux/input.h>
#include <linux/usb.h>
#include <linux/usb/input.h>
#include <media/rc-core.h>
#include <linux/time.h>
#include <linux/timer.h>

Go to the source code of this file.

Data Structures

struct  imon_context
 
struct  imon_context::tx_t
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ":%s: " fmt, __func__
 
#define MOD_AUTHOR   "Jarod Wilson <[email protected]>"
 
#define MOD_DESC   "Driver for SoundGraph iMON MultiMedia IR/Display"
 
#define MOD_NAME   "imon"
 
#define MOD_VERSION   "0.9.4"
 
#define DISPLAY_MINOR_BASE   144
 
#define DEVICE_NAME   "lcd%d"
 
#define BUF_CHUNK_SIZE   8
 
#define BUF_SIZE   128
 
#define BIT_DURATION   250 /* each bit received is 250us */
 
#define IMON_CLOCK_ENABLE_PACKETS   2
 
#define TOUCH_TIMEOUT   (HZ/30)
 
#define MCE_KEY_MASK   0x7000
 
#define MCE_TOGGLE_BIT   0x8000
 

Enumerations

enum  {
  IMON_DISPLAY_TYPE_AUTO = 0, IMON_DISPLAY_TYPE_VFD = 1, IMON_DISPLAY_TYPE_LCD = 2, IMON_DISPLAY_TYPE_VGA = 3,
  IMON_DISPLAY_TYPE_NONE = 4
}
 
enum  { IMON_KEY_IMON = 0, IMON_KEY_MCE = 1, IMON_KEY_PANEL = 2 }
 

Functions

 MODULE_AUTHOR (MOD_AUTHOR)
 
 MODULE_DESCRIPTION (MOD_DESC)
 
 MODULE_VERSION (MOD_VERSION)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (usb, imon_usb_id_table)
 
 module_param (debug, bool, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (debug,"Debug messages: 0=no, 1=yes (default: no)")
 
 module_param (display_type, int, S_IRUGO)
 
 MODULE_PARM_DESC (display_type,"Type of attached display. 0=autodetect, ""1=vfd, 2=lcd, 3=vga, 4=none (default: autodetect)")
 
 module_param (pad_stabilize, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (pad_stabilize,"Apply stabilization algorithm to iMON PAD ""presses in arrow key mode. 0=disable, 1=enable (default).")
 
 module_param (nomouse, bool, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (nomouse,"Disable mouse input device mode when IR device is ""open. 0=don't disable, 1=disable. (default: don't disable)")
 
 module_param (pad_thresh, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (pad_thresh,"Threshold at which a pad push registers as an ""arrow key in kbd mode (default: 28)")
 
 module_usb_driver (imon_driver)
 

Macro Definition Documentation

#define BIT_DURATION   250 /* each bit received is 250us */

Definition at line 58 of file imon.c.

#define BUF_CHUNK_SIZE   8

Definition at line 55 of file imon.c.

#define BUF_SIZE   128

Definition at line 56 of file imon.c.

#define DEVICE_NAME   "lcd%d"

Definition at line 53 of file imon.c.

#define DISPLAY_MINOR_BASE   144

Definition at line 52 of file imon.c.

#define IMON_CLOCK_ENABLE_PACKETS   2

Definition at line 60 of file imon.c.

#define MCE_KEY_MASK   0x7000
#define MCE_TOGGLE_BIT   0x8000
#define MOD_AUTHOR   "Jarod Wilson <[email protected]>"

Definition at line 47 of file imon.c.

#define MOD_DESC   "Driver for SoundGraph iMON MultiMedia IR/Display"

Definition at line 48 of file imon.c.

#define MOD_NAME   "imon"

Definition at line 49 of file imon.c.

#define MOD_VERSION   "0.9.4"

Definition at line 50 of file imon.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ":%s: " fmt, __func__

Definition at line 29 of file imon.c.

#define TOUCH_TIMEOUT   (HZ/30)

Definition at line 154 of file imon.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
IMON_DISPLAY_TYPE_AUTO 
IMON_DISPLAY_TYPE_VFD 
IMON_DISPLAY_TYPE_LCD 
IMON_DISPLAY_TYPE_VGA 
IMON_DISPLAY_TYPE_NONE 

Definition at line 174 of file imon.c.

anonymous enum
Enumerator:
IMON_KEY_IMON 
IMON_KEY_MCE 
IMON_KEY_PANEL 

Definition at line 182 of file imon.c.

Function Documentation

MODULE_AUTHOR ( MOD_AUTHOR  )
MODULE_DESCRIPTION ( MOD_DESC  )
MODULE_DEVICE_TABLE ( usb  ,
imon_usb_id_table   
)
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
bool  ,
S_IRUGO S_IWUSR 
)
module_param ( display_type  ,
int  ,
S_IRUGO   
)
module_param ( pad_stabilize  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( nomouse  ,
bool  ,
S_IRUGO S_IWUSR 
)
module_param ( pad_thresh  ,
int  ,
S_IRUGO S_IWUSR 
)
MODULE_PARM_DESC ( debug  ,
"Debug messages:  0 = no 
)
MODULE_PARM_DESC ( display_type  ,
"Type of attached display.  0 = autodetect,
""  1 = vfd,
= lcd,
= vga 
)
MODULE_PARM_DESC ( pad_stabilize  ,
"Apply stabilization algorithm to iMON PAD ""presses in arrow key mode.  0 = disable 
)
MODULE_PARM_DESC ( nomouse  ,
"Disable mouse input device mode when IR device is ""open.  0 = don't disable 
)
MODULE_PARM_DESC ( pad_thresh  ,
"Threshold at which a pad push registers as an ""arrow key in kbd mode (default: 28)"   
)
module_usb_driver ( imon_driver  )
MODULE_VERSION ( MOD_VERSION  )

Variable Documentation

u64 hw_code

Definition at line 278 of file imon.c.

u32 keycode

Definition at line 279 of file imon.c.