aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/board-mop500.c
diff options
context:
space:
mode:
authorBibek Basu <bibek.basu@stericsson.com>2011-02-15 02:26:16 -0500
committerLinus Walleij <linus.walleij@linaro.org>2011-03-28 02:47:18 -0400
commit3ef374a22bdf91fb3b4213200aadd054f81c3499 (patch)
treec89057633a516b558b2ef830ee5c53d482df4328 /arch/arm/mach-ux500/board-mop500.c
parent0cb3fcd72cc3e6dd88f0e769746d294e5e6bafa9 (diff)
mach-ux500: board support for AB8500 GPIO driver
This is the board support patch for ab8500 gpio driver on mach-ux500.Patch implements 16 virtual IRQ mapped to 16 interrupt capable AB8500 GPIOs. Signed-off-by: Bibek Basu <bibek.basu@stericsson.com> [Modify for header file placement] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index d0076453d7ff..6ac0164db6e8 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -22,6 +22,7 @@
22#include <linux/mfd/ab8500.h> 22#include <linux/mfd/ab8500.h>
23#include <linux/regulator/ab8500.h> 23#include <linux/regulator/ab8500.h>
24#include <linux/mfd/tc3589x.h> 24#include <linux/mfd/tc3589x.h>
25#include <linux/mfd/ab8500/gpio.h>
25#include <linux/leds-lp5521.h> 26#include <linux/leds-lp5521.h>
26#include <linux/input.h> 27#include <linux/input.h>
27#include <linux/gpio_keys.h> 28#include <linux/gpio_keys.h>
@@ -42,10 +43,33 @@
42#include "board-mop500.h" 43#include "board-mop500.h"
43#include "board-mop500-regulators.h" 44#include "board-mop500-regulators.h"
44 45
46static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
47 .gpio_base = MOP500_AB8500_GPIO(0),
48 .irq_base = MOP500_AB8500_VIR_GPIO_IRQ_BASE,
49 /* config_reg is the initial configuration of ab8500 pins.
50 * The pins can be configured as GPIO or alt functions based
51 * on value present in GpioSel1 to GpioSel6 and AlternatFunction
52 * register. This is the array of 7 configuration settings.
53 * One has to compile time decide these settings. Below is the
54 * explaination of these setting
55 * GpioSel1 = 0x00 => Pins GPIO1 to GPIO8 are not used as GPIO
56 * GpioSel2 = 0x1E => Pins GPIO10 to GPIO13 are configured as GPIO
57 * GpioSel3 = 0x80 => Pin GPIO24 is configured as GPIO
58 * GpioSel4 = 0x01 => Pin GPIo25 is configured as GPIO
59 * GpioSel5 = 0x7A => Pins GPIO34, GPIO36 to GPIO39 are conf as GPIO
60 * GpioSel6 = 0x00 => Pins GPIO41 & GPIo42 are not configured as GPIO
61 * AlternaFunction = 0x00 => If Pins GPIO10 to 13 are not configured
62 * as GPIO then this register selectes the alternate fucntions
63 */
64 .config_reg = {0x00, 0x1E, 0x80, 0x01,
65 0x7A, 0x00, 0x00},
66};
67
45static struct ab8500_platform_data ab8500_platdata = { 68static struct ab8500_platform_data ab8500_platdata = {
46 .irq_base = MOP500_AB8500_IRQ_BASE, 69 .irq_base = MOP500_AB8500_IRQ_BASE,
47 .regulator = ab8500_regulators, 70 .regulator = ab8500_regulators,
48 .num_regulator = ARRAY_SIZE(ab8500_regulators), 71 .num_regulator = ARRAY_SIZE(ab8500_regulators),
72 .gpio = &ab8500_gpio_pdata,
49}; 73};
50 74
51static struct resource ab8500_resources[] = { 75static struct resource ab8500_resources[] = {