Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
matrix-keymap.c File Reference
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/input.h>
#include <linux/of.h>
#include <linux/export.h>
#include <linux/module.h>
#include <linux/input/matrix_keypad.h>

Go to the source code of this file.

Functions

int matrix_keypad_build_keymap (const struct matrix_keymap_data *keymap_data, const char *keymap_name, unsigned int rows, unsigned int cols, unsigned short *keymap, struct input_dev *input_dev)
 
 EXPORT_SYMBOL (matrix_keypad_build_keymap)
 
 MODULE_LICENSE ("GPL")
 

Function Documentation

EXPORT_SYMBOL ( matrix_keypad_build_keymap  )
int matrix_keypad_build_keymap ( const struct matrix_keymap_data keymap_data,
const char keymap_name,
unsigned int  rows,
unsigned int  cols,
unsigned short keymap,
struct input_dev *  input_dev 
)

matrix_keypad_build_keymap - convert platform keymap into matrix keymap : keymap supplied by the platform code : name of device tree property containing keymap (if device tree support is enabled). : number of rows in target keymap array : number of cols in target keymap array : expanded version of keymap that is suitable for use by matrix keyboard driver : input devices for which we are setting up the keymap

This function converts platform keymap (encoded with KEY() macro) into an array of keycodes that is suitable for using in a standard matrix keyboard driver that uses row and col as indices.

If is not supplied and device tree support is enabled it will attempt load the keymap from property specified by argument (or "linux,keymap" if is NULL).

Callers are expected to set up input_dev->dev.parent before calling this function.

Definition at line 129 of file matrix-keymap.c.

MODULE_LICENSE ( "GPL"  )