#ifndef PHSTBKEY_H    /** Multi-include protection.   <FILENAME>_H */
#define PHSTBKEY_H


/*****************************************************************************/
/* Copyright (c) 2008 NXP B.V.                                               */
/*                                                                           */
/* 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, using version 2 of the License.             */
/*                                                                           */
/* 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.                                                                      */
/*                                                                           */
/*****************************************************************************/
/**
    @file   phStbKey.h
    @brief  Header file for the phStbKey component.

@b  Component:  phStbKey

Rev Date        Author      Comments
--------------------------------------------------------------------------------
  1 20061123    neill       Original
  2 20061124    neill       Changes after crosscheck
  3 20080208    batelaan    Update file copyright/license text
  4 20090110    qianjiang   Add support to direct pio keys
  5 20090408    ocourson    Rename ioctls after review
*/
//-----------------------------------------------------------------------------
// Standard include files:
//-----------------------------------------------------------------------------
//
#include <tmtypes.h>
#include <tmCompId.h>

#ifdef __cplusplus
extern "C"
{
#endif

#define PHSTBKEY_MODULE_DESCRIPTION   "STB225 Front Panel Keyboard driver"


#ifndef CONFIG_FRONT_PANEL_KEYBOARD_MATRIX

#define PHSTBKEY_MAX_ENTRIES	32
typedef struct 
{
	UInt32	pioNo;
	UInt32	translated_key;
	UInt32  pressedPioLevel;
}phStbKeyMapList[PHSTBKEY_MAX_ENTRIES];
#define PHSTBKEY_END_OF_LIST	0xffffffff

#define PHSTBKEY_IOC_MAGIC	'x'
#define PHSTBKEY_NUMBER_OFFSET	200

#define PHSTBKEY_IOCTL_REPEAT_DELAY	_IOW(PHSTBKEY_IOC_MAGIC, PHSTBKEY_NUMBER_OFFSET, UInt32)
#define PHSTBKEY_IOCTL_SET_KEYS_MAP	_IOW(PHSTBKEY_IOC_MAGIC, PHSTBKEY_NUMBER_OFFSET + 1, phStbKeyMapList)

#ifdef __KERNEL__

extern int phStbKeyProtocol_Init( struct input_dev * pInput_dev );
extern void phStbKeyProtocol_Exit( void );
#endif

#ifdef __cplusplus
}
#endif 

#endif //CONFIG_FRONT_PANEL_KEYBOARD_MATRIX

#endif //PHSTBKEY_H

