/*
 * Copyright 2004 Freescale Semiconductor, Inc. All Rights Reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef _MXC_KEYB_IOCTL_H_
#define _MXC_KEYB_IOCTL_H_

/*!
 * @defgroup    keypad  Keypad Driver
 */

/*!
 * @file mxc_keyb_ioctl.h
 *
 * @brief This file defines MXC keypad driver related configuration parameters.
 * 
 * This driver also takes the IOCTL command KDSKBMODE from kd.h 
 * for setting it to K_RAW/K_XLATE mode.
 *
 * @ingroup  keypad
 */

/*!
 * Sets maximum number of keypad rows and columns in the MXC.\n
 * Takes kbd_arg structure as argument.\n
 *          arg1 defines number of rows.\n
 *          arg2 defines number of columns.\n
 */
#define KDROWCOL        0x4B80

/*!
 * Sets the keypad driver in blocking or non-blocking mode.\n
 * Takes kbd_arg structure as argument.\n
 *          arg1 defines BLOCK/NONBLOCK read.\n
 */ 
#define KDSBLOCK        0x4B81

/*!
 * Sets the keypad debounce delay for key press/release.
 */
#define KDSCANRATE      0x4B82  

/*!
 * Argument to KDSBLOCK which selects blocking read.
 */ 
#define BLOCK           0      

/*!
 * Argument to KDSBLOCK which selects non-blocking read.
 */ 
#define NONBLOCK        1      

/*!
 * This structure represents the arguments to be passed to ioctl call.
 */
typedef struct kbd_arg {
        /*!
         * Ioctl argument1
         */
        unsigned long arg1;

        /*!
         * Ioctl argument2
         */
        unsigned long arg2;
} kbd_arg;

#endif  /* _MXC_KEYB_IOCTL_H_ */
