54 lines
1.3 KiB
C
54 lines
1.3 KiB
C
/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
#include <linux/ioport.h>
|
|
#include <mach/board.h>
|
|
#include <mach/gpio.h>
|
|
#include <mach/gpiomux.h>
|
|
|
|
static struct gpiomux_setting gpio_uart_config = {
|
|
.func = GPIOMUX_FUNC_2,
|
|
.drv = GPIOMUX_DRV_16MA,
|
|
.pull = GPIOMUX_PULL_NONE,
|
|
.dir = GPIOMUX_OUT_HIGH,
|
|
};
|
|
|
|
static struct msm_gpiomux_config msm_blsp_configs[] __initdata = {
|
|
{
|
|
.gpio = 45, /* BLSP8 UART TX */
|
|
.settings = {
|
|
[GPIOMUX_SUSPENDED] = &gpio_uart_config,
|
|
},
|
|
},
|
|
{
|
|
.gpio = 46, /* BLSP8 UART RX */
|
|
.settings = {
|
|
[GPIOMUX_SUSPENDED] = &gpio_uart_config,
|
|
},
|
|
},
|
|
};
|
|
|
|
void __init mpq8092_init_gpiomux(void)
|
|
{
|
|
int rc;
|
|
|
|
rc = msm_gpiomux_init_dt();
|
|
if (rc) {
|
|
pr_err("%s failed %d\n", __func__, rc);
|
|
return;
|
|
}
|
|
|
|
msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs));
|
|
}
|