Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
hid-roccat-savu.c File Reference
#include <linux/device.h>
#include <linux/input.h>
#include <linux/hid.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/hid-roccat.h>
#include "hid-ids.h"
#include "hid-roccat-common.h"
#include "hid-roccat-savu.h"

Go to the source code of this file.

Macros

#define SAVU_SYSFS_W(thingy, THINGY)
 
#define SAVU_SYSFS_R(thingy, THINGY)
 
#define SAVU_SYSFS_RW(thingy, THINGY)
 
#define SAVU_BIN_ATTRIBUTE_RW(thingy, THINGY)
 
#define SAVU_BIN_ATTRIBUTE_R(thingy, THINGY)
 
#define SAVU_BIN_ATTRIBUTE_W(thingy, THINGY)
 

Functions

 MODULE_DEVICE_TABLE (hid, savu_devices)
 
 module_init (savu_init)
 
 module_exit (savu_exit)
 
 MODULE_AUTHOR ("Stefan Achatz")
 
 MODULE_DESCRIPTION ("USB Roccat Savu driver")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define SAVU_BIN_ATTRIBUTE_R (   thingy,
  THINGY 
)
Value:
{ \
.attr = { .name = #thingy, .mode = 0440 }, \
.size = SAVU_SIZE_ ## THINGY, \
.read = savu_sysfs_read_ ## thingy, \
}

Definition at line 104 of file hid-roccat-savu.c.

#define SAVU_BIN_ATTRIBUTE_RW (   thingy,
  THINGY 
)
Value:
{ \
.attr = { .name = #thingy, .mode = 0660 }, \
.size = SAVU_SIZE_ ## THINGY, \
.read = savu_sysfs_read_ ## thingy, \
.write = savu_sysfs_write_ ## thingy \
}

Definition at line 96 of file hid-roccat-savu.c.

#define SAVU_BIN_ATTRIBUTE_W (   thingy,
  THINGY 
)
Value:
{ \
.attr = { .name = #thingy, .mode = 0220 }, \
.size = SAVU_SIZE_ ## THINGY, \
.write = savu_sysfs_write_ ## thingy \
}

Definition at line 111 of file hid-roccat-savu.c.

#define SAVU_SYSFS_R (   thingy,
  THINGY 
)
Value:
static ssize_t savu_sysfs_read_ ## thingy(struct file *fp, \
struct kobject *kobj, struct bin_attribute *attr, char *buf, \
loff_t off, size_t count) \
{ \
return savu_sysfs_read(fp, kobj, buf, off, count, \
SAVU_SIZE_ ## THINGY, SAVU_COMMAND_ ## THINGY); \
}

Definition at line 83 of file hid-roccat-savu.c.

#define SAVU_SYSFS_RW (   thingy,
  THINGY 
)
Value:
SAVU_SYSFS_W(thingy, THINGY) \
SAVU_SYSFS_R(thingy, THINGY)

Definition at line 92 of file hid-roccat-savu.c.

#define SAVU_SYSFS_W (   thingy,
  THINGY 
)
Value:
static ssize_t savu_sysfs_write_ ## thingy(struct file *fp, \
struct kobject *kobj, struct bin_attribute *attr, char *buf, \
loff_t off, size_t count) \
{ \
return savu_sysfs_write(fp, kobj, buf, off, count, \
SAVU_SIZE_ ## THINGY, SAVU_COMMAND_ ## THINGY); \
}

Definition at line 74 of file hid-roccat-savu.c.

Function Documentation

MODULE_AUTHOR ( "Stefan Achatz"  )
MODULE_DESCRIPTION ( "USB Roccat Savu driver )
MODULE_DEVICE_TABLE ( hid  ,
savu_devices   
)
module_exit ( savu_exit  )
module_init ( savu_init  )
MODULE_LICENSE ( "GPL v2 )