Aparna Mallavarapu | 2269a2f | 2013-01-07 19:44:48 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. |
Amol Jadi | cd43ea0 | 2011-02-15 20:56:04 -0800 | [diff] [blame] | 2 | * |
| 3 | * Redistribution and use in source and binary forms, with or without |
| 4 | * modification, are permitted provided that the following conditions are |
| 5 | * met: |
| 6 | * * Redistributions of source code must retain the above copyright |
| 7 | * notice, this list of conditions and the following disclaimer. |
| 8 | * * Redistributions in binary form must reproduce the above |
| 9 | * copyright notice, this list of conditions and the following |
| 10 | * disclaimer in the documentation and/or other materials provided |
| 11 | * with the distribution. |
Amol Jadi | f34df2f | 2012-10-19 13:38:16 -0700 | [diff] [blame] | 12 | * * Neither the name of The Linux Foundation. nor the names of its |
Amol Jadi | cd43ea0 | 2011-02-15 20:56:04 -0800 | [diff] [blame] | 13 | * contributors may be used to endorse or promote products derived |
| 14 | * from this software without specific prior written permission. |
| 15 | * |
| 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | */ |
| 28 | |
| 29 | #include <debug.h> |
| 30 | #include <reg.h> |
| 31 | #include <platform/iomap.h> |
Amol Jadi | c52c8a3 | 2011-07-12 11:27:04 -0700 | [diff] [blame] | 32 | #include <platform/gpio.h> |
| 33 | #include <gsbi.h> |
Shashank Mittal | b3be37f | 2012-01-16 22:59:49 -0800 | [diff] [blame] | 34 | #include <dev/pm8921.h> |
| 35 | #include <sys/types.h> |
Amol Jadi | a63aaff | 2012-02-01 15:51:50 -0800 | [diff] [blame] | 36 | #include <smem.h> |
Amol Jadi | cd43ea0 | 2011-02-15 20:56:04 -0800 | [diff] [blame] | 37 | |
| 38 | void gpio_tlmm_config(uint32_t gpio, uint8_t func, |
Ajay Dudani | b01e506 | 2011-12-03 23:23:42 -0800 | [diff] [blame] | 39 | uint8_t dir, uint8_t pull, |
| 40 | uint8_t drvstr, uint32_t enable) |
Amol Jadi | cd43ea0 | 2011-02-15 20:56:04 -0800 | [diff] [blame] | 41 | { |
Ajay Dudani | b01e506 | 2011-12-03 23:23:42 -0800 | [diff] [blame] | 42 | unsigned int val = 0; |
| 43 | val |= pull; |
| 44 | val |= func << 2; |
| 45 | val |= drvstr << 6; |
| 46 | val |= enable << 9; |
| 47 | unsigned int *addr = (unsigned int *)GPIO_CONFIG_ADDR(gpio); |
| 48 | writel(val, addr); |
| 49 | return; |
Amol Jadi | cd43ea0 | 2011-02-15 20:56:04 -0800 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | void gpio_set(uint32_t gpio, uint32_t dir) |
| 53 | { |
Ajay Dudani | b01e506 | 2011-12-03 23:23:42 -0800 | [diff] [blame] | 54 | unsigned int *addr = (unsigned int *)GPIO_IN_OUT_ADDR(gpio); |
| 55 | writel(dir, addr); |
| 56 | return; |
Amol Jadi | cd43ea0 | 2011-02-15 20:56:04 -0800 | [diff] [blame] | 57 | } |
Amol Jadi | c52c8a3 | 2011-07-12 11:27:04 -0700 | [diff] [blame] | 58 | |
Amol Jadi | a63aaff | 2012-02-01 15:51:50 -0800 | [diff] [blame] | 59 | /* TODO: this and other code below in this file should ideally by in target dir. |
| 60 | * keeping it here for this brigup. |
| 61 | */ |
| 62 | |
Amol Jadi | c52c8a3 | 2011-07-12 11:27:04 -0700 | [diff] [blame] | 63 | /* Configure gpio for uart - based on gsbi id */ |
| 64 | void gpio_config_uart_dm(uint8_t id) |
| 65 | { |
Amol Jadi | c426304 | 2012-03-29 16:18:11 -0700 | [diff] [blame] | 66 | if(board_platform_id() == MPQ8064) |
| 67 | { |
| 68 | switch (id) { |
| 69 | |
| 70 | case GSBI_ID_5: |
| 71 | /* configure rx gpio */ |
Amol Jadi | f34df2f | 2012-10-19 13:38:16 -0700 | [diff] [blame] | 72 | gpio_tlmm_config(52, 2, GPIO_INPUT, GPIO_NO_PULL, |
Amol Jadi | c426304 | 2012-03-29 16:18:11 -0700 | [diff] [blame] | 73 | GPIO_8MA, GPIO_DISABLE); |
| 74 | /* configure tx gpio */ |
Amol Jadi | f34df2f | 2012-10-19 13:38:16 -0700 | [diff] [blame] | 75 | gpio_tlmm_config(51, 2, GPIO_OUTPUT, GPIO_NO_PULL, |
Amol Jadi | c426304 | 2012-03-29 16:18:11 -0700 | [diff] [blame] | 76 | GPIO_8MA, GPIO_DISABLE); |
| 77 | break; |
| 78 | |
| 79 | default: |
| 80 | ASSERT(0); |
| 81 | } |
| 82 | } |
Amol Jadi | 117ef3a | 2012-09-20 13:32:55 -0700 | [diff] [blame] | 83 | else if((board_platform_id() == APQ8064) || |
Aparna Mallavarapu | 2269a2f | 2013-01-07 19:44:48 +0530 | [diff] [blame] | 84 | (board_platform_id() == APQ8064AA) || |
Amol Jadi | 117ef3a | 2012-09-20 13:32:55 -0700 | [diff] [blame] | 85 | (board_platform_id() == APQ8064AB)) |
Amol Jadi | a63aaff | 2012-02-01 15:51:50 -0800 | [diff] [blame] | 86 | { |
| 87 | switch (id) { |
Amol Jadi | 0c04df8 | 2011-10-14 17:40:21 -0700 | [diff] [blame] | 88 | |
Amol Jadi | a63aaff | 2012-02-01 15:51:50 -0800 | [diff] [blame] | 89 | case GSBI_ID_1: |
| 90 | /* configure rx gpio */ |
| 91 | gpio_tlmm_config(19, 1, GPIO_INPUT, GPIO_NO_PULL, |
| 92 | GPIO_8MA, GPIO_DISABLE); |
| 93 | /* configure tx gpio */ |
| 94 | gpio_tlmm_config(18, 1, GPIO_OUTPUT, GPIO_NO_PULL, |
| 95 | GPIO_8MA, GPIO_DISABLE); |
| 96 | break; |
Amol Jadi | 0c04df8 | 2011-10-14 17:40:21 -0700 | [diff] [blame] | 97 | |
V S Ramanjaneya Kumar T | c633fe1 | 2013-01-08 14:55:54 -0500 | [diff] [blame] | 98 | case GSBI_ID_2: |
| 99 | /* configure rx gpio */ |
| 100 | gpio_tlmm_config(22, 1, GPIO_INPUT, GPIO_NO_PULL, |
| 101 | GPIO_8MA, GPIO_DISABLE); |
| 102 | /* configure tx gpio */ |
| 103 | gpio_tlmm_config(23, 1, GPIO_OUTPUT, GPIO_NO_PULL, |
| 104 | GPIO_8MA, GPIO_DISABLE); |
| 105 | break; |
| 106 | |
Amol Jadi | 0c04df8 | 2011-10-14 17:40:21 -0700 | [diff] [blame] | 107 | |
Amol Jadi | a63aaff | 2012-02-01 15:51:50 -0800 | [diff] [blame] | 108 | case GSBI_ID_7: |
| 109 | /* configure rx gpio */ |
| 110 | gpio_tlmm_config(83, 1, GPIO_INPUT, GPIO_NO_PULL, |
| 111 | GPIO_8MA, GPIO_DISABLE); |
| 112 | /* configure tx gpio */ |
| 113 | gpio_tlmm_config(82, 2, GPIO_OUTPUT, GPIO_NO_PULL, |
| 114 | GPIO_8MA, GPIO_DISABLE); |
| 115 | break; |
| 116 | |
| 117 | default: |
| 118 | ASSERT(0); |
| 119 | } |
| 120 | } |
| 121 | else |
| 122 | { |
| 123 | switch (id) { |
| 124 | |
| 125 | case GSBI_ID_3: |
| 126 | /* configure rx gpio */ |
| 127 | gpio_tlmm_config(15, 1, GPIO_INPUT, GPIO_NO_PULL, |
| 128 | GPIO_8MA, GPIO_DISABLE); |
| 129 | /* configure tx gpio */ |
| 130 | gpio_tlmm_config(14, 1, GPIO_OUTPUT, GPIO_NO_PULL, |
| 131 | GPIO_8MA, GPIO_DISABLE); |
| 132 | break; |
| 133 | |
| 134 | case GSBI_ID_5: |
| 135 | /* configure rx gpio */ |
| 136 | gpio_tlmm_config(23, 1, GPIO_INPUT, GPIO_NO_PULL, |
| 137 | GPIO_8MA, GPIO_DISABLE); |
| 138 | /* configure tx gpio */ |
| 139 | gpio_tlmm_config(22, 1, GPIO_OUTPUT, GPIO_NO_PULL, |
| 140 | GPIO_8MA, GPIO_DISABLE); |
| 141 | break; |
| 142 | |
Neeti Desai | 4694029 | 2012-07-17 14:28:35 -0700 | [diff] [blame] | 143 | case GSBI_ID_8: |
| 144 | /* configure rx gpio */ |
| 145 | gpio_tlmm_config(35, 1, GPIO_INPUT, GPIO_NO_PULL, |
| 146 | GPIO_8MA, GPIO_DISABLE); |
| 147 | /* configure tx gpio */ |
| 148 | gpio_tlmm_config(34, 1, GPIO_OUTPUT, GPIO_NO_PULL, |
| 149 | GPIO_8MA, GPIO_DISABLE); |
| 150 | break; |
| 151 | |
Amol Jadi | a63aaff | 2012-02-01 15:51:50 -0800 | [diff] [blame] | 152 | default: |
| 153 | ASSERT(0); |
| 154 | } |
Amol Jadi | c52c8a3 | 2011-07-12 11:27:04 -0700 | [diff] [blame] | 155 | } |
| 156 | } |
Shashank Mittal | b3be37f | 2012-01-16 22:59:49 -0800 | [diff] [blame] | 157 | |
| 158 | struct pm8xxx_gpio_init { |
| 159 | uint32_t gpio; |
| 160 | struct pm8921_gpio config; |
| 161 | }; |
| 162 | |
| 163 | #define PM8XXX_GPIO_INIT(_gpio, _dir, _buf, _val, _pull, _vin, _out_strength, \ |
| 164 | _func, _inv, _disable) \ |
| 165 | { \ |
| 166 | .gpio = _gpio, \ |
| 167 | .config = { \ |
| 168 | .direction = _dir, \ |
| 169 | .output_buffer = _buf, \ |
| 170 | .output_value = _val, \ |
| 171 | .pull = _pull, \ |
| 172 | .vin_sel = _vin, \ |
| 173 | .out_strength = _out_strength, \ |
| 174 | .function = _func, \ |
| 175 | .inv_int_pol = _inv, \ |
| 176 | .disable_pin = _disable, \ |
| 177 | } \ |
| 178 | } |
| 179 | |
| 180 | #define PM8XXX_GPIO_OUTPUT(_gpio, _val) \ |
| 181 | PM8XXX_GPIO_INIT(_gpio, PM_GPIO_DIR_OUT, 0, _val, \ |
| 182 | PM_GPIO_PULL_NO, 2, \ |
| 183 | PM_GPIO_STRENGTH_HIGH, \ |
| 184 | PM_GPIO_FUNC_NORMAL, 1, 0) |
| 185 | |
| 186 | |
| 187 | #define PM8XXX_GPIO_INPUT(_gpio, _pull) \ |
| 188 | PM8XXX_GPIO_INIT(_gpio, PM_GPIO_DIR_IN, 0, 0, \ |
| 189 | _pull, 2, \ |
| 190 | PM_GPIO_STRENGTH_NO, \ |
| 191 | PM_GPIO_FUNC_NORMAL, 1, 0) |
| 192 | |
| 193 | /* Initial pm8038 GPIO configurations */ |
| 194 | static struct pm8xxx_gpio_init pm8038_keypad_gpios[] = { |
| 195 | /* keys GPIOs */ |
Ajay Dudani | dc85e4a | 2012-03-08 20:09:17 -0800 | [diff] [blame] | 196 | PM8XXX_GPIO_INPUT(PM_GPIO(3), PM_GPIO_PULL_UP_30), |
| 197 | PM8XXX_GPIO_INPUT(PM_GPIO(8), PM_GPIO_PULL_UP_30), |
| 198 | PM8XXX_GPIO_INPUT(PM_GPIO(10), PM_GPIO_PULL_UP_30), |
| 199 | PM8XXX_GPIO_INPUT(PM_GPIO(11), PM_GPIO_PULL_UP_30), |
Shashank Mittal | b3be37f | 2012-01-16 22:59:49 -0800 | [diff] [blame] | 200 | }; |
| 201 | |
| 202 | static struct pm8xxx_gpio_init pm8921_keypad_gpios[] = { |
| 203 | /* keys GPIOs */ |
| 204 | PM8XXX_GPIO_INPUT(PM_GPIO(1), PM_GPIO_PULL_UP_31_5), |
| 205 | PM8XXX_GPIO_INPUT(PM_GPIO(2), PM_GPIO_PULL_UP_31_5), |
| 206 | PM8XXX_GPIO_INPUT(PM_GPIO(3), PM_GPIO_PULL_UP_31_5), |
| 207 | PM8XXX_GPIO_INPUT(PM_GPIO(4), PM_GPIO_PULL_UP_31_5), |
| 208 | PM8XXX_GPIO_INPUT(PM_GPIO(5), PM_GPIO_PULL_UP_31_5), |
| 209 | PM8XXX_GPIO_OUTPUT(PM_GPIO(9), 0), |
| 210 | }; |
| 211 | |
Amol Jadi | 7607167 | 2012-02-03 12:19:36 -0800 | [diff] [blame] | 212 | /* pm8921 GPIO configuration for APQ8064 keypad */ |
| 213 | static struct pm8xxx_gpio_init pm8921_keypad_gpios_apq[] = { |
| 214 | /* keys GPIOs */ |
| 215 | PM8XXX_GPIO_INPUT(PM_GPIO(35), PM_GPIO_PULL_UP_31_5), |
| 216 | PM8XXX_GPIO_INPUT(PM_GPIO(38), PM_GPIO_PULL_UP_31_5), |
| 217 | PM8XXX_GPIO_OUTPUT(PM_GPIO(9), 0), |
| 218 | }; |
| 219 | |
Deepa Dinamani | b8b1643 | 2012-08-24 15:48:45 -0700 | [diff] [blame] | 220 | /* pm8917 GPIO configuration for APQ8064 keypad */ |
| 221 | static struct pm8xxx_gpio_init pm8917_keypad_gpios_apq[] = { |
| 222 | /* keys GPIOs */ |
| 223 | PM8XXX_GPIO_INPUT(PM_GPIO(35), PM_GPIO_PULL_UP_31_5), |
| 224 | PM8XXX_GPIO_INPUT(PM_GPIO(30), PM_GPIO_PULL_UP_31_5), |
| 225 | PM8XXX_GPIO_OUTPUT(PM_GPIO(9), 0), |
| 226 | }; |
| 227 | |
Neeti Desai | 7c30336 | 2012-09-18 11:50:22 -0700 | [diff] [blame] | 228 | /* pm8917 GPIO configuration for MSM8930 keypad */ |
| 229 | static struct pm8xxx_gpio_init pm8917_keypad_gpios[] = { |
| 230 | /* keys GPIOs */ |
| 231 | PM8XXX_GPIO_INPUT(PM_GPIO(27), PM_GPIO_PULL_UP_30), |
| 232 | PM8XXX_GPIO_INPUT(PM_GPIO(28), PM_GPIO_PULL_UP_30), |
| 233 | PM8XXX_GPIO_INPUT(PM_GPIO(36), PM_GPIO_PULL_UP_30), |
| 234 | PM8XXX_GPIO_INPUT(PM_GPIO(37), PM_GPIO_PULL_UP_30), |
| 235 | }; |
Deepa Dinamani | b8b1643 | 2012-08-24 15:48:45 -0700 | [diff] [blame] | 236 | |
Shashank Mittal | b3be37f | 2012-01-16 22:59:49 -0800 | [diff] [blame] | 237 | void msm8960_keypad_gpio_init() |
| 238 | { |
Deepa Dinamani | b8b1643 | 2012-08-24 15:48:45 -0700 | [diff] [blame] | 239 | int i = 0; |
| 240 | int num = 0; |
Shashank Mittal | b3be37f | 2012-01-16 22:59:49 -0800 | [diff] [blame] | 241 | |
Deepa Dinamani | b8b1643 | 2012-08-24 15:48:45 -0700 | [diff] [blame] | 242 | num = ARRAY_SIZE(pm8921_keypad_gpios); |
Shashank Mittal | b3be37f | 2012-01-16 22:59:49 -0800 | [diff] [blame] | 243 | |
Deepa Dinamani | b8b1643 | 2012-08-24 15:48:45 -0700 | [diff] [blame] | 244 | for(i=0; i < num; i++) |
| 245 | { |
| 246 | pm8921_gpio_config(pm8921_keypad_gpios[i].gpio, |
| 247 | &(pm8921_keypad_gpios[i].config)); |
| 248 | } |
Shashank Mittal | b3be37f | 2012-01-16 22:59:49 -0800 | [diff] [blame] | 249 | } |
| 250 | |
| 251 | void msm8930_keypad_gpio_init() |
| 252 | { |
Deepa Dinamani | b8b1643 | 2012-08-24 15:48:45 -0700 | [diff] [blame] | 253 | int i = 0; |
| 254 | int num = 0; |
Neeti Desai | 7c30336 | 2012-09-18 11:50:22 -0700 | [diff] [blame] | 255 | struct pm8xxx_gpio_init *gpio_array; |
Shashank Mittal | b3be37f | 2012-01-16 22:59:49 -0800 | [diff] [blame] | 256 | |
Channagoud Kadabi | 80e776b | 2013-02-15 19:52:12 -0800 | [diff] [blame] | 257 | if (platform_pmic_type(PMIC_IS_PM8917)) |
Neeti Desai | 7c30336 | 2012-09-18 11:50:22 -0700 | [diff] [blame] | 258 | { |
| 259 | num = ARRAY_SIZE(pm8917_keypad_gpios); |
| 260 | gpio_array = pm8917_keypad_gpios; |
| 261 | } |
| 262 | else |
| 263 | { |
| 264 | num = ARRAY_SIZE(pm8038_keypad_gpios); |
| 265 | gpio_array = pm8038_keypad_gpios; |
| 266 | } |
Shashank Mittal | b3be37f | 2012-01-16 22:59:49 -0800 | [diff] [blame] | 267 | |
Deepa Dinamani | b8b1643 | 2012-08-24 15:48:45 -0700 | [diff] [blame] | 268 | for(i=0; i < num; i++) |
| 269 | { |
Neeti Desai | 7c30336 | 2012-09-18 11:50:22 -0700 | [diff] [blame] | 270 | pm8921_gpio_config(gpio_array[i].gpio, |
| 271 | &(gpio_array[i].config)); |
Deepa Dinamani | b8b1643 | 2012-08-24 15:48:45 -0700 | [diff] [blame] | 272 | } |
Shashank Mittal | b3be37f | 2012-01-16 22:59:49 -0800 | [diff] [blame] | 273 | } |
Amol Jadi | 7607167 | 2012-02-03 12:19:36 -0800 | [diff] [blame] | 274 | |
| 275 | void apq8064_keypad_gpio_init() |
| 276 | { |
Deepa Dinamani | b8b1643 | 2012-08-24 15:48:45 -0700 | [diff] [blame] | 277 | int i = 0; |
| 278 | int num = 0; |
| 279 | struct pm8xxx_gpio_init *gpio_array; |
Amol Jadi | 7607167 | 2012-02-03 12:19:36 -0800 | [diff] [blame] | 280 | |
Channagoud Kadabi | 80e776b | 2013-02-15 19:52:12 -0800 | [diff] [blame] | 281 | if (platform_pmic_type(PMIC_IS_PM8917)) |
Deepa Dinamani | b8b1643 | 2012-08-24 15:48:45 -0700 | [diff] [blame] | 282 | { |
| 283 | num = ARRAY_SIZE(pm8917_keypad_gpios_apq); |
| 284 | gpio_array = pm8917_keypad_gpios_apq; |
| 285 | } |
| 286 | else |
| 287 | { |
Amol Jadi | 7607167 | 2012-02-03 12:19:36 -0800 | [diff] [blame] | 288 | num = ARRAY_SIZE(pm8921_keypad_gpios_apq); |
Deepa Dinamani | b8b1643 | 2012-08-24 15:48:45 -0700 | [diff] [blame] | 289 | gpio_array = pm8921_keypad_gpios_apq; |
| 290 | } |
Amol Jadi | 7607167 | 2012-02-03 12:19:36 -0800 | [diff] [blame] | 291 | |
Deepa Dinamani | b8b1643 | 2012-08-24 15:48:45 -0700 | [diff] [blame] | 292 | for(i = 0; i < num; i++) |
| 293 | { |
| 294 | pm8921_gpio_config(gpio_array[i].gpio, |
| 295 | &(gpio_array[i].config)); |
| 296 | } |
Amol Jadi | 7607167 | 2012-02-03 12:19:36 -0800 | [diff] [blame] | 297 | } |
| 298 | |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 299 | #define PM8921_GPIO_OUTPUT_FUNC(_gpio, _val, _func) \ |
| 300 | PM8XXX_GPIO_INIT(_gpio, PM_GPIO_DIR_OUT, 0, _val, \ |
| 301 | PM_GPIO_PULL_NO, 2, \ |
| 302 | PM_GPIO_STRENGTH_HIGH, \ |
| 303 | _func, 0, 0) |
| 304 | |
| 305 | |
| 306 | #define PM8921_GPIO_OUTPUT_BUFCONF(_gpio, _val, _strength, _bufconf) \ |
| 307 | PM8XXX_GPIO_INIT(_gpio, PM_GPIO_DIR_OUT,\ |
| 308 | PM_GPIO_OUT_BUF_##_bufconf, _val, \ |
| 309 | PM_GPIO_PULL_NO, 2, \ |
| 310 | PM_GPIO_STRENGTH_##_strength, \ |
| 311 | PM_GPIO_FUNC_NORMAL, 0, 0) |
| 312 | |
| 313 | |
| 314 | static struct pm8xxx_gpio_init pm8921_display_gpios_apq[] = { |
| 315 | /* Display GPIOs */ |
| 316 | /* Bl: ON, PWM mode */ |
| 317 | PM8921_GPIO_OUTPUT_FUNC(PM_GPIO(26), 1, PM_GPIO_FUNC_2), |
| 318 | /* LCD1_PWR_EN_N */ |
| 319 | PM8921_GPIO_OUTPUT_BUFCONF(PM_GPIO(36), 0, LOW, OPEN_DRAIN), |
| 320 | /* DISP_RESET_N */ |
| 321 | PM8921_GPIO_OUTPUT_BUFCONF(PM_GPIO(25), 1, LOW, CMOS), |
| 322 | }; |
| 323 | |
| 324 | void apq8064_display_gpio_init() |
| 325 | { |
| 326 | int i = 0; |
| 327 | int num = 0; |
| 328 | |
| 329 | num = ARRAY_SIZE(pm8921_display_gpios_apq); |
| 330 | |
| 331 | for (i = 0; i < num; i++) { |
| 332 | pm8921_gpio_config(pm8921_display_gpios_apq[i].gpio, |
| 333 | &(pm8921_display_gpios_apq[i].config)); |
| 334 | } |
| 335 | } |