1*c1719a03Sbsh /* $NetBSD: imxkppreg.h,v 1.2 2010/11/30 13:05:27 bsh Exp $ */ 248914f07Sbsh 348914f07Sbsh /* 448914f07Sbsh * Copyright (c) 2010 Genetec Corporation. All rights reserved. 548914f07Sbsh * Written by Hiroyuki Bessho for Genetec Corporation. 648914f07Sbsh * 748914f07Sbsh * Redistribution and use in source and binary forms, with or without 848914f07Sbsh * modification, are permitted provided that the following conditions 948914f07Sbsh * are met: 1048914f07Sbsh * 1. Redistributions of source code must retain the above copyright 1148914f07Sbsh * notice, this list of conditions and the following disclaimer. 1248914f07Sbsh * 2. Redistributions in binary form must reproduce the above copyright 1348914f07Sbsh * notice, this list of conditions and the following disclaimer in the 1448914f07Sbsh * documentation and/or other materials provided with the distribution. 1548914f07Sbsh * 1648914f07Sbsh * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``AS IS'' AND 1748914f07Sbsh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 1848914f07Sbsh * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 1948914f07Sbsh * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GENETEC CORPORATION 2048914f07Sbsh * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2148914f07Sbsh * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2248914f07Sbsh * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2348914f07Sbsh * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2448914f07Sbsh * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2548914f07Sbsh * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2648914f07Sbsh * POSSIBILITY OF SUCH DAMAGE. 2748914f07Sbsh */ 2848914f07Sbsh 2948914f07Sbsh /* 3048914f07Sbsh * Register definitions for Keypad Port (KPP) 3148914f07Sbsh */ 3248914f07Sbsh 3348914f07Sbsh #ifndef _ARM_IMX_IMXKPPREG_H 3448914f07Sbsh #define _ARM_IMX_IMXKPPREG_H 3548914f07Sbsh 3648914f07Sbsh /* Registers are byte- or halfword-addressable */ 3748914f07Sbsh 3848914f07Sbsh #define KPP_KPCR 0x0000 /* control register */ 3948914f07Sbsh #define KPCR_KCO 0xff00 /* Column strobe */ 4048914f07Sbsh #define KPCR_KRE 0x00ff /* Row Enable */ 4148914f07Sbsh #define KPP_KPSR 0x0002 /* status register */ 4248914f07Sbsh #define KPSR_KRIE __BIT(9) 4348914f07Sbsh #define KPSR_KDIE __BIT(8) 4448914f07Sbsh #define KPSR_KRSS __BIT(3) 4548914f07Sbsh #define KPSR_KDSC __BIT(2) 4648914f07Sbsh #define KPSR_KPKR __BIT(1) 4748914f07Sbsh #define KPSR_KPKD __BIT(0) 4848914f07Sbsh 4948914f07Sbsh #define KPP_KDDR 0x0004 /* data direction register */ 5048914f07Sbsh 5148914f07Sbsh #define KPP_KPDR 0x0006 /* data register */ 5248914f07Sbsh 53*c1719a03Sbsh #define KPP_SIZE 0x0008 54*c1719a03Sbsh 5548914f07Sbsh #endif /* _ARM_IMX_IMXKPPREG_H */ 56