Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
input.c File Reference
#include <linux/init.h>
#include <linux/types.h>
#include <linux/idr.h>
#include <linux/input/mt.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/random.h>
#include <linux/major.h>
#include <linux/proc_fs.h>
#include <linux/sched.h>
#include <linux/seq_file.h>
#include <linux/poll.h>
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/rcupdate.h>
#include "input-compat.h"

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_BASENAME ": " fmt
 
#define INPUT_MAX_CHAR_DEVICES   1024
 
#define INPUT_FIRST_DYNAMIC_DEV   256
 
#define INPUT_IGNORE_EVENT   0
 
#define INPUT_PASS_TO_HANDLERS   1
 
#define INPUT_PASS_TO_DEVICE   2
 
#define INPUT_SLOT   4
 
#define INPUT_FLUSH   8
 
#define INPUT_PASS_TO_ALL   (INPUT_PASS_TO_HANDLERS | INPUT_PASS_TO_DEVICE)
 
#define INPUT_DEV_STRING_ATTR_SHOW(name)
 
#define INPUT_DEV_ID_ATTR(name)
 
#define INPUT_DEV_CAP_ATTR(ev, bm)
 
#define INPUT_ADD_HOTPLUG_VAR(fmt, val...)
 
#define INPUT_ADD_HOTPLUG_BM_VAR(name, bm, max)
 
#define INPUT_ADD_HOTPLUG_MODALIAS_VAR(dev)
 
#define INPUT_DO_TOGGLE(dev, type, bits, on)
 
#define INPUT_CLEANSE_BITMASK(dev, type, bits)
 

Functions

 MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>")
 
 MODULE_DESCRIPTION ("Input core")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define INPUT_ADD_HOTPLUG_BM_VAR (   name,
  bm,
  max 
)
Value:
do { \
int err = input_add_uevent_bm_var(env, name, bm, max); \
if (err) \
return err; \
} while (0)
#define INPUT_ADD_HOTPLUG_MODALIAS_VAR (   dev)
Value:
do { \
int err = input_add_uevent_modalias_var(env, dev); \
if (err) \
return err; \
} while (0)
#define INPUT_ADD_HOTPLUG_VAR (   fmt,
  val... 
)
Value:
do { \
if (err) \
return err; \
} while (0)
#define INPUT_CLEANSE_BITMASK (   dev,
  type,
  bits 
)
Value:
do { \
if (!test_bit(EV_##type, dev->evbit)) \
memset(dev->bits##bit, 0, \
sizeof(dev->bits##bit)); \
} while (0)
#define INPUT_DEV_CAP_ATTR (   ev,
  bm 
)
Value:
static ssize_t input_dev_show_cap_##bm(struct device *dev, \
char *buf) \
{ \
struct input_dev *input_dev = to_input_dev(dev); \
int len = input_print_bitmap(buf, PAGE_SIZE, \
input_dev->bm##bit, ev##_MAX, \
true); \
return min_t(int, len, PAGE_SIZE); \
} \
static DEVICE_ATTR(bm, S_IRUGO, input_dev_show_cap_##bm, NULL)
#define INPUT_DEV_ID_ATTR (   name)
Value:
static ssize_t input_dev_show_id_##name(struct device *dev, \
char *buf) \
{ \
struct input_dev *input_dev = to_input_dev(dev); \
return scnprintf(buf, PAGE_SIZE, "%04x\n", input_dev->id.name); \
} \
static DEVICE_ATTR(name, S_IRUGO, input_dev_show_id_##name, NULL)
#define INPUT_DEV_STRING_ATTR_SHOW (   name)
Value:
static ssize_t input_dev_show_##name(struct device *dev, \
char *buf) \
{ \
struct input_dev *input_dev = to_input_dev(dev); \
\
return scnprintf(buf, PAGE_SIZE, "%s\n", \
input_dev->name ? input_dev->name : ""); \
} \
static DEVICE_ATTR(name, S_IRUGO, input_dev_show_##name, NULL)
#define INPUT_DO_TOGGLE (   dev,
  type,
  bits,
  on 
)
Value:
do { \
int i; \
if (!test_bit(EV_##type, dev->evbit)) \
break; \
for (i = 0; i < type##_MAX; i++) { \
if (!test_bit(i, dev->bits##bit)) \
continue; \
\
active = test_bit(i, dev->bits); \
if (!active && !on) \
continue; \
\
dev->event(dev, EV_##type, i, on ? active : 0); \
} \
} while (0)
#define INPUT_FIRST_DYNAMIC_DEV   256

Definition at line 37 of file input.c.

#define INPUT_FLUSH   8

Definition at line 206 of file input.c.

#define INPUT_IGNORE_EVENT   0

Definition at line 202 of file input.c.

#define INPUT_MAX_CHAR_DEVICES   1024

Definition at line 36 of file input.c.

#define INPUT_PASS_TO_ALL   (INPUT_PASS_TO_HANDLERS | INPUT_PASS_TO_DEVICE)

Definition at line 207 of file input.c.

#define INPUT_PASS_TO_DEVICE   2

Definition at line 204 of file input.c.

#define INPUT_PASS_TO_HANDLERS   1

Definition at line 203 of file input.c.

#define INPUT_SLOT   4

Definition at line 205 of file input.c.

#define pr_fmt (   fmt)    KBUILD_BASENAME ": " fmt

Definition at line 13 of file input.c.

Function Documentation

MODULE_AUTHOR ( "Vojtech Pavlik <[email protected]>"  )
MODULE_DESCRIPTION ( "Input core )
MODULE_LICENSE ( "GPL"  )