本文整理匯總了C++中EXYNOS4_GPX2函數的典型用法代碼示例。如果您正苦於以下問題:C++ EXYNOS4_GPX2函數的具體用法?C++ EXYNOS4_GPX2怎麽用?C++ EXYNOS4_GPX2使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了EXYNOS4_GPX2函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: s5p_mipi_dsi_lcd_power_on_off
static void s5p_mipi_dsi_lcd_power_on_off(unsigned int power)
{
struct regulator *regulator_vlcd_1v8;
struct regulator *regulator_vlcd_3v0;
regulator_vlcd_1v8 = regulator_get(NULL, "vlcd_1v8");
if (IS_ERR(regulator_vlcd_1v8)) {
pr_info("%s: failed to get %s\n", __func__, "vlcd_1v8");
return;
}
regulator_vlcd_3v0 = regulator_get(NULL, "vlcd_3v0");
if (IS_ERR(regulator_vlcd_3v0)) {
pr_info("%s: failed to get %s\n", __func__, "vlcd_3v0");
return;
}
if (power){
regulator_enable(regulator_vlcd_1v8);
msleep(10);
regulator_enable(regulator_vlcd_3v0);
}else {
regulator_disable(regulator_vlcd_3v0);
regulator_disable(regulator_vlcd_1v8);
/*LCD RESET low*/
gpio_request_one(EXYNOS4_GPX2(4),GPIOF_OUT_INIT_LOW, "GPX2");
gpio_free(EXYNOS4_GPX2(4));
}
regulator_put(regulator_vlcd_3v0);
regulator_put(regulator_vlcd_1v8);
msleep(1);
}
示例2: lcd_power_on
static int lcd_power_on(struct lcd_device *ld, int enable)
{
struct regulator *regulator_vlcd_1v8;
struct regulator *regulator_vlcd_3v0;
regulator_vlcd_1v8 = regulator_get(NULL, "vlcd_1v8");
if (IS_ERR(regulator_vlcd_1v8)) {
pr_info("%s: failed to get %s\n", __func__, "vlcd_1v8");
return PTR_ERR(regulator_vlcd_1v8);
}
regulator_vlcd_3v0 = regulator_get(NULL, "vlcd_3v0");
if (IS_ERR(regulator_vlcd_3v0)) {
pr_info("%s: failed to get %s\n", __func__, "vlcd_3v0");
return PTR_ERR(regulator_vlcd_3v0);
}
if (enable){
regulator_enable(regulator_vlcd_1v8);
msleep(10);
regulator_enable(regulator_vlcd_3v0);
}else {
/*LCD RESET low at SLEEP*/
gpio_request_one(EXYNOS4_GPX2(4),GPIOF_OUT_INIT_LOW, "GPX2");
gpio_free(EXYNOS4_GPX2(4));
regulator_disable(regulator_vlcd_3v0);
regulator_disable(regulator_vlcd_1v8);
}
regulator_put(regulator_vlcd_3v0);
regulator_put(regulator_vlcd_1v8);
return 0;
}
示例3: origen_bt_setup
static void __init origen_bt_setup(void)
{
gpio_request(EXYNOS4_GPA0(0), "GPIO BT_UART");
/* 4 UART Pins configuration */
s3c_gpio_cfgrange_nopull(EXYNOS4_GPA0(0), 4, S3C_GPIO_SFN(2));
/* Setup BT Reset, this gpio will be requesed by rfkill-gpio */
s3c_gpio_cfgpin(EXYNOS4_GPX2(2), S3C_GPIO_OUTPUT);
s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE);
}
示例4: s5p_mipi_dsi_lcd_reset
static void s5p_mipi_dsi_lcd_reset(void)
{
gpio_request_one(EXYNOS4_GPX2(4), GPIOF_OUT_INIT_HIGH, "GPX2");
usleep_range(5000, 5000);
gpio_set_value(EXYNOS4_GPX2(4), 0);
usleep_range(5000, 5000);
gpio_set_value(EXYNOS4_GPX2(4), 1);
msleep(100);
gpio_free(EXYNOS4_GPX2(4));
}
示例5: reset_lcd
static int reset_lcd(struct lcd_device *ld)
{
gpio_request_one(EXYNOS4_GPX2(4), GPIOF_OUT_INIT_HIGH, "GPX2");
usleep_range(200,200);
gpio_set_value(EXYNOS4_GPX2(4), 0);
usleep_range(200,200);
gpio_set_value(EXYNOS4_GPX2(4), 1);
gpio_free(EXYNOS4_GPX2(4));
return 0;
}
示例6: bcm4329_wifi_init
static int __init bcm4329_wifi_init(void)
{
int ret;
printk("%s: start\n", __func__);
bcm4329_init_wifi_mem();
bcm4329_wifi_device.resource->start = gpio_to_irq(EXYNOS4_GPX2(7));
bcm4329_wifi_device.resource->end = gpio_to_irq(EXYNOS4_GPX2(7));
ret = platform_device_register(&bcm4329_wifi_device);
return ret;
}
示例7: armlex4210_wlan_init
static void __init armlex4210_wlan_init(void)
{
/* enable */
s3c_gpio_cfgpin(EXYNOS4_GPX2(0), S3C_GPIO_SFN(0xf));
s3c_gpio_setpull(EXYNOS4_GPX2(0), S3C_GPIO_PULL_UP);
/* reset */
s3c_gpio_cfgpin(EXYNOS4_GPX1(6), S3C_GPIO_SFN(0xf));
s3c_gpio_setpull(EXYNOS4_GPX1(6), S3C_GPIO_PULL_UP);
/* wakeup */
s3c_gpio_cfgpin(EXYNOS4_GPX1(5), S3C_GPIO_SFN(0xf));
s3c_gpio_setpull(EXYNOS4_GPX1(5), S3C_GPIO_PULL_UP);
}
示例8: nuri_power_init
static void __init nuri_power_init(void)
{
int gpio;
int irq_base = IRQ_GPIO_END + 1;
int ta_en = 0;
nuri_max8997_pdata.irq_base = irq_base;
irq_base += MAX8997_IRQ_NR;
gpio = EXYNOS4_GPX0(7);
gpio_request(gpio, "AP_PMIC_IRQ");
s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
gpio = EXYNOS4_GPX2(3);
gpio_request(gpio, "FUEL_ALERT");
s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
gpio = nuri_max8903.dok;
gpio_request(gpio, "TA_nCONNECTED");
s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
ta_en = gpio_get_value(gpio) ? 0 : 1;
gpio = nuri_max8903.chg;
gpio_request(gpio, "TA_nCHG");
gpio_direction_input(gpio);
gpio = nuri_max8903.dcm;
gpio_request(gpio, "CURR_ADJ");
gpio_direction_output(gpio, ta_en);
}
示例9: nuri_machine_init
static void __init nuri_machine_init(void)
{
nuri_sdhci_init();
nuri_tsp_init();
nuri_power_init();
s3c_i2c0_set_platdata(&nuri_i2c0_platdata);
i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
s3c_i2c3_set_platdata(&i2c3_data);
i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
s3c_i2c5_set_platdata(NULL);
i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
s3c_i2c6_set_platdata(&nuri_i2c6_platdata);
s5p_fimd0_set_platdata(&nuri_fb_pdata);
nuri_camera_init();
nuri_ehci_init();
/* Last */
platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
}
示例10: nuri_machine_init
static void __init nuri_machine_init(void)
{
nuri_sdhci_init();
nuri_tsp_init();
nuri_power_init();
s3c_i2c0_set_platdata(&nuri_i2c0_platdata);
i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
s3c_i2c3_set_platdata(&i2c3_data);
i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
s3c_i2c5_set_platdata(NULL);
i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
s5p_fimd0_set_platdata(&nuri_fb_pdata);
nuri_camera_init();
nuri_ehci_init();
clk_xusbxti.rate = 24000000;
/* Last */
platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev;
s5p_device_fimc0.dev.parent = &exynos4_device_pd[PD_CAM].dev;
s5p_device_fimc1.dev.parent = &exynos4_device_pd[PD_CAM].dev;
s5p_device_fimc2.dev.parent = &exynos4_device_pd[PD_CAM].dev;
s5p_device_fimc3.dev.parent = &exynos4_device_pd[PD_CAM].dev;
s5p_device_mipi_csis0.dev.parent = &exynos4_device_pd[PD_CAM].dev;
}
示例11: nuri_machine_init
static void __init nuri_machine_init(void)
{
nuri_sdhci_init();
nuri_tsp_init();
nuri_power_init();
s3c_i2c0_set_platdata(&nuri_i2c0_platdata);
i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
s3c_i2c3_set_platdata(&i2c3_data);
i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
s3c_i2c5_set_platdata(NULL);
i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
s3c_i2c6_set_platdata(&nuri_i2c6_platdata);
#ifdef CONFIG_DRM_EXYNOS
s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
exynos4_fimd0_gpio_setup_24bpp();
#else
s5p_fimd0_set_platdata(&nuri_fb_pdata);
#endif
nuri_camera_init();
nuri_ehci_init();
s3c_hsotg_set_platdata(&nuri_hsotg_pdata);
/* Last */
platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
}
示例12: mx_power_off
static void mx_power_off(void)
{
struct task_struct *task = get_current();
char task_com[TASK_COMM_LEN];
int regs;
int gpio;
pr_emerg("func:%s, process is:%d:%s\n", __func__, task->pid, get_task_comm(task_com, task));
if (task->parent) {
task = task->parent;
pr_emerg("func:%s, parent:%d:%s\n", __func__, task->pid, get_task_comm(task_com, task));
if (task->parent) {
task = task->parent;
pr_emerg("func:%s, pparent:%d:%s\n", __func__, task->pid, get_task_comm(task_com, task));
}
}
if (machine_is_m030())
gpio = EXYNOS4_GPX2(5);
else
gpio = EXYNOS4_GPX0(3);
mx_disable_inand();
if (gpio_get_value(gpio)) { /* 1. Check reboot charging */
mx_reboot_internal("charge");
} else { /* 2. Power off */
regs = __raw_readl(S5P_PS_HOLD_CONTROL);
/* dead loop to avoid sometimes auto restart*/
while(1) {
pr_emerg("%s: waiting for power off\n", __func__);
__raw_writel(regs & 0xFFFFFEFF, S5P_PS_HOLD_CONTROL);
}
}
}
示例13: lcd_power_on
static int lcd_power_on(struct lcd_device *ld, int enable)
{
struct regulator *regulator_vlcd_1v8;
struct regulator *regulator_vlcd_3v0 = NULL;
regulator_vlcd_1v8 = regulator_get(NULL, "vlcd_1v8");
if (IS_ERR(regulator_vlcd_1v8)) {
pr_info("%s: failed to get %s\n", __func__, "vlcd_1v8");
return PTR_ERR(regulator_vlcd_1v8);
}
if (system_rev < 5) {
regulator_vlcd_3v0 = regulator_get(NULL, "vlcd_3v3");
if (IS_ERR(regulator_vlcd_3v0)) {
pr_info("%s: failed to get %s\n", __func__, "vlcd_3v3");
return PTR_ERR(regulator_vlcd_3v0);
}
}
gpio_request_one(EXYNOS4_GPX1(1),GPIOF_OUT_INIT_HIGH, "GPX1");
if (enable){
if (system_rev < 5) {
regulator_enable(regulator_vlcd_3v0);
regulator_enable(regulator_vlcd_1v8);
} else {
gpio_set_value(EXYNOS4_GPX1(1), 1);
regulator_enable(regulator_vlcd_1v8);
}
}else {
if (system_rev < 5)
regulator_disable(regulator_vlcd_3v0);
else
gpio_set_value(EXYNOS4_GPX1(1), 0);
regulator_disable(regulator_vlcd_1v8);
/*LCD RESET low at SLEEP*/
gpio_request_one(EXYNOS4_GPX2(4),GPIOF_OUT_INIT_LOW, "GPX2");
gpio_free(EXYNOS4_GPX2(4));
}
if (system_rev < 5) {
regulator_put(regulator_vlcd_3v0);
}
regulator_put(regulator_vlcd_1v8);
gpio_free(EXYNOS4_GPX1(1));
return 0;
}
示例14: ltr558_gpio_irq
static int ltr558_gpio_irq(void)
{
int ret = 0;
//config irq
s3c_gpio_cfgpin(EXYNOS4_GPX2(4), S3C_GPIO_SFN(0xF));
s3c_gpio_setpull(EXYNOS4_GPX2(4), S3C_GPIO_PULL_UP);
ret = request_irq(ltr558_data->ltr558_irq, ltr558_irq_handler,
IRQF_TRIGGER_FALLING, LTR558_DEVICE_NAME, NULL);
if (ret) {
LTRERR(KERN_ALERT "%s: LTR-558ALS request irq failed.\n", __func__);
return ret;
}
P_L_printk("LTR558 Request irq successfully!\n");
return ret;
}
示例15: smdk4x12_ts_gpio_setup
static void smdk4x12_ts_gpio_setup(void)
{
int gpio_reset = EXYNOS4_GPM3(4);
gpio_request_one(gpio_reset, GPIOF_OUT_INIT_LOW, "TOUCH RESET");
mdelay(20);
gpio_direction_output(gpio_reset, 1);
mdelay(30);
s3c_gpio_setpull(EXYNOS4_GPX2(6), S3C_GPIO_PULL_NONE);
}