Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
gpio_keys.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/sched.h>
#include <linux/pm.h>
#include <linux/slab.h>
#include <linux/sysctl.h>
#include <linux/proc_fs.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/input.h>
#include <linux/gpio_keys.h>
#include <linux/workqueue.h>
#include <linux/gpio.h>
#include <linux/of_platform.h>
#include <linux/of_gpio.h>
#include <linux/spinlock.h>

Go to the source code of this file.

Data Structures

struct  gpio_button_data
 
struct  gpio_keys_drvdata
 

Macros

#define ATTR_SHOW_FN(name, type, only_disabled)
 
#define ATTR_STORE_FN(name, type)
 

Functions

 ATTR_SHOW_FN (keys, EV_KEY, false)
 
 ATTR_SHOW_FN (switches, EV_SW, false)
 
 ATTR_SHOW_FN (disabled_keys, EV_KEY, true)
 
 ATTR_SHOW_FN (disabled_switches, EV_SW, true)
 
 ATTR_STORE_FN (disabled_keys, EV_KEY)
 
 ATTR_STORE_FN (disabled_switches, EV_SW)
 
 late_initcall (gpio_keys_init)
 
 module_exit (gpio_keys_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Phil Blundell <[email protected]>")
 
 MODULE_DESCRIPTION ("Keyboard driver for GPIOs")
 
 MODULE_ALIAS ("platform:gpio-keys")
 

Macro Definition Documentation

#define ATTR_SHOW_FN (   name,
  type,
  only_disabled 
)
Value:
static ssize_t gpio_keys_show_##name(struct device *dev, \
char *buf) \
{ \
struct gpio_keys_drvdata *ddata = platform_get_drvdata(pdev); \
\
return gpio_keys_attr_show_helper(ddata, buf, \
type, only_disabled); \
}

Definition at line 254 of file gpio_keys.c.

#define ATTR_STORE_FN (   name,
  type 
)
Value:
static ssize_t gpio_keys_store_##name(struct device *dev, \
const char *buf, \
size_t count) \
{ \
struct gpio_keys_drvdata *ddata = platform_get_drvdata(pdev); \
\
error = gpio_keys_attr_store_helper(ddata, buf, type); \
if (error) \
return error; \
\
return count; \
}

Definition at line 280 of file gpio_keys.c.

Function Documentation

ATTR_SHOW_FN ( keys  ,
EV_KEY  ,
false   
)
ATTR_SHOW_FN ( switches  ,
EV_SW  ,
false   
)
ATTR_SHOW_FN ( disabled_keys  ,
EV_KEY  ,
true   
)
ATTR_SHOW_FN ( disabled_switches  ,
EV_SW  ,
true   
)
ATTR_STORE_FN ( disabled_keys  ,
EV_KEY   
)
ATTR_STORE_FN ( disabled_switches  ,
EV_SW   
)
late_initcall ( gpio_keys_init  )
MODULE_ALIAS ( "platform:gpio-keys )
MODULE_AUTHOR ( "Phil Blundell <[email protected]>"  )
MODULE_DESCRIPTION ( "Keyboard driver for GPIOs"  )
module_exit ( gpio_keys_exit  )
MODULE_LICENSE ( "GPL"  )