#ifndef _INCLUDE_LINUX_IMX_KPP_GPIO_H
#define _INCLUDE_LINUX_IMX_KPP_GPIO_H
/*
 * imx-kpp-gpio.h -- GPIO driver for i.MX Keypad Controller
 *
 * (C) 2010 Jacques Electronics Pty Ltd.
 * Stuart Longland <redhatter@gentoo.org>
 *
 * Based in part on
 * 	- twl4030-gpio.c: (C) 2006-2007 Texas Instruments, and others
 * 	- imx-ssi.c:      (C) 2009 Sascha Hauer <s.hauer@pengutronix.de>
 *
 * 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.
 *
 * The Freescale i.MX27 integrates a complete keypad controller which may
 * be interfaced to a variety of matrix-style keypads up to 8x8 in size.  The
 * pins of this controller may also be driven as GPIOs, however they are not
 * routed via the IOMUX like the other GPIO devices, and hence this driver
 * exists to provide access to these GPIO pins.
 */

#define IMX_KPP_NUM_COLS	8
#define IMX_KPP_NUM_ROWS	8
#define IMX_KPP_GPIO_ROW(n)	(n)
#define IMX_KPP_GPIO_COL(n)	IMX_KPP_GPIO_ROW((n)+IMX_KPP_NUM_ROWS)
#define IMX_KPP_NUM_GPIOS	(IMX_KPP_NUM_COLS+IMX_KPP_NUM_ROWS)

/* Platform data for driver */
struct imx_kpp_gpio_platform_data {
	/* Interrupt request line */
	int irq;
	/* Interrupt request base */
	int irq_base;
	/* Offset to use with GPIOs */
	unsigned base;
};
#endif
