Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
tc1100-wmi.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/types.h>
#include <acpi/acpi.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
#include <linux/platform_device.h>

Go to the source code of this file.

Data Structures

struct  tc1100_data
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define GUID   "C364AC71-36DB-495A-8494-B439D472A505"
 
#define TC1100_INSTANCE_WIRELESS   1
 
#define TC1100_INSTANCE_JOGDIAL   2
 
#define show_set_bool(value, instance)
 

Functions

 MODULE_AUTHOR ("Jamey Hicks, Carlos Corbacho")
 
 MODULE_DESCRIPTION ("HP Compaq TC1100 Tablet WMI Extras")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("wmi:C364AC71-36DB-495A-8494-B439D472A505")
 
 show_set_bool (wireless, TC1100_INSTANCE_WIRELESS)
 
 show_set_bool (jogdial, TC1100_INSTANCE_JOGDIAL)
 
 module_init (tc1100_init)
 
 module_exit (tc1100_exit)
 

Macro Definition Documentation

unsigned char GUID   "C364AC71-36DB-495A-8494-B439D472A505"

Definition at line 40 of file tc1100-wmi.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 28 of file tc1100-wmi.c.

#define show_set_bool (   value,
  instance 
)
Value:
static ssize_t \
show_bool_##value(struct device *dev, struct device_attribute *attr, \
char *buf) \
{ \
acpi_status status = get_state(&result, instance); \
if (ACPI_SUCCESS(status)) \
return sprintf(buf, "%d\n", result); \
return sprintf(buf, "Read error\n"); \
} \
\
static ssize_t \
set_bool_##value(struct device *dev, struct device_attribute *attr, \
const char *buf, size_t count) \
{ \
acpi_status status = set_state(&tmp, instance); \
if (ACPI_FAILURE(status)) \
return -EINVAL; \
return count; \
} \
show_bool_##value, set_bool_##value);

Definition at line 142 of file tc1100-wmi.c.

#define TC1100_INSTANCE_JOGDIAL   2

Definition at line 43 of file tc1100-wmi.c.

#define TC1100_INSTANCE_WIRELESS   1

Definition at line 42 of file tc1100-wmi.c.

Function Documentation

MODULE_ALIAS ( "wmi:C364AC71-36DB-495A-8494-B439D472A505"  )
MODULE_AUTHOR ( "Jamey  Hicks,
Carlos Corbacho"   
)
MODULE_DESCRIPTION ( "HP Compaq TC1100 Tablet WMI Extras"  )
module_exit ( tc1100_exit  )
module_init ( tc1100_init  )
MODULE_LICENSE ( "GPL"  )
show_set_bool ( wireless  ,
TC1100_INSTANCE_WIRELESS   
)
show_set_bool ( jogdial  ,
TC1100_INSTANCE_JOGDIAL   
)