board-victor-gpiomux.c 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152
  1. /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
  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.
  11. *
  12. */
  13. /****************************** Revision History ******************************************
  14. *CH# Product author Description Date
  15. *-----------------------------------------------------------------------------------------
  16. *01
  17. * variants
  18. ******************************************************************************************
  19. */
  20. #include <linux/init.h>
  21. #include <linux/ioport.h>
  22. #include <mach/board.h>
  23. #include <mach/gpio.h>
  24. #include <mach/gpiomux.h>
  25. #include <mach/socinfo.h>
  26. #ifdef CONFIG_USB_EHCI_MSM_HSIC
  27. static struct gpiomux_setting hsic_sus_cfg = {
  28. .func = GPIOMUX_FUNC_GPIO,
  29. .drv = GPIOMUX_DRV_2MA,
  30. .pull = GPIOMUX_PULL_DOWN,
  31. .dir = GPIOMUX_OUT_LOW,
  32. };
  33. static struct gpiomux_setting hsic_act_cfg = {
  34. .func = GPIOMUX_FUNC_1,
  35. .drv = GPIOMUX_DRV_16MA,
  36. .pull = GPIOMUX_PULL_NONE,
  37. };
  38. static struct msm_gpiomux_config msm_hsic_configs[] = {
  39. {
  40. .gpio = 115, /* HSIC_STROBE */
  41. .settings = {
  42. [GPIOMUX_ACTIVE] = &hsic_act_cfg,
  43. [GPIOMUX_SUSPENDED] = &hsic_sus_cfg,
  44. },
  45. },
  46. {
  47. .gpio = 116, /* HSIC_DATA */
  48. .settings = {
  49. [GPIOMUX_ACTIVE] = &hsic_act_cfg,
  50. [GPIOMUX_SUSPENDED] = &hsic_sus_cfg,
  51. },
  52. },
  53. };
  54. #endif
  55. #define KS8851_IRQ_GPIO 115
  56. static struct gpiomux_setting gpio_suspend_config[] = {
  57. {
  58. .func = GPIOMUX_FUNC_GPIO, /* IN-NP */
  59. .drv = GPIOMUX_DRV_2MA,
  60. .pull = GPIOMUX_PULL_NONE,
  61. },
  62. {
  63. .func = GPIOMUX_FUNC_GPIO, /* OUT-NP */
  64. .drv = GPIOMUX_DRV_2MA,
  65. .pull = GPIOMUX_PULL_NONE,
  66. .dir = GPIOMUX_OUT_LOW,
  67. },
  68. {
  69. .func = GPIOMUX_FUNC_GPIO, /* IN-PD */
  70. .drv = GPIOMUX_DRV_2MA,
  71. .pull = GPIOMUX_PULL_DOWN,
  72. },
  73. {
  74. .func = GPIOMUX_FUNC_GPIO, /* OUT-PD */
  75. .drv = GPIOMUX_DRV_2MA,
  76. .pull = GPIOMUX_PULL_DOWN,
  77. .dir = GPIOMUX_OUT_LOW,
  78. },
  79. };
  80. #define GPIOMUX_SET_NC(n) \
  81. { \
  82. .gpio = n, \
  83. .settings = { \
  84. [GPIOMUX_ACTIVE] = &gpio_suspend_config[2], \
  85. [GPIOMUX_SUSPENDED] = &gpio_suspend_config[2], \
  86. }, \
  87. }
  88. static struct msm_gpiomux_config gpio_nc_configs[] __initdata = {
  89. GPIOMUX_SET_NC(0),
  90. GPIOMUX_SET_NC(1),
  91. GPIOMUX_SET_NC(2),
  92. GPIOMUX_SET_NC(3),
  93. GPIOMUX_SET_NC(22),
  94. GPIOMUX_SET_NC(23),
  95. GPIOMUX_SET_NC(27),
  96. GPIOMUX_SET_NC(33),
  97. #if !defined(CONFIG_MACH_VICTORLTE_CTC)
  98. GPIOMUX_SET_NC(34),
  99. #endif
  100. GPIOMUX_SET_NC(36),
  101. GPIOMUX_SET_NC(45),
  102. GPIOMUX_SET_NC(46),
  103. GPIOMUX_SET_NC(49),
  104. GPIOMUX_SET_NC(50),
  105. GPIOMUX_SET_NC(56),
  106. GPIOMUX_SET_NC(60),
  107. GPIOMUX_SET_NC(63),
  108. GPIOMUX_SET_NC(64),
  109. GPIOMUX_SET_NC(66),
  110. GPIOMUX_SET_NC(77),
  111. GPIOMUX_SET_NC(81),
  112. GPIOMUX_SET_NC(82),
  113. GPIOMUX_SET_NC(95),
  114. GPIOMUX_SET_NC(96),
  115. GPIOMUX_SET_NC(107),
  116. GPIOMUX_SET_NC(110),
  117. GPIOMUX_SET_NC(113),
  118. GPIOMUX_SET_NC(114),
  119. GPIOMUX_SET_NC(119),
  120. GPIOMUX_SET_NC(120),
  121. };
  122. static struct msm_gpiomux_config hw_rev_configs[] __initdata = {
  123. {
  124. .gpio = 15, /* HW_REV(0) */
  125. .settings = {
  126. [GPIOMUX_ACTIVE] = &gpio_suspend_config[0],
  127. [GPIOMUX_SUSPENDED] = &gpio_suspend_config[0],
  128. },
  129. },
  130. {
  131. .gpio = 14, /* HW_REV(1) */
  132. .settings = {
  133. [GPIOMUX_ACTIVE] = &gpio_suspend_config[0],
  134. [GPIOMUX_SUSPENDED] = &gpio_suspend_config[0],
  135. },
  136. },
  137. {
  138. .gpio = 13, /* HW_REV(2) */
  139. .settings = {
  140. [GPIOMUX_ACTIVE] = &gpio_suspend_config[0],
  141. [GPIOMUX_SUSPENDED] = &gpio_suspend_config[0],
  142. },
  143. },
  144. {
  145. .gpio = 16, /* HW_REV(3) */
  146. .settings = {
  147. [GPIOMUX_ACTIVE] = &gpio_suspend_config[0],
  148. [GPIOMUX_SUSPENDED] = &gpio_suspend_config[0],
  149. },
  150. },
  151. };
  152. #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
  153. static struct gpiomux_setting gpio_eth_config = {
  154. .pull = GPIOMUX_PULL_UP,
  155. .drv = GPIOMUX_DRV_2MA,
  156. .func = GPIOMUX_FUNC_GPIO,
  157. };
  158. static struct msm_gpiomux_config msm_eth_configs[] = {
  159. {
  160. .gpio = KS8851_IRQ_GPIO,
  161. .settings = {
  162. [GPIOMUX_SUSPENDED] = &gpio_eth_config,
  163. }
  164. },
  165. };
  166. #endif
  167. static struct gpiomux_setting muic_active_config[] = {
  168. {
  169. .func = GPIOMUX_FUNC_GPIO,
  170. .drv = GPIOMUX_DRV_2MA,
  171. .pull = GPIOMUX_PULL_NONE,
  172. },
  173. {
  174. .func = GPIOMUX_FUNC_GPIO,
  175. .drv = GPIOMUX_DRV_2MA,
  176. .pull = GPIOMUX_PULL_DOWN,
  177. .dir = GPIOMUX_IN,
  178. }
  179. };
  180. static struct gpiomux_setting muic_suspend_config[] = {
  181. {
  182. .func = GPIOMUX_FUNC_GPIO,
  183. .drv = GPIOMUX_DRV_2MA,
  184. .pull = GPIOMUX_PULL_NONE,
  185. },
  186. {
  187. .func = GPIOMUX_FUNC_GPIO,
  188. .drv = GPIOMUX_DRV_2MA,
  189. .pull = GPIOMUX_PULL_DOWN,
  190. .dir = GPIOMUX_IN,
  191. }
  192. };
  193. static struct msm_gpiomux_config muic_gpio_config[] __initdata = {
  194. {
  195. .gpio = 4,
  196. .settings = {
  197. [GPIOMUX_ACTIVE] = &muic_active_config[0],
  198. [GPIOMUX_SUSPENDED] = &muic_suspend_config[0],
  199. },
  200. },
  201. #if !defined(CONFIG_MACH_VICTORLTE_CTC)
  202. {
  203. .gpio = 5,
  204. .settings = {
  205. [GPIOMUX_ACTIVE] = &muic_active_config[0],
  206. [GPIOMUX_SUSPENDED] = &muic_suspend_config[0],
  207. },
  208. },
  209. #endif
  210. };
  211. static struct gpiomux_setting synaptics_int_act_cfg = {
  212. .func = GPIOMUX_FUNC_GPIO,
  213. .drv = GPIOMUX_DRV_8MA,
  214. .pull = GPIOMUX_PULL_UP,
  215. };
  216. static struct gpiomux_setting synaptics_int_sus_cfg = {
  217. .func = GPIOMUX_FUNC_GPIO,
  218. .drv = GPIOMUX_DRV_2MA,
  219. .pull = GPIOMUX_PULL_DOWN,
  220. };
  221. static struct gpiomux_setting synaptics_reset_act_cfg = {
  222. .func = GPIOMUX_FUNC_GPIO,
  223. .drv = GPIOMUX_DRV_6MA,
  224. .pull = GPIOMUX_PULL_DOWN,
  225. };
  226. static struct gpiomux_setting synaptics_reset_sus_cfg = {
  227. .func = GPIOMUX_FUNC_GPIO,
  228. .drv = GPIOMUX_DRV_2MA,
  229. .pull = GPIOMUX_PULL_DOWN,
  230. };
  231. static struct gpiomux_setting chg_pm8226_gpio_cfg = {
  232. .func = GPIOMUX_FUNC_GPIO,
  233. .drv = GPIOMUX_DRV_2MA,
  234. .pull = GPIOMUX_PULL_NONE,
  235. .dir = GPIOMUX_IN,
  236. };
  237. static struct gpiomux_setting gpio_keys_active = {
  238. .func = GPIOMUX_FUNC_GPIO,
  239. .drv = GPIOMUX_DRV_2MA,
  240. .pull = GPIOMUX_PULL_UP,
  241. };
  242. static struct gpiomux_setting gpio_keys_suspend = {
  243. .func = GPIOMUX_FUNC_GPIO,
  244. .drv = GPIOMUX_DRV_2MA,
  245. .pull = GPIOMUX_PULL_NONE,
  246. };
  247. static struct gpiomux_setting wcnss_5wire_suspend_cfg = {
  248. .func = GPIOMUX_FUNC_GPIO,
  249. .drv = GPIOMUX_DRV_2MA,
  250. .pull = GPIOMUX_PULL_UP,
  251. };
  252. static struct gpiomux_setting wcnss_5wire_active_cfg = {
  253. .func = GPIOMUX_FUNC_1,
  254. .drv = GPIOMUX_DRV_6MA,
  255. .pull = GPIOMUX_PULL_DOWN,
  256. };
  257. static struct gpiomux_setting gpio_i2c_config = {
  258. .func = GPIOMUX_FUNC_3,
  259. .drv = GPIOMUX_DRV_2MA,
  260. .pull = GPIOMUX_PULL_NONE,
  261. };
  262. static struct msm_gpiomux_config msm_keypad_configs[] __initdata = {
  263. {
  264. .gpio = 106,
  265. .settings = {
  266. [GPIOMUX_ACTIVE] = &gpio_keys_active,
  267. [GPIOMUX_SUSPENDED] = &gpio_keys_suspend,
  268. },
  269. },
  270. {
  271. .gpio = 108,
  272. .settings = {
  273. [GPIOMUX_ACTIVE] = &gpio_keys_active,
  274. [GPIOMUX_SUSPENDED] = &gpio_keys_suspend,
  275. },
  276. },
  277. };
  278. static struct gpiomux_setting lcd_det_act_cfg = {
  279. .func = GPIOMUX_FUNC_GPIO,
  280. .drv = GPIOMUX_DRV_8MA,
  281. .pull = GPIOMUX_PULL_NONE,
  282. .dir = GPIOMUX_IN,
  283. };
  284. static struct gpiomux_setting lcd_det_sus_cfg = {
  285. .func = GPIOMUX_FUNC_GPIO,
  286. .drv = GPIOMUX_DRV_2MA,
  287. .pull = GPIOMUX_PULL_NONE,
  288. .dir = GPIOMUX_IN,
  289. };
  290. static struct gpiomux_setting lcd_rst_act_cfg = {
  291. .func = GPIOMUX_FUNC_GPIO,
  292. .drv = GPIOMUX_DRV_8MA,
  293. .pull = GPIOMUX_PULL_UP,
  294. .dir = GPIOMUX_OUT_HIGH,
  295. };
  296. static struct gpiomux_setting lcd_rst_sus_cfg = {
  297. .func = GPIOMUX_FUNC_GPIO,
  298. .drv = GPIOMUX_DRV_2MA,
  299. .pull = GPIOMUX_PULL_DOWN,
  300. .dir = GPIOMUX_OUT_LOW,
  301. };
  302. static struct gpiomux_setting lcd_en_act_cfg = {
  303. .func = GPIOMUX_FUNC_GPIO,
  304. .drv = GPIOMUX_DRV_8MA,
  305. .pull = GPIOMUX_PULL_NONE,
  306. .dir = GPIOMUX_OUT_HIGH,
  307. };
  308. static struct gpiomux_setting lcd_en_sus_cfg = {
  309. .func = GPIOMUX_FUNC_GPIO,
  310. .drv = GPIOMUX_DRV_2MA,
  311. .pull = GPIOMUX_PULL_DOWN,
  312. .dir = GPIOMUX_OUT_LOW,
  313. };
  314. static struct gpiomux_setting lcd_flm_act_cfg = {
  315. .func = GPIOMUX_FUNC_GPIO,
  316. .drv = GPIOMUX_DRV_8MA,
  317. .pull = GPIOMUX_PULL_DOWN,
  318. .dir = GPIOMUX_IN,
  319. };
  320. static struct gpiomux_setting lcd_flm_sus_cfg = {
  321. .func = GPIOMUX_FUNC_GPIO,
  322. .drv = GPIOMUX_DRV_2MA,
  323. .pull = GPIOMUX_PULL_DOWN,
  324. .dir = GPIOMUX_IN,
  325. };
  326. static struct msm_gpiomux_config msm_lcd_configs[] __initdata = {
  327. {
  328. .gpio = 25,
  329. .settings = {
  330. [GPIOMUX_ACTIVE] = &lcd_rst_act_cfg,
  331. [GPIOMUX_SUSPENDED] = &lcd_rst_sus_cfg,
  332. },
  333. },
  334. {
  335. .gpio = 28,
  336. .settings = {
  337. [GPIOMUX_ACTIVE] = &lcd_en_act_cfg,
  338. [GPIOMUX_SUSPENDED] = &lcd_en_sus_cfg,
  339. },
  340. },
  341. };
  342. static struct msm_gpiomux_config msm_lcd_det_configs[] __initdata = {
  343. {
  344. .gpio = 33,
  345. .settings = {
  346. [GPIOMUX_ACTIVE] = &lcd_det_act_cfg,
  347. [GPIOMUX_SUSPENDED] = &lcd_det_sus_cfg,
  348. },
  349. },
  350. {
  351. .gpio = 24,
  352. .settings = {
  353. [GPIOMUX_ACTIVE] = &lcd_flm_act_cfg,
  354. [GPIOMUX_SUSPENDED] = &lcd_flm_sus_cfg,
  355. },
  356. },
  357. };
  358. static struct gpiomux_setting sensor_gpio_i2c_config = {
  359. .func = GPIOMUX_FUNC_3,
  360. .drv = GPIOMUX_DRV_2MA,
  361. .pull = GPIOMUX_PULL_NONE,
  362. .dir = GPIOMUX_IN,
  363. };
  364. static struct gpiomux_setting accel_irq_config = {
  365. .func = GPIOMUX_FUNC_GPIO,
  366. .drv = GPIOMUX_DRV_2MA,
  367. .pull = GPIOMUX_PULL_NONE,
  368. .dir = GPIOMUX_IN,
  369. };
  370. static struct gpiomux_setting prox_irq_config = {
  371. .func = GPIOMUX_FUNC_GPIO,
  372. .drv = GPIOMUX_DRV_2MA,
  373. .pull = GPIOMUX_PULL_NONE,
  374. .dir = GPIOMUX_IN,
  375. };
  376. static struct gpiomux_setting proxy_en_config = {
  377. .func = GPIOMUX_FUNC_GPIO,
  378. .drv = GPIOMUX_DRV_2MA,
  379. .pull = GPIOMUX_PULL_NONE,
  380. .dir = GPIOMUX_OUT_LOW,
  381. };
  382. static struct msm_gpiomux_config msm_nativesensors_configs[] __initdata = {
  383. {
  384. .gpio = 34, /* PROXY_EN */
  385. .settings = {
  386. [GPIOMUX_ACTIVE] = &proxy_en_config,
  387. [GPIOMUX_SUSPENDED] = &proxy_en_config,
  388. },
  389. },
  390. {
  391. .gpio = 65, /* PROXY IRQ */
  392. .settings = {
  393. [GPIOMUX_ACTIVE] = &prox_irq_config,
  394. [GPIOMUX_SUSPENDED] = &prox_irq_config,
  395. },
  396. },
  397. {
  398. .gpio = 67, /* ACCEL IRQ */
  399. .settings = {
  400. [GPIOMUX_ACTIVE] = &accel_irq_config,
  401. [GPIOMUX_SUSPENDED] = &accel_irq_config,
  402. },
  403. },
  404. };
  405. static struct gpiomux_setting gpio_uart_config = {
  406. .func = GPIOMUX_FUNC_2,
  407. .drv = GPIOMUX_DRV_8MA,
  408. .pull = GPIOMUX_PULL_NONE, /*should be pulled None for UART */
  409. .dir = GPIOMUX_OUT_HIGH,
  410. };
  411. static struct gpiomux_setting rx_gpio_uart_config = {
  412. .func = GPIOMUX_FUNC_2,
  413. .drv = GPIOMUX_DRV_8MA,
  414. .pull = GPIOMUX_PULL_DOWN, /*LCIA Test failure*/
  415. .dir = GPIOMUX_OUT_HIGH,
  416. };
  417. static struct msm_gpiomux_config msm_blsp_configs[] __initdata = {
  418. {
  419. .gpio = 8, /* UART TX */
  420. .settings = {
  421. [GPIOMUX_SUSPENDED] = &gpio_uart_config,
  422. },
  423. },
  424. {
  425. .gpio = 9, /* UART RX */
  426. .settings = {
  427. [GPIOMUX_SUSPENDED] = &rx_gpio_uart_config,
  428. },
  429. },
  430. {
  431. .gpio = 18, /* BLSP1 QUP5 I2C_SDA */
  432. .settings = {
  433. [GPIOMUX_ACTIVE] = &gpio_i2c_config,
  434. [GPIOMUX_SUSPENDED] = &gpio_i2c_config,
  435. },
  436. },
  437. {
  438. .gpio = 19, /* BLSP1 QUP5 I2C_SCL */
  439. .settings = {
  440. [GPIOMUX_ACTIVE] = &gpio_i2c_config,
  441. [GPIOMUX_SUSPENDED] = &gpio_i2c_config,
  442. },
  443. },
  444. {
  445. .gpio = 6, /* BLSP1 QUP2 I2C_SDA */
  446. .settings = {
  447. [GPIOMUX_ACTIVE] = &sensor_gpio_i2c_config,
  448. [GPIOMUX_SUSPENDED] = &sensor_gpio_i2c_config,
  449. },
  450. },
  451. {
  452. .gpio = 7, /* BLSP1 QUP2 I2C_SCL */
  453. .settings = {
  454. [GPIOMUX_ACTIVE] = &sensor_gpio_i2c_config,
  455. [GPIOMUX_SUSPENDED] = &sensor_gpio_i2c_config,
  456. },
  457. },
  458. #if defined(CONFIG_NFC_PN547) || defined(CONFIG_BCM2079X_NFC_I2C)
  459. { /* NFC */
  460. .gpio = 10, /* BLSP1 QUP3 I2C_DAT */
  461. .settings = {
  462. [GPIOMUX_SUSPENDED] = &gpio_i2c_config,
  463. },
  464. },
  465. { /* NFC */
  466. .gpio = 11, /* BLSP1 QUP3 I2C_CLK */
  467. .settings = {
  468. [GPIOMUX_SUSPENDED] = &gpio_i2c_config,
  469. },
  470. },
  471. #endif
  472. };
  473. static struct msm_gpiomux_config msm_synaptics_configs[] __initdata = {
  474. {
  475. .gpio = 16,
  476. .settings = {
  477. [GPIOMUX_ACTIVE] = &synaptics_reset_act_cfg,
  478. [GPIOMUX_SUSPENDED] = &synaptics_reset_sus_cfg,
  479. },
  480. },
  481. {
  482. .gpio = 17,
  483. .settings = {
  484. [GPIOMUX_ACTIVE] = &synaptics_int_act_cfg,
  485. [GPIOMUX_SUSPENDED] = &synaptics_int_sus_cfg,
  486. },
  487. },
  488. };
  489. static struct msm_gpiomux_config chg_pm8226_configs[] __initdata = {
  490. {
  491. .gpio = 51,
  492. .settings = {
  493. [GPIOMUX_ACTIVE] = &chg_pm8226_gpio_cfg,
  494. [GPIOMUX_SUSPENDED] = &chg_pm8226_gpio_cfg,
  495. },
  496. },
  497. };
  498. static struct gpiomux_setting gpio_nc_cfg = {
  499. .func = GPIOMUX_FUNC_GPIO,
  500. .drv = GPIOMUX_DRV_2MA,
  501. .pull = GPIOMUX_PULL_NONE,
  502. };
  503. static struct gpiomux_setting goodix_ldo_en_act_cfg = {
  504. .func = GPIOMUX_FUNC_GPIO,
  505. .drv = GPIOMUX_DRV_6MA,
  506. .pull = GPIOMUX_PULL_UP,
  507. };
  508. static struct gpiomux_setting goodix_ldo_en_sus_cfg = {
  509. .func = GPIOMUX_FUNC_GPIO,
  510. .drv = GPIOMUX_DRV_2MA,
  511. .pull = GPIOMUX_PULL_DOWN,
  512. };
  513. static struct gpiomux_setting goodix_int_act_cfg = {
  514. .func = GPIOMUX_FUNC_GPIO,
  515. .drv = GPIOMUX_DRV_6MA,
  516. .pull = GPIOMUX_PULL_UP,
  517. };
  518. static struct gpiomux_setting goodix_int_sus_cfg = {
  519. .func = GPIOMUX_FUNC_GPIO,
  520. .drv = GPIOMUX_DRV_2MA,
  521. .pull = GPIOMUX_PULL_DOWN,
  522. };
  523. static struct gpiomux_setting goodix_reset_act_cfg = {
  524. .func = GPIOMUX_FUNC_GPIO,
  525. .drv = GPIOMUX_DRV_6MA,
  526. .pull = GPIOMUX_PULL_UP,
  527. };
  528. static struct gpiomux_setting goodix_reset_sus_cfg = {
  529. .func = GPIOMUX_FUNC_GPIO,
  530. .drv = GPIOMUX_DRV_2MA,
  531. .pull = GPIOMUX_PULL_DOWN,
  532. };
  533. static struct msm_gpiomux_config msm_skuf_blsp_configs[] __initdata = {
  534. {
  535. .gpio = 2, /* NC */
  536. .settings = {
  537. [GPIOMUX_SUSPENDED] = &gpio_nc_cfg,
  538. },
  539. },
  540. {
  541. .gpio = 3, /* NC */
  542. .settings = {
  543. [GPIOMUX_SUSPENDED] = &gpio_nc_cfg,
  544. },
  545. },
  546. {
  547. .gpio = 4, /* NC */
  548. .settings = {
  549. [GPIOMUX_SUSPENDED] = &gpio_nc_cfg,
  550. },
  551. },
  552. {
  553. .gpio = 14, /* NC */
  554. .settings = {
  555. [GPIOMUX_SUSPENDED] = &gpio_nc_cfg,
  556. },
  557. },
  558. };
  559. static struct msm_gpiomux_config msm_skuf_goodix_configs[] __initdata = {
  560. {
  561. .gpio = 15, /* LDO EN */
  562. .settings = {
  563. [GPIOMUX_ACTIVE] = &goodix_ldo_en_act_cfg,
  564. [GPIOMUX_SUSPENDED] = &goodix_ldo_en_sus_cfg,
  565. },
  566. },
  567. {
  568. .gpio = 16, /* RESET */
  569. .settings = {
  570. [GPIOMUX_ACTIVE] = &goodix_reset_act_cfg,
  571. [GPIOMUX_SUSPENDED] = &goodix_reset_sus_cfg,
  572. },
  573. },
  574. {
  575. .gpio = 17, /* INT */
  576. .settings = {
  577. [GPIOMUX_ACTIVE] = &goodix_int_act_cfg,
  578. [GPIOMUX_SUSPENDED] = &goodix_int_sus_cfg,
  579. },
  580. },
  581. {
  582. .gpio = 18, /* BLSP1 QUP5 I2C_SDA */
  583. .settings = {
  584. [GPIOMUX_ACTIVE] = &gpio_i2c_config,
  585. [GPIOMUX_SUSPENDED] = &gpio_i2c_config,
  586. },
  587. },
  588. {
  589. .gpio = 19, /* BLSP1 QUP5 I2C_SCL */
  590. .settings = {
  591. [GPIOMUX_ACTIVE] = &gpio_i2c_config,
  592. [GPIOMUX_SUSPENDED] = &gpio_i2c_config,
  593. },
  594. },
  595. };
  596. static struct gpiomux_setting nfc_wake_act_cfg = {
  597. .func = GPIOMUX_FUNC_GPIO,
  598. .drv = GPIOMUX_DRV_6MA,
  599. .pull = GPIOMUX_PULL_UP,
  600. };
  601. static struct gpiomux_setting nfc_wake_sus_cfg = {
  602. .func = GPIOMUX_FUNC_GPIO,
  603. .drv = GPIOMUX_DRV_2MA,
  604. .pull = GPIOMUX_PULL_NONE,
  605. .dir = GPIOMUX_OUT_LOW,
  606. };
  607. static struct msm_gpiomux_config msm_skuf_nfc_configs[] __initdata = {
  608. { /* NFC WAKE */
  609. .gpio = 5,
  610. .settings = {
  611. [GPIOMUX_ACTIVE] = &nfc_wake_act_cfg,
  612. [GPIOMUX_SUSPENDED] = &nfc_wake_sus_cfg,
  613. },
  614. },
  615. };
  616. static struct gpiomux_setting nfc_wake_cfg = {
  617. .func = GPIOMUX_FUNC_GPIO,
  618. .drv = GPIOMUX_DRV_2MA,
  619. .pull = GPIOMUX_PULL_DOWN,
  620. .dir = GPIOMUX_IN,
  621. };
  622. static struct msm_gpiomux_config msm_nfc_configs[] __initdata = {
  623. { /* NFC_IRQ */
  624. .gpio = 21,
  625. .settings = {
  626. [GPIOMUX_ACTIVE] = &nfc_wake_cfg,
  627. [GPIOMUX_SUSPENDED] = &nfc_wake_cfg,
  628. },
  629. },
  630. };
  631. static struct gpiomux_setting sd_card_det_active_config = {
  632. .func = GPIOMUX_FUNC_GPIO,
  633. .drv = GPIOMUX_DRV_2MA,
  634. .pull = GPIOMUX_PULL_NONE,
  635. .dir = GPIOMUX_IN,
  636. };
  637. static struct gpiomux_setting sd_card_det_sleep_config = {
  638. .func = GPIOMUX_FUNC_GPIO,
  639. .drv = GPIOMUX_DRV_2MA,
  640. .pull = GPIOMUX_PULL_NONE,
  641. .dir = GPIOMUX_IN,
  642. };
  643. static struct msm_gpiomux_config sd_card_det __initdata = {
  644. .gpio = 38,
  645. .settings = {
  646. [GPIOMUX_ACTIVE] = &sd_card_det_active_config,
  647. [GPIOMUX_SUSPENDED] = &sd_card_det_sleep_config,
  648. },
  649. };
  650. static struct msm_gpiomux_config wcnss_5wire_interface[] = {
  651. {
  652. .gpio = 40,
  653. .settings = {
  654. [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
  655. [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
  656. },
  657. },
  658. {
  659. .gpio = 41,
  660. .settings = {
  661. [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
  662. [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
  663. },
  664. },
  665. {
  666. .gpio = 42,
  667. .settings = {
  668. [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
  669. [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
  670. },
  671. },
  672. {
  673. .gpio = 43,
  674. .settings = {
  675. [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
  676. [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
  677. },
  678. },
  679. {
  680. .gpio = 44,
  681. .settings = {
  682. [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
  683. [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
  684. },
  685. },
  686. };
  687. static struct gpiomux_setting cam_settings[] = {
  688. {
  689. .func = GPIOMUX_FUNC_1, /*active 1*/ /* 0 */
  690. .drv = GPIOMUX_DRV_2MA,
  691. .pull = GPIOMUX_PULL_NONE,
  692. },
  693. {
  694. .func = GPIOMUX_FUNC_1, /*suspend*/ /* 1 */
  695. .drv = GPIOMUX_DRV_2MA,
  696. .pull = GPIOMUX_PULL_DOWN,
  697. },
  698. {
  699. .func = GPIOMUX_FUNC_1, /*i2c suspend*/ /* 2 */
  700. .drv = GPIOMUX_DRV_2MA,
  701. .pull = GPIOMUX_PULL_KEEPER,
  702. },
  703. {
  704. .func = GPIOMUX_FUNC_GPIO, /*active 0*/ /* 3 */
  705. .drv = GPIOMUX_DRV_2MA,
  706. .pull = GPIOMUX_PULL_NONE,
  707. .dir = GPIOMUX_OUT_LOW,
  708. },
  709. {
  710. .func = GPIOMUX_FUNC_GPIO, /*suspend 0*/ /* 4 */
  711. .drv = GPIOMUX_DRV_2MA,
  712. .pull = GPIOMUX_PULL_DOWN,
  713. .dir = GPIOMUX_OUT_LOW,
  714. },
  715. {
  716. .func = GPIOMUX_FUNC_1, /*active 1*/ /* 0 */
  717. .drv = GPIOMUX_DRV_4MA,
  718. .pull = GPIOMUX_PULL_NONE,
  719. },
  720. {
  721. .func = GPIOMUX_FUNC_1, /*suspend*/ /* 1 */
  722. .drv = GPIOMUX_DRV_4MA,
  723. .pull = GPIOMUX_PULL_DOWN,
  724. },
  725. {
  726. .func = GPIOMUX_FUNC_GPIO, /*active 1*/ /* 0 */ //7 Haarika
  727. .drv = GPIOMUX_DRV_2MA,
  728. .pull = GPIOMUX_PULL_DOWN,
  729. .dir = GPIOMUX_IN,
  730. },
  731. {
  732. .func = GPIOMUX_FUNC_GPIO, /*suspend*/ /* 1 */ //8
  733. .drv = GPIOMUX_DRV_2MA,
  734. .pull = GPIOMUX_PULL_DOWN,
  735. .dir = GPIOMUX_IN,
  736. },
  737. {
  738. .func = GPIOMUX_FUNC_1, /*active 1*/ /* 9 */
  739. .drv = GPIOMUX_DRV_6MA,
  740. .pull = GPIOMUX_PULL_NONE,
  741. },
  742. {
  743. .func = GPIOMUX_FUNC_1, /*suspend*/ /* 10 */
  744. .drv = GPIOMUX_DRV_6MA,
  745. .pull = GPIOMUX_PULL_DOWN,
  746. },
  747. {
  748. .func = GPIOMUX_FUNC_1, /*active 1*/ /* 11 */
  749. .drv = GPIOMUX_DRV_2MA,
  750. .pull = GPIOMUX_PULL_NONE,
  751. },
  752. {
  753. .func = GPIOMUX_FUNC_1, /*suspend*/ /* 12 */
  754. .drv = GPIOMUX_DRV_2MA,
  755. .pull = GPIOMUX_PULL_DOWN,
  756. },
  757. };
  758. static struct msm_gpiomux_config msm_sensor_configs[] __initdata = {
  759. {
  760. .gpio = 26, /* CAM_MCLK0 */
  761. .settings = {
  762. [GPIOMUX_ACTIVE] = &cam_settings[0],
  763. [GPIOMUX_SUSPENDED] = &cam_settings[1],
  764. },
  765. },
  766. {
  767. .gpio = 29, /* CCI_I2C_SDA0 */
  768. .settings = {
  769. [GPIOMUX_ACTIVE] = &cam_settings[0],
  770. [GPIOMUX_SUSPENDED] = &gpio_suspend_config[0],
  771. },
  772. },
  773. {
  774. .gpio = 30, /* CCI_I2C_SCL0 */
  775. .settings = {
  776. [GPIOMUX_ACTIVE] = &cam_settings[0],
  777. [GPIOMUX_SUSPENDED] = &gpio_suspend_config[0],
  778. },
  779. },
  780. {
  781. .gpio = 36, /* CAM1_STANDBY_N */
  782. .settings = {
  783. [GPIOMUX_ACTIVE] = &cam_settings[7],
  784. [GPIOMUX_SUSPENDED] = &cam_settings[8],
  785. },
  786. },
  787. {
  788. .gpio = 37, /* CAM1_RST_N */
  789. .settings = {
  790. [GPIOMUX_ACTIVE] = &cam_settings[3],
  791. [GPIOMUX_SUSPENDED] = &cam_settings[4],
  792. },
  793. },
  794. {
  795. .gpio = 35, /* CAM2_STANDBY_N */
  796. .settings = {
  797. [GPIOMUX_ACTIVE] = &cam_settings[7],
  798. [GPIOMUX_SUSPENDED] = &cam_settings[8],
  799. },
  800. },
  801. {
  802. .gpio = 112, /* CAM_ANALOG_EN */
  803. .settings = {
  804. [GPIOMUX_ACTIVE] = &cam_settings[3],
  805. [GPIOMUX_SUSPENDED] = &cam_settings[4],
  806. },
  807. },
  808. };
  809. static struct msm_gpiomux_config msm_sensor_configs_skuf_plus[] __initdata = {
  810. {
  811. .gpio = 22, /* CAM1_VDD */
  812. .settings = {
  813. [GPIOMUX_ACTIVE] = &cam_settings[7],
  814. [GPIOMUX_SUSPENDED] = &cam_settings[8],
  815. },
  816. },
  817. #if !defined(CONFIG_MACH_VICTORLTE_CTC)
  818. {
  819. .gpio = 34, /* CAM1 VCM_PWDN */
  820. .settings = {
  821. [GPIOMUX_ACTIVE] = &cam_settings[7],
  822. [GPIOMUX_SUSPENDED] = &cam_settings[8],
  823. },
  824. },
  825. #endif
  826. };
  827. static struct gpiomux_setting codec_int_gpio_active_cfg = {
  828. .func = GPIOMUX_FUNC_GPIO, /*active 1*/ /* 0 */
  829. .drv = GPIOMUX_DRV_2MA,
  830. .pull = GPIOMUX_PULL_NONE,
  831. .dir = GPIOMUX_IN,
  832. };
  833. static struct gpiomux_setting codec_int_gpio_suspend_cfg = {
  834. .func = GPIOMUX_FUNC_GPIO, /*suspend*/ /* 1 */
  835. .drv = GPIOMUX_DRV_2MA,
  836. .pull = GPIOMUX_PULL_NONE,
  837. .dir = GPIOMUX_IN,
  838. };
  839. static struct msm_gpiomux_config msm_codec_int_gpio_configs[] __initdata = {
  840. {
  841. .gpio = 68, /* CODEC_INT */
  842. .settings = {
  843. [GPIOMUX_ACTIVE] = &codec_int_gpio_active_cfg,
  844. [GPIOMUX_SUSPENDED] = &codec_int_gpio_suspend_cfg,
  845. },
  846. },
  847. };
  848. #if defined (CONFIG_SAMSUNG_JACK)
  849. static struct gpiomux_setting ear_switch_gpio_active_cfg = {
  850. .func = GPIOMUX_FUNC_GPIO, /*active 1*/ /* 0 */
  851. .drv = GPIOMUX_DRV_2MA,
  852. .pull = GPIOMUX_PULL_DOWN,
  853. .dir = GPIOMUX_IN,
  854. };
  855. static struct gpiomux_setting ear_switch_gpio_suspend_cfg = {
  856. .func = GPIOMUX_FUNC_GPIO, /*suspend*/ /* 1 */
  857. .drv = GPIOMUX_DRV_2MA,
  858. .pull = GPIOMUX_PULL_DOWN,
  859. .dir = GPIOMUX_IN,
  860. };
  861. static struct gpiomux_setting ear_det_gpio_active_cfg = {
  862. .func = GPIOMUX_FUNC_GPIO, /*active 1*/ /* 0 */
  863. .drv = GPIOMUX_DRV_2MA,
  864. .pull = GPIOMUX_PULL_NONE,
  865. .dir = GPIOMUX_IN,
  866. };
  867. static struct gpiomux_setting ear_det_gpio_suspend_cfg = {
  868. .func = GPIOMUX_FUNC_GPIO, /*suspend*/ /* 1 */
  869. .drv = GPIOMUX_DRV_2MA,
  870. .pull = GPIOMUX_PULL_NONE,
  871. .dir = GPIOMUX_IN,
  872. };
  873. static struct msm_gpiomux_config msm_earjack_gpio_configs[] __initdata = {
  874. {
  875. .gpio = 35, /* EAR_SWITCH */
  876. .settings = {
  877. [GPIOMUX_ACTIVE] = &ear_switch_gpio_active_cfg,
  878. [GPIOMUX_SUSPENDED] = &ear_switch_gpio_suspend_cfg,
  879. },
  880. },
  881. {
  882. .gpio = 69, /* EAR_3.5_DET */
  883. .settings = {
  884. [GPIOMUX_ACTIVE] = &ear_det_gpio_active_cfg,
  885. [GPIOMUX_SUSPENDED] = &ear_det_gpio_suspend_cfg,
  886. },
  887. },
  888. };
  889. #endif
  890. static struct gpiomux_setting wcdcodec_reset_suspend_cfg = {
  891. .func = GPIOMUX_FUNC_GPIO,
  892. .drv = GPIOMUX_DRV_2MA,
  893. .dir = GPIOMUX_OUT_HIGH,
  894. .pull = GPIOMUX_PULL_NONE,
  895. };
  896. static struct gpiomux_setting wcdcodec_reset_active_cfg = {
  897. .func = GPIOMUX_FUNC_GPIO,
  898. .drv = GPIOMUX_DRV_2MA,
  899. .dir = GPIOMUX_OUT_HIGH,
  900. .pull = GPIOMUX_PULL_NONE,
  901. };
  902. static struct msm_gpiomux_config wcdcodec_reset_cfg[] __initdata = {
  903. {
  904. .gpio = 72,
  905. .settings = {
  906. [GPIOMUX_ACTIVE] = &wcdcodec_reset_active_cfg,
  907. [GPIOMUX_SUSPENDED] = &wcdcodec_reset_suspend_cfg,
  908. },
  909. },
  910. };
  911. #ifdef CONFIG_MMC_MSM_SDC3_SUPPORT
  912. static struct gpiomux_setting sdc3_clk_actv_cfg = {
  913. .func = GPIOMUX_FUNC_2,
  914. .drv = GPIOMUX_DRV_8MA,
  915. .pull = GPIOMUX_PULL_NONE,
  916. };
  917. static struct gpiomux_setting sdc3_cmd_data_0_3_actv_cfg = {
  918. .func = GPIOMUX_FUNC_2,
  919. .drv = GPIOMUX_DRV_8MA,
  920. .pull = GPIOMUX_PULL_UP,
  921. };
  922. static struct gpiomux_setting sdc3_suspend_cfg = {
  923. .func = GPIOMUX_FUNC_GPIO,
  924. .drv = GPIOMUX_DRV_2MA,
  925. .pull = GPIOMUX_PULL_DOWN,
  926. };
  927. static struct gpiomux_setting sdc3_data_1_suspend_cfg = {
  928. .func = GPIOMUX_FUNC_GPIO,
  929. .drv = GPIOMUX_DRV_2MA,
  930. .pull = GPIOMUX_PULL_UP,
  931. };
  932. static struct msm_gpiomux_config msm8226_sdc3_configs[] __initdata = {
  933. {
  934. /* DAT3 */
  935. .gpio = 39,
  936. .settings = {
  937. [GPIOMUX_ACTIVE] = &sdc3_cmd_data_0_3_actv_cfg,
  938. [GPIOMUX_SUSPENDED] = &sdc3_suspend_cfg,
  939. },
  940. },
  941. {
  942. /* DAT2 */
  943. .gpio = 40,
  944. .settings = {
  945. [GPIOMUX_ACTIVE] = &sdc3_cmd_data_0_3_actv_cfg,
  946. [GPIOMUX_SUSPENDED] = &sdc3_suspend_cfg,
  947. },
  948. },
  949. {
  950. /* DAT1 */
  951. .gpio = 41,
  952. .settings = {
  953. [GPIOMUX_ACTIVE] = &sdc3_cmd_data_0_3_actv_cfg,
  954. [GPIOMUX_SUSPENDED] = &sdc3_data_1_suspend_cfg,
  955. },
  956. },
  957. {
  958. /* DAT0 */
  959. .gpio = 42,
  960. .settings = {
  961. [GPIOMUX_ACTIVE] = &sdc3_cmd_data_0_3_actv_cfg,
  962. [GPIOMUX_SUSPENDED] = &sdc3_suspend_cfg,
  963. },
  964. },
  965. {
  966. /* CMD */
  967. .gpio = 43,
  968. .settings = {
  969. [GPIOMUX_ACTIVE] = &sdc3_cmd_data_0_3_actv_cfg,
  970. [GPIOMUX_SUSPENDED] = &sdc3_suspend_cfg,
  971. },
  972. },
  973. {
  974. /* CLK */
  975. .gpio = 44,
  976. .settings = {
  977. [GPIOMUX_ACTIVE] = &sdc3_clk_actv_cfg,
  978. [GPIOMUX_SUSPENDED] = &sdc3_suspend_cfg,
  979. },
  980. },
  981. };
  982. static void msm_gpiomux_sdc3_install(void)
  983. {
  984. msm_gpiomux_install(msm8226_sdc3_configs,
  985. ARRAY_SIZE(msm8226_sdc3_configs));
  986. }
  987. #else
  988. static void msm_gpiomux_sdc3_install(void) {}
  989. #endif /* CONFIG_MMC_MSM_SDC3_SUPPORT */
  990. extern int poweroff_charging;
  991. void __init msm8226_init_gpiomux(void)
  992. {
  993. int rc;
  994. rc = msm_gpiomux_init_dt();
  995. if (rc) {
  996. pr_err("%s failed %d\n", __func__, rc);
  997. return;
  998. }
  999. #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
  1000. msm_gpiomux_install(msm_eth_configs, ARRAY_SIZE(msm_eth_configs));
  1001. #endif
  1002. msm_gpiomux_install(msm_keypad_configs,
  1003. ARRAY_SIZE(msm_keypad_configs));
  1004. if (of_board_is_skuf())
  1005. msm_gpiomux_install(msm_skuf_blsp_configs,
  1006. ARRAY_SIZE(msm_skuf_blsp_configs));
  1007. else
  1008. msm_gpiomux_install(msm_blsp_configs,
  1009. ARRAY_SIZE(msm_blsp_configs));
  1010. msm_gpiomux_install(wcnss_5wire_interface,
  1011. ARRAY_SIZE(wcnss_5wire_interface));
  1012. msm_gpiomux_install(&sd_card_det, 1);
  1013. if (of_board_is_skuf())
  1014. msm_gpiomux_install(msm_skuf_goodix_configs,
  1015. ARRAY_SIZE(msm_skuf_goodix_configs));
  1016. else
  1017. msm_gpiomux_install(msm_synaptics_configs,
  1018. ARRAY_SIZE(msm_synaptics_configs));
  1019. if (of_board_is_skuf())
  1020. msm_gpiomux_install(msm_skuf_nfc_configs,
  1021. ARRAY_SIZE(msm_skuf_nfc_configs));
  1022. else
  1023. msm_gpiomux_install(msm_nfc_configs,
  1024. ARRAY_SIZE(msm_nfc_configs));
  1025. msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs));
  1026. if (of_board_is_skuf())
  1027. msm_gpiomux_install(msm_sensor_configs_skuf_plus,
  1028. ARRAY_SIZE(msm_sensor_configs_skuf_plus));
  1029. msm_gpiomux_sdc3_install();
  1030. msm_gpiomux_install(msm_nativesensors_configs,ARRAY_SIZE(msm_nativesensors_configs));
  1031. msm_gpiomux_install(hw_rev_configs, ARRAY_SIZE(hw_rev_configs));
  1032. msm_gpiomux_install(gpio_nc_configs, ARRAY_SIZE(gpio_nc_configs));
  1033. msm_gpiomux_install(muic_gpio_config, ARRAY_SIZE(muic_gpio_config));
  1034. msm_gpiomux_install(msm_codec_int_gpio_configs, ARRAY_SIZE(msm_codec_int_gpio_configs));
  1035. #if defined(CONFIG_SAMSUNG_JACK)
  1036. msm_gpiomux_install(msm_earjack_gpio_configs, ARRAY_SIZE(msm_earjack_gpio_configs));
  1037. #endif
  1038. msm_gpiomux_install(chg_pm8226_configs, ARRAY_SIZE(chg_pm8226_configs));
  1039. if(!poweroff_charging)
  1040. msm_gpiomux_install(wcdcodec_reset_cfg, ARRAY_SIZE(wcdcodec_reset_cfg));
  1041. msm_gpiomux_install(msm_lcd_det_configs, ARRAY_SIZE(msm_lcd_det_configs));
  1042. msm_gpiomux_install_nowrite(msm_lcd_configs,ARRAY_SIZE(msm_lcd_configs));
  1043. }