summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorChris Kimber <chris.kimber@stericsson.com>2011-05-18 16:34:59 +0100
committersaid m bagheri <ebgheri@steludxu2848.(none)>2011-06-17 13:42:03 +0200
commitf5dcdcd0a68eedbfdbc96d5de42e51cba4ac8520 (patch)
tree96b9f576d2d9aee7c44794a9ca476d4f26c56cc6 /arch
parent777a6679baca03511f350b272a1122d3869c1bc9 (diff)
ab8500-gpio: Allow initial configuration of GPIO registers
Allows the setting of the initial GPIO direction & pullup registers. ST-Ericsson Linux next: Ported & patch created ST-Ericsson ID: 334609 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I676ed8129a96a2fe41865117e4c864edc09d01ce Signed-off-by: Chris Kimber <chris.kimber@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23339 Reviewed-by: Andrew LYNN <andrew.lynn@stericsson.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/board-mop500.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 3a4f7f8f5e8..85ebae2a0a6 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -94,7 +94,7 @@ static struct platform_device snowball_led_dev = {
static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
.gpio_base = MOP500_AB8500_GPIO(0),
.irq_base = MOP500_AB8500_VIR_GPIO_IRQ_BASE,
- /* config_reg is the initial configuration of ab8500 pins.
+ /* initial_pin_config is the initial configuration of ab8500 pins.
* The pins can be configured as GPIO or alt functions based
* on value present in GpioSel1 to GpioSel6 and AlternatFunction
* register. This is the array of 7 configuration settings.
@@ -104,9 +104,10 @@ static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
* Pin GPIO2 (SysClkReq3)
* Pin GPIO3 (SysClkReq4)
* Pin GPIO4 (SysClkReq6) are configured as GPIO
+ * GpioSel2 = 0x9E => Pins GPIO10 to GPIO13 are configured as GPIO
* GpioSel3 = 0x80 => Pin GPIO24 (SysClkReq7) is configured as GPIO
* GpioSel4 = 0x01 => Pin GPIO25 (SysClkReq8) is configured as GPIO
- * GpioSel5 = 0x7A => Pin GPIO36 (ApeSpiClk)
+ * GpioSel5 = 0x78 => Pin GPIO36 (ApeSpiClk)
Pin GPIO37 (ApeSpiCSn)
Pin GPIO38 (ApeSpiDout)
Pin GPIO39 (ApeSpiDin) are configured as GPIO
@@ -114,8 +115,18 @@ static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
* AlternaFunction = 0x00 => If Pins GPIO10 to 13 are not configured
* as GPIO then this register selectes the alternate functions
*/
- .config_reg = {0x0F, 0x9E, 0x80, 0x01,
- 0x7A, 0x02, 0x00},
+ .initial_pin_config = {0x0F, 0x9E, 0x80, 0x01, 0x78, 0x02, 0x00},
+
+ /* initial_pin_direction allows for the initial GPIO direction to
+ * be set.
+ */
+ .initial_pin_direction = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+
+ /*
+ * initial_pin_pullups allows for the intial configuration of the
+ * GPIO pullup/pulldown configuration.
+ */
+ .initial_pin_pullups = {0xE0, 0x01, 0x00, 0x00, 0x00, 0x00},
};
#ifdef CONFIG_INPUT_AB8500_ACCDET