Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

mxc_keyb.c File Reference


Detailed Description

Driver for the Freescale Semiconductor MXC keypad port.

The keypad driver is designed as a standard Input driver which interacts with low level keypad port hardware. Upon opening, the Keypad driver initializes the keypad port. When the keypad interrupt happens the driver calles keypad polling timer and scans the keypad matrix for key press/release. If all key press/release happened it comes out of timer and waits for key press interrupt. The scancode for key press and release events are passed to Input subsytem.

Definition in file mxc_keyb.c.

#include <linux/module.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <mach/hardware.h>
#include <linux/kd.h>
#include <linux/fs.h>
#include <linux/kbd_kern.h>
#include <linux/ioctl.h>
#include <linux/poll.h>
#include <linux/interrupt.h>
#include <linux/timer.h>
#include <linux/input.h>
#include <linux/miscdevice.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <asm/mach/keypad.h>
#include "mxc_keyb.h"

Go to the source code of this file.

Defines

#define KPP_DEBUG   0
#define mxc_kpp_resume   NULL
#define mxc_kpp_suspend   NULL
#define press_down_code   27
#define press_left_code   30
#define press_right_code   29
#define press_up_code   28
#define rel_down_code   155
#define rel_left_code   158
#define rel_right_code   157
#define rel_up_code   156

Functions

void gpio_keypad_active (void)
void gpio_keypad_inactive (void)
 MODULE_AUTHOR ("Freescale Semiconductor, Inc.")
 MODULE_DESCRIPTION ("MXC Keypad Controller Driver")
 module_exit (mxc_kpp_cleanup)
 module_init (mxc_kpp_init)
 MODULE_LICENSE ("GPL")
static void __exit mxc_kpp_cleanup (void)
static void mxc_kpp_close (struct input_dev *dev)
static void mxc_kpp_free_allocated (void)
static void mxc_kpp_handle_timer (unsigned long data)
static int __init mxc_kpp_init (void)
static irqreturn_t mxc_kpp_interrupt (int irq, void *dev_id)
static int mxc_kpp_open (struct input_dev *dev)
static int mxc_kpp_probe (struct platform_device *pdev)
static int mxc_kpp_remove (struct platform_device *pdev)
static int mxc_kpp_scan_matrix (void)
static signed short mxc_scan_matrix_leaning_key (int row, int col, int press)

Variables

static unsigned short * cur_rcmap
static int has_leaning_key
static unsigned int key_pad_enabled
static struct keypad_data * keypad
static struct clk * kpp_clk
static struct keypad_priv kpp_dev
static unsigned short KPress
static unsigned short KScanRate = (10 * HZ) / 1000
static struct platform_driver mxc_kpd_driver
static struct input_dev * mxckbd_dev = NULL
static const unsigned short * mxckpd_keycodes
static unsigned short mxckpd_keycodes_size
static short ** press_scancode
static unsigned short * prev_rcmap
static short ** release_scancode


Generated by  Doxygen 1.6.0   Back to index