Duy Truong | 790f06d | 2013-02-13 16:38:12 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2010, The Linux Foundation. All rights reserved. |
Gregory Bean | 1963a2a | 2010-08-28 10:05:44 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
Gregory Bean | 1963a2a | 2010-08-28 10:05:44 -0700 | [diff] [blame] | 11 | */ |
| 12 | #ifndef __ARCH_ARM_MACH_MSM_GPIOMUX_V1_H |
| 13 | #define __ARCH_ARM_MACH_MSM_GPIOMUX_V1_H |
| 14 | |
| 15 | #if defined(CONFIG_ARCH_MSM7X30) |
| 16 | #define GPIOMUX_NGPIOS 182 |
| 17 | #elif defined(CONFIG_ARCH_QSD8X50) |
| 18 | #define GPIOMUX_NGPIOS 165 |
| 19 | #else |
| 20 | #define GPIOMUX_NGPIOS 133 |
| 21 | #endif |
| 22 | |
| 23 | typedef u32 gpiomux_config_t; |
| 24 | |
| 25 | enum { |
| 26 | GPIOMUX_DRV_2MA = 0UL << 17, |
| 27 | GPIOMUX_DRV_4MA = 1UL << 17, |
| 28 | GPIOMUX_DRV_6MA = 2UL << 17, |
| 29 | GPIOMUX_DRV_8MA = 3UL << 17, |
| 30 | GPIOMUX_DRV_10MA = 4UL << 17, |
| 31 | GPIOMUX_DRV_12MA = 5UL << 17, |
| 32 | GPIOMUX_DRV_14MA = 6UL << 17, |
| 33 | GPIOMUX_DRV_16MA = 7UL << 17, |
| 34 | }; |
| 35 | |
| 36 | enum { |
| 37 | GPIOMUX_FUNC_GPIO = 0UL, |
| 38 | GPIOMUX_FUNC_1 = 1UL, |
| 39 | GPIOMUX_FUNC_2 = 2UL, |
| 40 | GPIOMUX_FUNC_3 = 3UL, |
| 41 | GPIOMUX_FUNC_4 = 4UL, |
| 42 | GPIOMUX_FUNC_5 = 5UL, |
| 43 | GPIOMUX_FUNC_6 = 6UL, |
| 44 | GPIOMUX_FUNC_7 = 7UL, |
| 45 | GPIOMUX_FUNC_8 = 8UL, |
| 46 | GPIOMUX_FUNC_9 = 9UL, |
| 47 | GPIOMUX_FUNC_A = 10UL, |
| 48 | GPIOMUX_FUNC_B = 11UL, |
| 49 | GPIOMUX_FUNC_C = 12UL, |
| 50 | GPIOMUX_FUNC_D = 13UL, |
| 51 | GPIOMUX_FUNC_E = 14UL, |
| 52 | GPIOMUX_FUNC_F = 15UL, |
| 53 | }; |
| 54 | |
| 55 | enum { |
| 56 | GPIOMUX_PULL_NONE = 0UL << 15, |
| 57 | GPIOMUX_PULL_DOWN = 1UL << 15, |
| 58 | GPIOMUX_PULL_KEEPER = 2UL << 15, |
| 59 | GPIOMUX_PULL_UP = 3UL << 15, |
| 60 | }; |
| 61 | |
| 62 | #endif |