• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PCOM_GPIO_CFG函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中PCOM_GPIO_CFG函数的典型用法代码示例。如果您正苦于以下问题:C++ PCOM_GPIO_CFG函数的具体用法?C++ PCOM_GPIO_CFG怎么用?C++ PCOM_GPIO_CFG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了PCOM_GPIO_CFG函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: I2C_BOARD_INFO

#ifdef CONFIG_MT9P012
	{
		I2C_BOARD_INFO("mt9p012", 0x6C >> 1),
	},
#endif
#if defined(CONFIG_MT9T013) || defined(CONFIG_SENSORS_MT9T013)
	{
		I2C_BOARD_INFO("mt9t013", 0x6C), // 0x78>>1
	},
#endif
};

#ifdef CONFIG_MSM_CAMERA
static uint32_t camera_off_gpio_table[] = {
	/* parallel CAMERA interfaces */
	PCOM_GPIO_CFG(0,  0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* DAT0 */
	PCOM_GPIO_CFG(1,  0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* DAT1 */
	PCOM_GPIO_CFG(2,  0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* DAT2 */
	PCOM_GPIO_CFG(3,  0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* DAT3 */
	PCOM_GPIO_CFG(4,  0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* DAT4 */
	PCOM_GPIO_CFG(5,  0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* DAT5 */
	PCOM_GPIO_CFG(6,  0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* DAT6 */
	PCOM_GPIO_CFG(7,  0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* DAT7 */
	PCOM_GPIO_CFG(8,  0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* DAT8 */
	PCOM_GPIO_CFG(9,  0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* DAT9 */
	PCOM_GPIO_CFG(10, 0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* DAT10 */
	PCOM_GPIO_CFG(11, 0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* DAT11 */
	PCOM_GPIO_CFG(12, 0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* PCLK */
	PCOM_GPIO_CFG(13, 0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* HSYNC_IN */
	PCOM_GPIO_CFG(14, 0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), /* VSYNC_IN */
	PCOM_GPIO_CFG(15, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA), /* MCLK */
开发者ID:AKToronto,项目名称:htc-kernel-msm7227,代码行数:31,代码来源:board-halibut.c


示例2: PCOM_GPIO_CFG

		.gain[VOC_NB_INDEX] =
		{-500, -200, 100, 400, 700, 1000, 0, 0, 0, 0},
		.gain[VOC_WB_INDEX] =
		{-500, -200, 100, 400, 700, 1000, 0, 0, 0, 0},
	},
	[Q5V2_HW_HAC] = {
		.max_step = 6,
		.gain[VOC_NB_INDEX] =
		{-500, -200, 100, 400, 700, 1000, 0, 0, 0, 0},
		.gain[VOC_WB_INDEX] =
		{-500, -200, 100, 400, 700, 1000, 0, 0, 0, 0},
	},
};

static unsigned aux_pcm_gpio_off[] = {
	PCOM_GPIO_CFG(SPADE_GPIO_BT_PCM_OUT, 0, GPIO_INPUT,
			GPIO_PULL_DOWN, GPIO_2MA),
	PCOM_GPIO_CFG(SPADE_GPIO_BT_PCM_IN, 0, GPIO_INPUT,
			GPIO_PULL_DOWN, GPIO_2MA),
	PCOM_GPIO_CFG(SPADE_GPIO_BT_PCM_SYNC, 0, GPIO_INPUT,
			GPIO_PULL_DOWN, GPIO_2MA),
	PCOM_GPIO_CFG(SPADE_GPIO_BT_PCM_CLK, 0, GPIO_INPUT,
			GPIO_PULL_DOWN, GPIO_2MA),
};

static unsigned aux_pcm_gpio_on[] = {
	PCOM_GPIO_CFG(SPADE_GPIO_BT_PCM_OUT, 1, GPIO_OUTPUT,
			GPIO_NO_PULL, GPIO_2MA),
	PCOM_GPIO_CFG(SPADE_GPIO_BT_PCM_IN, 1, GPIO_INPUT,
			GPIO_NO_PULL, GPIO_2MA),
	PCOM_GPIO_CFG(SPADE_GPIO_BT_PCM_SYNC, 1, GPIO_OUTPUT,
			GPIO_NO_PULL, GPIO_2MA),
开发者ID:BuzzBumbleBee,项目名称:linux-htc-acevivo,代码行数:32,代码来源:board-spade-audio.c


示例3: latte_init_panel

/*
 * In boot loader, mddi is powered on already.
 *
 * So, we just detect panel here, setting different
 * power function for each panel.
 *
 * Then we did not have to detect panel in each time
 * mddi_client_power or panel_power is called.
 *
 * jay: Nov 20, 08'
 */
int __init latte_init_panel(void)
{
	int rc;
	int panel_type = 0;
	int panel_id = -1;
	int gpio_lcd_id0, gpio_lcd_id1;
	uint32_t config;
	struct panel_data *panel_data = &eid_client_data.panel_conf;

	if (!machine_is_latte())
		return -1;

	B(KERN_INFO "%s: enter.\n", __func__);

	vreg_lcm_2v6 = vreg_get(0, "gp4");
	if (IS_ERR(vreg_lcm_2v6))
		return PTR_ERR(vreg_lcm_2v6);

	vreg_lcm_2v85 = vreg_get(0, "rfrx2");
	if (IS_ERR(vreg_lcm_2v85))
		return PTR_ERR(vreg_lcm_2v85);

	gpio_lcd_id0 =  PCOM_GPIO_CFG(LATTE_GPIO_LCD_ID0, 0, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA);
	gpio_lcd_id1 =  PCOM_GPIO_CFG(LATTE_GPIO_LCD_ID1, 0, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA);
	msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &gpio_lcd_id0, 0);
	msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &gpio_lcd_id1, 0);

	panel_id = gpio_get_value(LATTE_GPIO_LCD_ID0) |
		(gpio_get_value(LATTE_GPIO_LCD_ID1) << 1);

	B(KERN_INFO "%s: panel_id: %d\n", __func__, panel_id);

	switch(panel_id) {
		case 0:
			panel_type = 8;
		break;
		case 1:
			panel_type = 7;
		break;
		default:
			return -1;
		break;
        }
	panel_data->panel_id = panel_type;
	panel_data->caps = MSMFB_CAP_CABC;
	panel_data->pwm = pwm_eid;
        panel_data->shrink = 1;
        panel_data->shrink_br = latte_panel_shrink;

	config = PCOM_GPIO_CFG(LATTE_GPIO_LCD_VSYNC, 1, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA);
	msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0);

	rc = platform_device_register(&msm_device_mdp);
	if (rc)
		return rc;

	msm_device_mddi0.dev.platform_data = &latte_pdata;
	rc = platform_device_register(&msm_device_mddi0);
	if (rc)
		return rc;

	led_trigger_register_simple("lcd-backlight-gate", &latte_lcd_backlight);
	if (IS_ERR(latte_lcd_backlight))
		printk(KERN_ERR "%s: backlight registration failed!\n",
			__func__);
	return 0;

}
开发者ID:JasonMaloney,项目名称:htc-kernel-heroc,代码行数:79,代码来源:board-latte-panel.c


示例4: PCOM_GPIO_CFG

	TPO_160_TABLE,
	TPO_180_TABLE,
	TPO_200_TABLE,
	TPO_220_TABLE,
	TPO_240_TABLE,
	TPO_260_TABLE,
	TPO_280_TABLE,
	TPO_300_TABLE,
};

static struct vreg *vreg_lcm_1v8;
static struct vreg *vreg_lcm_2v8;

static uint32_t display_on_gpio_table[] = {
	/* Display */
	PCOM_GPIO_CFG(LEGEND_LCD_G5, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_16MA),
	PCOM_GPIO_CFG(LEGEND_LCD_DE, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_16MA),
	PCOM_GPIO_CFG(LEGEND_LCD_HSYNC, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_16MA),
	PCOM_GPIO_CFG(LEGEND_LCD_VSYNC, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_16MA),
	PCOM_GPIO_CFG(LEGEND_LCD_B0, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_16MA),
	PCOM_GPIO_CFG(LEGEND_LCD_B1, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_16MA),

	PCOM_GPIO_CFG(LEGEND_LCD_G1, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_16MA),
	PCOM_GPIO_CFG(LEGEND_LCD_G0, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_16MA),
	PCOM_GPIO_CFG(LEGEND_LCD_B4, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_16MA),
	PCOM_GPIO_CFG(LEGEND_LCD_B3, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_16MA),
	PCOM_GPIO_CFG(LEGEND_LCD_B2, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_16MA),
	PCOM_GPIO_CFG(LEGEND_LCD_G4, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_16MA),
	PCOM_GPIO_CFG(LEGEND_LCD_G3, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_16MA),
	PCOM_GPIO_CFG(LEGEND_LCD_G2, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_16MA),
开发者ID:Bdaman80,项目名称:hero-kernel-2.6.35,代码行数:30,代码来源:board-legend-panel.c


示例5: supersonic_disablesdcard_setup

#include "devices.h"
#include "proc_comm.h"

#define DEBUG_SDSLOT_VDD 1

static bool opt_disable_sdcard;
static int __init supersonic_disablesdcard_setup(char *str)
{
	opt_disable_sdcard = (bool)simple_strtol(str, NULL, 0);
	return 1;
}

__setup("board_supersonic.disable_sdcard=", supersonic_disablesdcard_setup);

static uint32_t sdcard_on_gpio_table[] = {
	PCOM_GPIO_CFG(62, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_8MA), /* CLK */
	PCOM_GPIO_CFG(63, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_8MA), /* CMD */
	PCOM_GPIO_CFG(64, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_8MA), /* DAT3 */
	PCOM_GPIO_CFG(65, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_8MA), /* DAT2 */
	PCOM_GPIO_CFG(66, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT1 */
	PCOM_GPIO_CFG(67, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT0 */
};

static uint32_t sdcard_off_gpio_table[] = {
	PCOM_GPIO_CFG(62, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* CLK */
	PCOM_GPIO_CFG(63, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* CMD */
	PCOM_GPIO_CFG(64, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT3 */
	PCOM_GPIO_CFG(65, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT2 */
	PCOM_GPIO_CFG(66, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT1 */
	PCOM_GPIO_CFG(67, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT0 */
};
开发者ID:coolbho3k,项目名称:HTC-Supersonic-2.6.29,代码行数:31,代码来源:board-supersonic-mmc.c


示例6: PCOM_GPIO_CFG

	.resume_early	= hero_pwrsink_resume_early,
	.suspend_early	= hero_pwrsink_suspend_early,
	.resume_late	= hero_pwrsink_resume_late,
};

static struct platform_device hero_pwr_sink = {
	.name = "htc_pwrsink",
	.id = -1,
	.dev	= {
		.platform_data = &hero_pwrsink_data,
	},
};
/* Switch between UART3 and GPIO */
static uint32_t uart3_on_gpio_table[] = {
	/* RX */
	PCOM_GPIO_CFG(HERO_GPIO_UART3_RX, 1, GPIO_INPUT, GPIO_NO_PULL, 0),
	/* TX */
	PCOM_GPIO_CFG(HERO_GPIO_UART3_TX, 1, GPIO_OUTPUT, GPIO_NO_PULL, 0),
};

/* default TX,RX to GPI */
static uint32_t uart3_off_gpio_table[] = {
	/* RX, H2W DATA */
	PCOM_GPIO_CFG(HERO_GPIO_H2W_DATA, 0, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA),
	/* TX, H2W CLK */
	PCOM_GPIO_CFG(HERO_GPIO_H2W_CLK, 0, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA),
};

static int hero_h2w_path = H2W_GPIO;

static void h2w_configure(int route)
开发者ID:Bdaman80,项目名称:hero-kernel-2.6.35,代码行数:31,代码来源:board-hero.c


示例7: I2C_BOARD_INFO

		I2C_BOARD_INFO(AKM8973_I2C_NAME, 0x1C),
		.platform_data = &compass_platform_data,
		.irq = MSM_GPIO_TO_INT(HTCLEO_GPIO_COMPASS_INT_N),
	},
	{
	        I2C_BOARD_INFO("s5k3e2fx", 0x20 >> 1),
	},
};

///////////////////////////////////////////////////////////////////////
// USB 
///////////////////////////////////////////////////////////////////////

static uint32_t usb_phy_3v3_table[] =
{
    PCOM_GPIO_CFG(HTCLEO_GPIO_USBPHY_3V3_ENABLE, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA)
};

static int htcleo_phy_init_seq[] ={0x0C, 0x31, 0x30, 0x32, 0x1D, 0x0D, 0x1D, 0x10, -1};

// modified to further reflect bravo kernel code
static struct msm_hsusb_platform_data msm_hsusb_pdata = {
	.phy_init_seq		= htcleo_phy_init_seq,
	.phy_reset		= msm_hsusb_8x50_phy_reset,
	.accessory_detect = 0, /* detect by ID pin gpio */
};

static struct usb_mass_storage_platform_data mass_storage_pdata = {
	.nluns		= 1,
	.vendor		= "HTC",
	.product	= "HD2",
开发者ID:endlessmadae,项目名称:desire_kernel_35,代码行数:31,代码来源:board-htcleo.c


示例8: PCOM_GPIO_CFG

#include <linux/gpio.h>
#include <asm/mach-types.h>

#include "gpio_chip.h"
#include "proc_comm.h"
#include "board-liberty.h"

static struct rfkill *bt_rfk;
static const char bt_name[] = "bcm4329";

/* bt initial configuration */
static uint32_t liberty_bt_init_table[] = {

	PCOM_GPIO_CFG(LIBERTY_GPIO_BT_UART1_RTS, /* BT_RTS */
				0,
				GPIO_OUTPUT,
				GPIO_NO_PULL,
				GPIO_8MA),
	PCOM_GPIO_CFG(LIBERTY_GPIO_BT_UART1_CTS, /* BT_CTS */
				0,
				GPIO_OUTPUT,
				GPIO_NO_PULL,
				GPIO_8MA),
	PCOM_GPIO_CFG(LIBERTY_GPIO_BT_UART1_RX, /* BT_RX */
				0,
				GPIO_INPUT,
				GPIO_PULL_UP,
				GPIO_8MA),
	PCOM_GPIO_CFG(LIBERTY_GPIO_BT_UART1_TX, /* BT_TX */
				0,
				GPIO_OUTPUT,
开发者ID:AKToronto,项目名称:htc-kernel-msm7227,代码行数:31,代码来源:board-liberty-rfkill.c


示例9: mddi_novatec_power

static void
mddi_novatec_power(struct msm_mddi_client_data *client_data, int on)
{
	int rc;
	unsigned config;

	if (panel_type == 0) {
		if (on) {
			if(axi_clk)
				clk_set_rate(axi_clk, 192000000);
			vreg_enable(V_LCM_2V85);
			vreg_enable(V_LCMIO_1V8);
			hr_msleep(20);
			gpio_set_value(LEXIKONCT_LCD_RSTz, 1);
			hr_msleep(25);
			gpio_set_value(LEXIKONCT_LCD_RSTz, 0);
			hr_msleep(10);
			gpio_set_value(LEXIKONCT_LCD_RSTz, 1);
			hr_msleep(20);
		} else {
			vreg_disable(V_LCMIO_1V8);
			vreg_disable(V_LCM_2V85);
			gpio_set_value(LEXIKONCT_LCD_RSTz, 0);
		}
	} else {
		if (on) {
			if(axi_clk)
				clk_set_rate(axi_clk, 192000000);
			vreg_enable(V_LCM_2V85);
			hr_msleep(3);
			vreg_disable(V_LCM_2V85);
			hr_msleep(50);
			vreg_enable(V_LCM_2V85);
			vreg_enable(V_LCMIO_1V8);
			hr_msleep(2);
			gpio_set_value(LEXIKONCT_LCD_RSTz, 1);
			hr_msleep(1);
			gpio_set_value(LEXIKONCT_LCD_RSTz, 0);
			hr_msleep(1);
			gpio_set_value(LEXIKONCT_LCD_RSTz, 1);
			hr_msleep(60);
			config = PCOM_GPIO_CFG(LEXIKONCT_MDDI_TE, 1, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA);
			rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0);
			config = PCOM_GPIO_CFG(LEXIKONCT_LCD_ID1, 1, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA);
			rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0);
			config = PCOM_GPIO_CFG(LEXIKONCT_LCD_ID0, 1, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA);
			rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0);
		} else {
			config = PCOM_GPIO_CFG(LEXIKONCT_MDDI_TE, 0, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_2MA);
			rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0);
			config = PCOM_GPIO_CFG(LEXIKONCT_LCD_ID1, 0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA);
			rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0);
			config = PCOM_GPIO_CFG(LEXIKONCT_LCD_ID0, 0, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA);
			rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0);
			gpio_set_value(LEXIKONCT_LCD_RSTz, 0);
			hr_msleep(10);
			vreg_disable(V_LCMIO_1V8);
			vreg_disable(V_LCM_2V85);
		}
	}
}
开发者ID:sndnvaps,项目名称:BDA-Lexikon,代码行数:61,代码来源:board-lexikonct-panel.c


示例10: PCOM_GPIO_CFG

	.dev		= {
		.platform_data = &msm_camera_device_data,
	},
};

static struct platform_device trout_camera = {
	.name		= "camera",
	.dev		= { 
		.platform_data = &msm_camera_device,
	},
};

/* Switch between UART3 and GPIO */
static uint32_t uart3_on_gpio_table[] = {
	/* RX */
	PCOM_GPIO_CFG(BAHAMAS_GPIO_UART3_RX, 1, GPIO_INPUT, GPIO_NO_PULL, 0),
	/* TX */
	PCOM_GPIO_CFG(BAHAMAS_GPIO_UART3_TX, 1, GPIO_OUTPUT, GPIO_NO_PULL, 0),
};

/* Set TX,RX to GPI */
static uint32_t uart3_off_gpi_table[] = {
	PCOM_GPIO_CFG(BAHAMAS_GPIO_H2W_DATA, 0,
		      GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA), /* RX, H2W DATA */
	PCOM_GPIO_CFG(BAHAMAS_GPIO_H2W_CLK, 0,
		      GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA), /* TX, H2W CLK */
};

static int bahamas_h2w_path = H2W_GPIO;

static void h2w_configure(int route)
开发者ID:kipill-nn,项目名称:Kernel-for-Mega,代码行数:31,代码来源:board-mega.c


示例11: PCOM_GPIO_CFG

static struct msm_otg_platform_data msm_otg_pdata = {
	.phy_init_seq		= htcleo_phy_init_seq,
	.mode			= USB_PERIPHERAL,
	.otg_control		= OTG_PHY_CONTROL,
};
#endif

#if 0
static struct msm_hsusb_gadget_platform_data msm_gadget_pdata = {
	.is_phy_status_timer_on = 1,
};
#endif

static uint32_t usb_phy_3v3_table[] =
{
    PCOM_GPIO_CFG(HTCLEO_GPIO_USBPHY_3V3_ENABLE, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA)
};
#if 0

// modified to further reflect bravo kernel code
static struct msm_hsusb_platform_data msm_hsusb_pdata = {
	.phy_init_seq		= htcleo_phy_init_seq,
	.phy_reset		= msm_hsusb_8x50_phy_reset,
	.accessory_detect = 0, /* detect by ID pin gpio */
};
#endif
static struct usb_mass_storage_platform_data mass_storage_pdata = {
	.nluns		= 1,
	.vendor		= "HTC",
	.product	= "HD2",
	.release	= 0x0100,
开发者ID:NooNameR,项目名称:android_kernel_leo_3.0.16,代码行数:31,代码来源:board-htcleo.c


示例12: chacha_init_panel

/*
 * In boot loader, mddi is powered on already.
 *
 * So, we just detect panel here, setting different
 * power function for each panel.
 *
 * Then we did not have to detect panel in each time
 * mddi_client_power or panel_power is called.
 *
 * jay: Nov 20, 08'
 */
int __init chacha_init_panel(void)
{
	int rc;
	int panel_id = -1;
	int gpio_lcd_id0, gpio_lcd_id1;
	uint32_t config;
	struct panel_data *panel_data = &renesas_AUO_client_data.panel_conf;
	struct msm_mddi_client_data *client = renesas.client_data;

	B(KERN_INFO "%s: enter.\n", __func__);

	vreg_lcm_2v6 = vreg_get(0, "gp4");
	if (IS_ERR(vreg_lcm_2v6))
		return PTR_ERR(vreg_lcm_2v6);

	vreg_lcm_2v85 = vreg_get(0, "rfrx2");
	if (IS_ERR(vreg_lcm_2v85))
		return PTR_ERR(vreg_lcm_2v85);

	gpio_lcd_id0 =  PCOM_GPIO_CFG(CHACHA_GPIO_LCD_ID0, 0, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA);
	gpio_lcd_id1 =  PCOM_GPIO_CFG(CHACHA_GPIO_LCD_ID1, 0, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA);
	msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &gpio_lcd_id0, 0);
	msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &gpio_lcd_id1, 0);

	panel_id = gpio_get_value(CHACHA_GPIO_LCD_ID0) |
	           (gpio_get_value(CHACHA_GPIO_LCD_ID1) << 1);

	B(KERN_INFO "%s: panel_id:%d.\n", __func__,panel_id);

	switch(panel_id) {
		case 0:
			panel_data = &renesas_liberty_client_data.panel_conf;
		break;

		case 1:
			panel_data = &renesas_AUO_client_data.panel_conf;
		break;
		default:
			chacha_mddi_renesas_power(client, 0);
			gpio_lcd_id0 =  PCOM_GPIO_CFG(CHACHA_GPIO_LCD_ID0, 0,
						GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA);
			gpio_lcd_id1 =  PCOM_GPIO_CFG(CHACHA_GPIO_LCD_ID1, 0,
						GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA);
			msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &gpio_lcd_id0, 0);
			msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &gpio_lcd_id1, 0);
		break;
	}

	panel_data->panel_id = panel_type;
	panel_data->caps = MSMFB_CAP_CABC;
	panel_data->pwm = pwm_renesas;
	panel_data->shrink = 1;
	panel_data->shrink_br = chacha_panel_shrink;
	panel_data->default_br = 83;

	config = PCOM_GPIO_CFG(CHACHA_GPIO_MDDI_TE, 1, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA);
	msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0);

	msm_device_mdp.dev.platform_data = &chacha_mdp_pdata;
	rc = platform_device_register(&msm_device_mdp);
	if (rc)
		return rc;

	msm_device_mddi0.dev.platform_data = &chacha_pdata;
	rc = platform_device_register(&msm_device_mddi0);
	if (rc)
		return rc;

	led_trigger_register_simple("lcd-backlight-gate", &chacha_lcd_backlight);
	if (IS_ERR(chacha_lcd_backlight))
		printk(KERN_ERR "[BKL] %s: backlight registration failed!\n",
			__func__);
	return 0;
}
开发者ID:Where-No-Man-Has-Gone-Before,项目名称:OWL-Predator-KERNEL_BAK,代码行数:85,代码来源:board-chacha-panel.c


示例13: config_gpio_table

/* ---- COMMON ---- */
static void config_gpio_table(uint32_t *table, int len)
{
	int n;
	unsigned id;
	for(n = 0; n < len; n++) {
		id = table[n];
		msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &id, 0);
	}
}

/* ---- SDCARD ---- */

static uint32_t sdcard_on_gpio_table[] = {
	PCOM_GPIO_CFG(62, 2, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_8MA), /* CLK */
	PCOM_GPIO_CFG(63, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* CMD */
	PCOM_GPIO_CFG(64, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* DAT3 */
	PCOM_GPIO_CFG(65, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* DAT2 */
	PCOM_GPIO_CFG(66, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT1 */
	PCOM_GPIO_CFG(67, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT0 */
};

static uint32_t sdcard_off_gpio_table[] = {
	PCOM_GPIO_CFG(62, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* CLK */
	PCOM_GPIO_CFG(63, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* CMD */
	PCOM_GPIO_CFG(64, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT3 */
	PCOM_GPIO_CFG(65, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT2 */
	PCOM_GPIO_CFG(66, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT1 */
	PCOM_GPIO_CFG(67, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT0 */
};
开发者ID:cake654326,项目名称:xpenology,代码行数:30,代码来源:board-trout-mmc.c


示例14: PCOM_GPIO_CFG

#include <asm/mach-types.h>

#include "gpio_chip.h"
#include "proc_comm.h"
#include "board-spade.h"

static struct rfkill *bt_rfk;
static const char bt_name[] = "bcm4329";

/* bt initial configuration */
static uint32_t spade_bt_init_table[] = {

	/* BT_RTS */
	PCOM_GPIO_CFG(SPADE_GPIO_BT_UART1_RTS,
				1,
				GPIO_OUTPUT,
				GPIO_NO_PULL,
				GPIO_8MA),
	/* BT_CTS */
	PCOM_GPIO_CFG(SPADE_GPIO_BT_UART1_CTS,
				1,
				GPIO_INPUT,
				GPIO_PULL_UP,
				GPIO_8MA),
	/* BT_RX */
	PCOM_GPIO_CFG(SPADE_GPIO_BT_UART1_RX,
				1,
				GPIO_INPUT,
				GPIO_PULL_UP,
				GPIO_8MA),
	/* BT_TX */
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:31,代码来源:board-spade-rfkill.c


示例15: module_param_string

static char bt_chip_id[10] = "bcm4329";
module_param_string(bt_chip_id, bt_chip_id, sizeof(bt_chip_id), S_IWUSR | S_IRUGO);
MODULE_PARM_DESC(bt_chip_id, "BT's chip id");

static char bt_fw_version[10] = "v2.0.38";
module_param_string(bt_fw_version, bt_fw_version, sizeof(bt_fw_version), S_IWUSR | S_IRUGO);
MODULE_PARM_DESC(bt_fw_version, "BT's fw version");

static void buzzc_reset(void)
{
	gpio_set_value(BUZZC_GPIO_PS_HOLD, 0);
}

static uint32_t proximity_on_gpio_table[] = {
	PCOM_GPIO_CFG(BUZZC_GPIO_PROXIMITY_INT,
		0, GPIO_INPUT, GPIO_NO_PULL, 0), /* PS_VOUT */
};

static uint32_t proximity_off_gpio_table[] = {
	PCOM_GPIO_CFG(BUZZC_GPIO_PROXIMITY_INT,
		0, GPIO_INPUT, GPIO_PULL_DOWN, 0) /* PS_VOUT */
};

static uint32_t camera_off_gpio_table[] = {
	/* CAMERA */
	PCOM_GPIO_CFG(2, 0, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT2 */
	PCOM_GPIO_CFG(3, 0, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT3 */
	PCOM_GPIO_CFG(4, 0, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT4 */
	PCOM_GPIO_CFG(5, 0, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT5 */
	PCOM_GPIO_CFG(6, 0, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT6 */
	PCOM_GPIO_CFG(7, 0, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT7 */
开发者ID:HCDRJacob,项目名称:htc-kernel-wildfire-old,代码行数:31,代码来源:board-buzzc.c


示例16: pmic_spkr_en_mute

        } 
        else 
        {
            pmic_spkr_en_mute(RIGHT_SPKR, 0);

            pmic_spkr_en(RIGHT_SPKR, 0);

            pmic_set_spkr_configuration(&scm);
   
     }
 //   }
}
           
static uint32_t bt_sco_enable[] = 
{
    PCOM_GPIO_CFG(HTCLEO_BT_PCM_OUT, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA),
    PCOM_GPIO_CFG(HTCLEO_BT_PCM_IN, 1, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA),
    PCOM_GPIO_CFG(HTCLEO_BT_PCM_SYNC, 2, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA),
    PCOM_GPIO_CFG(HTCLEO_BT_PCM_CLK, 2, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA)
};

static uint32_t bt_sco_disable[] = 
{
    PCOM_GPIO_CFG(HTCLEO_BT_PCM_OUT, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA),
    PCOM_GPIO_CFG(HTCLEO_BT_PCM_IN, 0, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA),
    PCOM_GPIO_CFG(HTCLEO_BT_PCM_SYNC, 0, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA),
    PCOM_GPIO_CFG(HTCLEO_BT_PCM_CLK, 0, GPIO_INPUT, GPIO_NO_PULL, GPIO_2MA)
};

void htcleo_bt_sco_enable(int en)
{
开发者ID:DrGrip,项目名称:tiamat-2.6.38-LEO-Dr_Grip,代码行数:31,代码来源:board-htcleo-audio.c


示例17: PM8058_GPIO_PM_TO_SYS

    {
        .gpio = PM8058_GPIO_PM_TO_SYS(GLACIER_SEND_KEY),
        .code = KEY_F13,/*Genius/voice command key*/
    },
    {
        .gpio = PM8058_GPIO_PM_TO_SYS(GLACIER_CAM_STEP2),
        .code = KEY_CAMERA,
    },
    {
        .gpio = PM8058_GPIO_PM_TO_SYS(GLACIER_CAM_STEP1),
        .code = KEY_HP,
    },
};

uint32_t inputs_gpio_table[] = {
    PCOM_GPIO_CFG(GLACIER_GPIO_KEYPAD_POWER_KEY, 0, GPIO_INPUT,
    GPIO_PULL_UP, GPIO_4MA),
};

static void glacier_setup_input_gpio(void)
{
    gpio_tlmm_config(inputs_gpio_table[0], GPIO_CFG_ENABLE);
}


static struct gpio_event_input_info glacier_keypad_input_info = {
    .info.func = gpio_event_input_func,
#ifdef CONFIG_OPTICALJOYSTICK_CRUCIAL
    .info.oj_btn = true,
#endif
    .flags = GPIOEDF_PRINT_KEYS,
    .type = EV_KEY,
开发者ID:nsingh94,项目名称:7x30-ion,代码行数:32,代码来源:board-glacier-keypad.c


示例18: msm_add_sdcc

#include <mach/htc_pwrsink.h>

#include <asm/mach/mmc.h>

#include "devices.h"
#include "board-vision.h"
#include "proc_comm.h"


extern int msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat,
			unsigned int stat_irq, unsigned long stat_irq_flags);

/* ---- SDCARD ---- */

static uint32_t sdcard_on_gpio_table[] = {
	PCOM_GPIO_CFG(58, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_16MA), /* CLK */
	PCOM_GPIO_CFG(59, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* CMD */
	PCOM_GPIO_CFG(60, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* DAT3 */
	PCOM_GPIO_CFG(61, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* DAT2 */
	PCOM_GPIO_CFG(62, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* DAT1 */
	PCOM_GPIO_CFG(63, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* DAT0 */
};

static uint32_t sdcard_off_gpio_table[] = {
	PCOM_GPIO_CFG(58, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* CLK */
	PCOM_GPIO_CFG(59, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* CMD */
	PCOM_GPIO_CFG(60, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT3 */
	PCOM_GPIO_CFG(61, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT2 */
	PCOM_GPIO_CFG(62, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT1 */
	PCOM_GPIO_CFG(63, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT0 */
};
开发者ID:Akinus,项目名称:htc-kernel-msm7x30,代码行数:31,代码来源:board-vision-mmc.c


示例19: PCOM_GPIO_CFG

		.gain[VOC_NB_INDEX] =
			{-500, -200, 100, 400, 700, 1000, 0, 0, 0, 0},
		.gain[VOC_WB_INDEX] =
			{-500, -200, 100, 400, 700, 1000, 0, 0, 0, 0},
	},
	[Q5V2_HW_HAC] = {
		.max_step = 6,
		.gain[VOC_NB_INDEX] =
			{-500, -200, 100, 400, 700, 1000, 0, 0, 0, 0},
		.gain[VOC_WB_INDEX] =
			{-500, -200, 100, 400, 700, 1000, 0, 0, 0, 0},
	},
};

static unsigned aux_pcm_gpio_off[] = {
	PCOM_GPIO_CFG(SPEEDY_GPIO_BT_PCM_OUT, 0, GPIO_OUTPUT,
			GPIO_NO_PULL, GPIO_2MA),
	PCOM_GPIO_CFG(SPEEDY_GPIO_BT_PCM_IN, 0, GPIO_INPUT,
			GPIO_PULL_UP, GPIO_2MA),
	PCOM_GPIO_CFG(SPEEDY_GPIO_BT_PCM_SYNC, 0, GPIO_OUTPUT,
			GPIO_NO_PULL, GPIO_2MA),
	PCOM_GPIO_CFG(SPEEDY_GPIO_BT_PCM_CLK, 0, GPIO_OUTPUT,
			GPIO_NO_PULL, GPIO_2MA),
};

static unsigned aux_pcm_gpio_on[] = {
	PCOM_GPIO_CFG(SPEEDY_GPIO_BT_PCM_OUT, 1, GPIO_OUTPUT,
			GPIO_NO_PULL, GPIO_2MA),
	PCOM_GPIO_CFG(SPEEDY_GPIO_BT_PCM_IN, 1, GPIO_INPUT,
			GPIO_NO_PULL, GPIO_2MA),
	PCOM_GPIO_CFG(SPEEDY_GPIO_BT_PCM_SYNC, 1, GPIO_OUTPUT,
			GPIO_NO_PULL, GPIO_2MA),
开发者ID:Scaryghoul,项目名称:7x30-Sense-kernel,代码行数:32,代码来源:board-speedy-audio.c


示例20: pmic_spkr_en

			pmic_spkr_en(RIGHT_SPKR, 1);

			/* unmute */
			pmic_spkr_en_mute(RIGHT_SPKR, 1);
		} else {
			pmic_spkr_en_mute(RIGHT_SPKR, 0);

			pmic_spkr_en(RIGHT_SPKR, 0);

			pmic_set_spkr_configuration(&scm);
		}
	}
}

static uint32_t bt_sco_enable[] = {
	PCOM_GPIO_CFG(INCREDIBLEC_BT_PCM_OUT, 1, GPIO_INPUT,
			GPIO_PULL_DOWN, GPIO_2MA),
	PCOM_GPIO_CFG(INCREDIBLEC_BT_PCM_IN, 1, GPIO_INPUT,
			GPIO_PULL_DOWN, GPIO_2MA),
	PCOM_GPIO_CFG(INCREDIBLEC_BT_PCM_SYNC, 2, GPIO_INPUT,
			GPIO_PULL_DOWN, GPIO_2MA),
	PCOM_GPIO_CFG(INCREDIBLEC_BT_PCM_CLK, 2, GPIO_INPUT,
			GPIO_PULL_DOWN, GPIO_2MA),
};

static uint32_t bt_sco_disable[] = {
	PCOM_GPIO_CFG(INCREDIBLEC_BT_PCM_OUT, 0, GPIO_OUTPUT,
			GPIO_NO_PULL, GPIO_2MA),
	PCOM_GPIO_CFG(INCREDIBLEC_BT_PCM_IN, 0, GPIO_INPUT,
			GPIO_PULL_UP, GPIO_2MA),
	PCOM_GPIO_CFG(INCREDIBLEC_BT_PCM_SYNC, 0, GPIO_OUTPUT,
			GPIO_NO_PULL, GPIO_2MA),
开发者ID:tiny4579,项目名称:tiny-gingersense,代码行数:32,代码来源:board-incrediblec-audio.c



注:本文中的PCOM_GPIO_CFG函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PCPU_GET函数代码示例发布时间:2022-05-30
下一篇:
C++ PCMCIA_DEVICE_PROD_ID12函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap