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

C++ PM8921_GPIO_IRQ函数代码示例

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

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



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

示例1: apq8064_init_mmc

void __init apq8064_init_mmc(void)
{
	if (apq8064_sdc1_pdata) {
		/* 8064 v2 supports upto 200MHz clock on SDC1 slot */
		if (SOCINFO_VERSION_MAJOR(socinfo_get_version()) >= 2) {
			apq8064_sdc1_pdata->sup_clk_table =
					sdc1_sup_clk_rates_all;
			apq8064_sdc1_pdata->sup_clk_cnt	=
					ARRAY_SIZE(sdc1_sup_clk_rates_all);
		}
		apq8064_add_sdcc(1, apq8064_sdc1_pdata);
		apq8064_add_uio();
	}

	if (apq8064_sdc2_pdata)
		apq8064_add_sdcc(2, apq8064_sdc2_pdata);

	if (apq8064_sdc3_pdata) {
		if (!machine_is_apq8064_cdp()) {
			apq8064_sdc3_pdata->wpswitch_gpio = 0;
			apq8064_sdc3_pdata->is_wpswitch_active_low = false;
		}
		if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
			machine_is_mpq8064_dtv()) {
			int rc;
			struct pm_gpio sd_card_det_init_cfg = {
				.direction      = PM_GPIO_DIR_IN,
				.output_buffer  = PM_GPIO_OUT_BUF_CMOS,
				.pull           = PM_GPIO_PULL_UP_30,
				.vin_sel        = PM_GPIO_VIN_S4,
				.out_strength   = PM_GPIO_STRENGTH_NO,
				.function       = PM_GPIO_FUNC_NORMAL,
			};

			apq8064_sdc3_pdata->status_gpio =
				PM8921_GPIO_PM_TO_SYS(31);
			apq8064_sdc3_pdata->status_irq =
				PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 31);
			rc = pm8xxx_gpio_config(apq8064_sdc3_pdata->status_gpio,
					&sd_card_det_init_cfg);
			if (rc) {
				pr_info("%s: SD_CARD_DET GPIO%d config "
					"failed(%d)\n", __func__,
					apq8064_sdc3_pdata->status_gpio, rc);
				apq8064_sdc3_pdata->status_gpio = 0;
				apq8064_sdc3_pdata->status_irq = 0;
			}
		}
		if (machine_is_apq8064_cdp()) {
			int i;

			for (i = 0;
			     i < apq8064_sdc3_pdata->pin_data->pad_data->\
				 drv->size;
			     i++)
				apq8064_sdc3_pdata->pin_data->pad_data->\
					drv->on[i].val = GPIO_CFG_10MA;
		}
		apq8064_add_sdcc(3, apq8064_sdc3_pdata);
	}
开发者ID:DSMKexec,项目名称:kexec-kernel-a850s,代码行数:60,代码来源:board-8064-storage.c


示例2: sec_fg_gpio_init

static bool sec_fg_gpio_init(void)
{
	struct pm_gpio param = {
		.direction     = PM_GPIO_DIR_IN,
		.pull          = PM_GPIO_PULL_NO,
		.vin_sel       = PM_GPIO_VIN_S4,
		.function      = PM_GPIO_FUNC_NORMAL,
	};

	/* FUEL_ALERT Setting */
	if (system_rev == 0x0) {
		sec_battery_pdata.fg_irq = PM8921_GPIO_IRQ(PM8921_IRQ_BASE,
				GPIO_FUEL_INT_04A);
		pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS(GPIO_FUEL_INT_04A),
						&param);
#if defined(CONFIG_MACH_JF_ATT) || defined(CONFIG_MACH_JF_TMO)
	} else if (system_rev >= 8) {
#else
	} else if (system_rev >= 9) {
#endif
		/* FUEL_ALERT Registration */
		struct pm8xxx_mpp_config_data fuel_alert_mppcfg = {
			.type = PM8XXX_MPP_TYPE_D_INPUT,
			.level = PM8921_MPP_DIG_LEVEL_S4,
			.control = PM8XXX_MPP_DOUT_CTRL_LOW,
		};

		sec_battery_pdata.fg_irq = PM8921_MPP_IRQ(PM8921_IRQ_BASE, 6);
		pm8xxx_mpp_config(PM8921_MPP_PM_TO_SYS(6),
				&fuel_alert_mppcfg);
	}
	else
开发者ID:ttimz1313,项目名称:kernel_samsung_jf,代码行数:32,代码来源:board-fusion3-battery.c


示例3: dlxp_ul_init_mmc

void __init dlxp_ul_init_mmc(void)
{
	wifi_status_cb = NULL;

	printk(KERN_INFO "dlxp_ul: %s\n", __func__);

	
	wl_reg_on_gpio.config.output_value = 0;
	pm8xxx_gpio_config(wl_reg_on_gpio.gpio, &wl_reg_on_gpio.config);

#if 0
	wl_dev_wake_gpio.config.output_value = 0;
	pm8xxx_gpio_config(wl_dev_wake_gpio.gpio, &wl_dev_wake_gpio.config);
#endif
#if 0
	
    dlxp_ul_wifi_data.swfi_latency = msm_rpm_get_swfi_latency();
#endif
	if (system_rev >= XC) {
		sdc4_sdslot_data.status_gpio	= PM8921_GPIO_PM_TO_SYS(uSD_CD_XC);
		sdc4_sdslot_data.status_irq	= PM8921_GPIO_IRQ(PM8921_IRQ_BASE, uSD_CD_XC);
	}

	apq8064_add_sdcc(1, dlxp_ul_sdc1_pdata);
	apq8064_add_sdcc(3, &dlxp_ul_wifi_data);
	apq8064_add_sdcc(4, &sdc4_sdslot_data);
	
}
开发者ID:Jackeagle,项目名称:htc_butterfly_asia_india_4.4.2_kernel,代码行数:28,代码来源:board-dlxp_ul-storage.c


示例4: mipi_samsung_disp_off

static int mipi_samsung_disp_off(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd = NULL;

	mfd = platform_get_drvdata(pdev);
	if (unlikely(!mfd))
		return -ENODEV;
	if (unlikely(mfd->key != MFD_KEY))
		return -EINVAL;

#if defined(CONFIG_ESD_ERR_FG_RECOVERY)
	if (!err_fg_working) {
		disable_irq_nosync(PM8921_GPIO_IRQ(PM8921_IRQ_BASE, PMIC_GPIO_ERR_FG));
		cancel_work_sync(&err_fg_work);
	}
#endif
	mfd->resume_state = MIPI_SUSPEND_STATE;
	mipi_samsung_disp_send_cmd(mfd, PANEL_OFF, false);

#if defined(RUMTIME_MIPI_CLK_CHANGE)
	if (mfd->panel_info.mipi.frame_rate != current_fps)
		mipi_runtime_clk_change(mfd->panel_info.mipi.frame_rate);
#endif

#if defined(AUTO_BRIGHTNESS_CABC_FUNCTION)
	is_disp_on = 0;
#endif

	return 0;
}
开发者ID:robcore,项目名称:Alucard-Kernel-jfltexx,代码行数:30,代码来源:mipi_samsung_tft.c


示例5: apq8064_init_mmc

void __init apq8064_init_mmc(void)
{
	if ((machine_is_apq8064_rumi3()) || machine_is_apq8064_sim()) {
		if (apq8064_sdc1_pdata) {
			if (machine_is_apq8064_sim())
				apq8064_sdc1_pdata->disable_bam = true;
			apq8064_sdc1_pdata->disable_runtime_pm = true;
			apq8064_sdc1_pdata->disable_cmd23 = true;
		}
		if (apq8064_sdc3_pdata) {
			if (machine_is_apq8064_sim())
				apq8064_sdc3_pdata->disable_bam = true;
			apq8064_sdc3_pdata->disable_runtime_pm = true;
			apq8064_sdc3_pdata->disable_cmd23 = true;
		}
	}

	if (apq8064_sdc1_pdata)
		apq8064_add_sdcc(1, apq8064_sdc1_pdata);

	if (apq8064_sdc3_pdata) {
		if (!machine_is_apq8064_cdp()) {
			apq8064_sdc3_pdata->wpswitch_gpio = 0;
			apq8064_sdc3_pdata->wpswitch_polarity = 0;
		}
		if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
			machine_is_mpq8064_dtv()) {
			apq8064_sdc3_pdata->status_gpio =
				PM8921_GPIO_PM_TO_SYS(31);
			apq8064_sdc3_pdata->status_irq =
				PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 31);
		}
		apq8064_add_sdcc(3, apq8064_sdc3_pdata);
	}
}
开发者ID:ELWIN-MAO,项目名称:huawei-g330d-u8825d-kernel,代码行数:35,代码来源:board-8064-storage.c


示例6: err_fg_irq_handler

static irqreturn_t err_fg_irq_handler(int irq, void *handle)
{
	pr_info("%s  esd start", __func__);
	disable_irq_nosync(PM8921_GPIO_IRQ(PM8921_IRQ_BASE, PMIC_GPIO_ERR_FG));
	schedule_work(&err_fg_work);

	return IRQ_HANDLED;
}
开发者ID:robcore,项目名称:Alucard-Kernel-jfltexx,代码行数:8,代码来源:mipi_samsung_tft.c


示例7: apq8064_init_mmc

void __init apq8064_init_mmc(void)
{
	if (apq8064_sdc1_pdata)
		apq8064_add_sdcc(1, apq8064_sdc1_pdata);

	if (apq8064_sdc2_pdata)
		apq8064_add_sdcc(2, apq8064_sdc2_pdata);

	if (apq8064_sdc3_pdata) {
		if (!machine_is_apq8064_cdp()) {
			apq8064_sdc3_pdata->wpswitch_gpio = 0;
			apq8064_sdc3_pdata->is_wpswitch_active_low = false;
		}
		if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
			machine_is_mpq8064_dtv()) {
			int rc;
			struct pm_gpio sd_card_det_init_cfg = {
				.direction      = PM_GPIO_DIR_IN,
				.output_buffer  = PM_GPIO_OUT_BUF_CMOS,
				.pull           = PM_GPIO_PULL_UP_30,
				.vin_sel        = PM_GPIO_VIN_S4,
				.out_strength   = PM_GPIO_STRENGTH_NO,
				.function       = PM_GPIO_FUNC_NORMAL,
			};

			apq8064_sdc3_pdata->status_gpio =
				PM8921_GPIO_PM_TO_SYS(31);
			apq8064_sdc3_pdata->status_irq =
				PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 31);
			rc = pm8xxx_gpio_config(apq8064_sdc3_pdata->status_gpio,
					&sd_card_det_init_cfg);
			if (rc) {
				pr_info("%s: SD_CARD_DET GPIO%d config "
					"failed(%d)\n", __func__,
					apq8064_sdc3_pdata->status_gpio, rc);
				apq8064_sdc3_pdata->status_gpio = 0;
				apq8064_sdc3_pdata->status_irq = 0;
			}
		}
		if (machine_is_apq8064_cdp()) {
			int i;

			for (i = 0;
			     i < apq8064_sdc3_pdata->pin_data->pad_data->\
				 drv->size;
			     i++)
				apq8064_sdc3_pdata->pin_data->pad_data->\
					drv->on[i].val = GPIO_CFG_10MA;
		}
		apq8064_add_sdcc(3, apq8064_sdc3_pdata);
	}
开发者ID:Aetos7,项目名称:Matr1x,代码行数:51,代码来源:board-8064-storage.c


示例8: mipi_samsung_disp_on_in_video_engine

static int mipi_samsung_disp_on_in_video_engine(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;

	printk(KERN_INFO "[lcd] mipi_samsung_disp_on_in_video_engine start\n" );

	mfd = platform_get_drvdata(pdev);
	if (unlikely(!mfd))
		return -ENODEV;
	if (unlikely(mfd->key != MFD_KEY))
		return -EINVAL;

	mipi_samsung_disp_send_cmd(mfd, PANEL_ON, false);
	mfd->resume_state = MIPI_RESUME_STATE;

#if defined(RUMTIME_MIPI_CLK_CHANGE)
	current_fps = mfd->panel_info.mipi.frame_rate;
#endif
	
#if defined(AUTO_BRIGHTNESS_CABC_FUNCTION)
	is_disp_on = 1;

	if( is_cabc_on() == true )
	{
		mipi_samsung_disp_send_cmd(mfd, PANEL_CABC_ENABLE, false);
		is_cabc_delayed = 0;
		printk ( KERN_ERR "%s-PANEL_CABC_ENABLE(keystring)\n", __func__ );
	}
	else if( (is_cabc_on() != false) && ((is_cabc_delayed == 1) || (msd.mpd->siop_status == true)) )
	{
		mipi_samsung_disp_send_cmd(mfd, PANEL_CABC_ENABLE, false);
		is_cabc_delayed = 0;
		printk ( KERN_ERR "%s-PANEL_CABC_ENABLE(delayed)\n", __func__ );
	}
#endif
	
	printk(KERN_INFO "[lcd] mipi_samsung_disp_on_in_video_engine end %d\n", gpio_get_value(err_fg_gpio));
	
#if defined(CONFIG_ESD_ERR_FG_RECOVERY)
		enable_irq(PM8921_GPIO_IRQ(PM8921_IRQ_BASE, PMIC_GPIO_ERR_FG));
#endif

	return 0;
}
开发者ID:robcore,项目名称:Alucard-Kernel-jfltexx,代码行数:44,代码来源:mipi_samsung_tft.c


示例9: ARRAY_SIZE

#ifdef CONFIG_MMC_MSM_SDC3_SUPPORT
static unsigned int sdc3_sup_clk_rates[] = {
	400000, 24000000, 45176400, 96000000, 192000000
};

static unsigned int dlxj_sdc3_slot_type = MMC_TYPE_SD;
static struct mmc_platform_data sdc3_data = {
	.ocr_mask       = MMC_VDD_27_28 | MMC_VDD_28_29,
	.mmc_bus_width  = MMC_CAP_4_BIT_DATA,
	.sup_clk_table	= sdc3_sup_clk_rates,
	.sup_clk_cnt	= ARRAY_SIZE(sdc3_sup_clk_rates),
	.pin_data	= &mmc_slot_pin_data[SDCC3],
	.vreg_data	= &mmc_slot_vreg_data[SDCC3],
	.status_gpio	= PM8921_GPIO_PM_TO_SYS(SD_CDETz),
	.status_irq	= PM8921_GPIO_IRQ(PM8921_IRQ_BASE, SD_CDETz),
	.irq_flags	= IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
	.is_status_gpio_active_low = 1,
	.slot_type      = &dlxj_sdc3_slot_type,
#if 0
	.xpc_cap	= 1,
	.uhs_caps	= (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 |
			MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_DDR50 |
			MMC_CAP_UHS_SDR104 | MMC_CAP_MAX_CURRENT_800),
#endif
	.msm_bus_voting_data = &sps_to_ddr_bus_voting_data,
};
static struct mmc_platform_data *deluxe_j_sdc3_pdata = &sdc3_data;
#else
static struct mmc_platform_data *deluxe_j_sdc3_pdata;
#endif
开发者ID:bgcngm,项目名称:802Xtreem,代码行数:30,代码来源:board-deluxe_j-storage.c


示例10: ARRAY_SIZE

#endif

#ifdef CONFIG_MMC_MSM_SDC3_SUPPORT
static struct mmc_platform_data msm8960_sdc3_data = {
	.ocr_mask       = MMC_VDD_27_28 | MMC_VDD_28_29,
	.mmc_bus_width  = MMC_CAP_4_BIT_DATA,
	.sup_clk_table	= sdc3_sup_clk_rates,
	.sup_clk_cnt	= ARRAY_SIZE(sdc3_sup_clk_rates),
#ifdef CONFIG_MMC_MSM_SDC3_WP_SUPPORT
	.wpswitch_gpio	= PM8921_GPIO_PM_TO_SYS(16),
#endif
	.vreg_data	= &mmc_slot_vreg_data[SDCC3],
	.pin_data	= &mmc_slot_pin_data[SDCC3],
#ifndef CONFIG_MMC_MSM_SDC3_POLLING
	.status_gpio	= PM8921_GPIO_PM_TO_SYS(26),
	.status_irq	= PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 26),
	.irq_flags	= IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
#endif
	.is_status_gpio_active_low = true,
	.xpc_cap	= 1,
	.uhs_caps	= (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 |
			MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_DDR50 |
			MMC_CAP_UHS_SDR104 | MMC_CAP_MAX_CURRENT_600),
	.mpm_sdiowakeup_int = MSM_MPM_PIN_SDC3_DAT1,
	.msm_bus_voting_data = &sps_to_ddr_bus_voting_data,
};
#endif

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
static unsigned int sdc4_sup_clk_rates[] = {
	400000, 24000000, 48000000
开发者ID:Blakez,项目名称:ParanoidKANGdroid-Kernel,代码行数:31,代码来源:board-8960-storage.c


示例11: ARRAY_SIZE

};

static struct msm_camera_sensor_platform_info sensor_board_info_jc = {
    .mount_angle = 90,
    .cam_vreg = apq_8064_jc_vreg,
    .num_vreg = ARRAY_SIZE(apq_8064_jc_vreg),
    .gpio_conf = &apq8064_back_cam_gpio_conf,
    .i2c_conf = &apq8064_back_cam_i2c_conf,
    .csi_lane_params = &jc_csi_lane_params,
    .sensor_power_on = cam_ldo_power_on,
    .sensor_power_off = cam_ldo_power_off,
    .sensor_af_power_off = cam_ldo_af_power_off,
    .sensor_vddio_power_off = cam_ldo_vddio_power_off,
    .sensor_pmic_gpio_ctrl = pmic_gpio_ctrl,
    .config_isp_irq = jc_config_isp_irq,
    .irq = PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 24),
    .irq_gpio = GPIO_CAM_ISP_INT,
    .reset = GPIO_13M_CAM_RESET,
    .sys_rev = get_system_rev,
};

static struct msm_camera_sensor_info msm_camera_sensor_jc_data = {
    .sensor_name = "jc",
    .pdata = &msm_camera_csi_device_data[0],
    .flash_data = &flash_jc,
    .sensor_platform_info = &sensor_board_info_jc,
    .csi_if = 1,
    .camera_type = BACK_CAMERA_2D,
    .sensor_type = YUV_SENSOR,
};
开发者ID:JASON-RR,项目名称:jrr_TW_5.0.1_kernel,代码行数:30,代码来源:board-8064-camera.c


示例12: apq8064_init_mmc

void __init apq8064_init_mmc(void)
{
	if (apq8064_sdc1_pdata) {
		/* 8064 v2 supports upto 200MHz clock on SDC1 slot */
		if (SOCINFO_VERSION_MAJOR(socinfo_get_version()) >= 2) {
			apq8064_sdc1_pdata->sup_clk_table =
					sdc1_sup_clk_rates_all;
			apq8064_sdc1_pdata->sup_clk_cnt	=
					ARRAY_SIZE(sdc1_sup_clk_rates_all);
		}
		apq8064_add_sdcc(1, apq8064_sdc1_pdata);
	}
#if defined(CONFIG_MACH_JFVE_EUR)
	apq8064_sdc2_pdata = NULL;
	apq8064_sdc4_pdata = NULL;

	// SDC3 is used for External memory Card
	if (apq8064_sdc3_pdata)
   {  
		apq8064_sdc3_pdata->status_gpio = PM8921_GPIO_PM_TO_SYS(33);
		apq8064_sdc3_pdata->status_irq	= PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 33);

		apq8064_add_sdcc(3, apq8064_sdc3_pdata);
   }
#else
/*
	if (apq8064_sdc2_pdata)
		apq8064_add_sdcc(2, apq8064_sdc2_pdata);
*/
/* system_rev 0x05 or more
 * SDC3 is used for WIFI
    SDC4 is used for External memory Card
 */
	if (apq8064_sdc3_pdata) {

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
		mmc_vdd_reg_data[SDCC3].high_vol_level = 1800000;
		mmc_vdd_reg_data[SDCC3].low_vol_level = 1800000;
		mmc_slot_vreg_data[SDCC3].vdd_io_data = NULL;
		apq8064_sdc3_pdata->status_irq = 0;
		apq8064_sdc3_pdata->status_gpio = 0;
#endif
#if !defined(CONFIG_BCM4335) && !defined(CONFIG_BCM4335_MODULE)
		if (!machine_is_apq8064_cdp()) {
			apq8064_sdc3_pdata->wpswitch_gpio = 0;
			apq8064_sdc3_pdata->is_wpswitch_active_low = false;
		}
		if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
			machine_is_mpq8064_dtv()) {
			int rc;
			struct pm_gpio sd_card_det_init_cfg = {
				.direction      = PM_GPIO_DIR_IN,
				.output_buffer  = PM_GPIO_OUT_BUF_CMOS,
				.pull           = PM_GPIO_PULL_UP_30,
				.vin_sel        = PM_GPIO_VIN_S4,
				.out_strength   = PM_GPIO_STRENGTH_NO,
				.function       = PM_GPIO_FUNC_NORMAL,
			};

			apq8064_sdc3_pdata->status_gpio =
				PM8921_GPIO_PM_TO_SYS(31);
			apq8064_sdc3_pdata->status_irq =
				PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 31);
			rc = pm8xxx_gpio_config(apq8064_sdc3_pdata->status_gpio,
					&sd_card_det_init_cfg);
			if (rc) {
				pr_info("%s: SD_CARD_DET GPIO%d config "
					"failed(%d)\n", __func__,
					apq8064_sdc3_pdata->status_gpio, rc);
				apq8064_sdc3_pdata->status_gpio = 0;
				apq8064_sdc3_pdata->status_irq = 0;
			}
		}
		if (machine_is_apq8064_cdp()) {
			int i;

			for (i = 0;
			     i < apq8064_sdc3_pdata->pin_data->pad_data->\
				 drv->size;
			     i++)
				apq8064_sdc3_pdata->pin_data->pad_data->\
					drv->on[i].val = GPIO_CFG_10MA;
		}
#endif
		apq8064_add_sdcc(3, apq8064_sdc3_pdata);
	}
开发者ID:cnexus,项目名称:kernel_d2spr_tw_44,代码行数:86,代码来源:board-8064-storage.c


示例13: mipi_samsung_disp_on

static int mipi_samsung_disp_on(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd = NULL;
	struct mipi_panel_info *mipi = NULL;
	static int first_boot_on = 0;

	printk(KERN_INFO "[lcd] mipi_samsung_disp_on start\n");

	mfd = platform_get_drvdata(pdev);
	if (unlikely(!mfd))
		return -ENODEV;
	if (unlikely(mfd->key != MFD_KEY))
		return -EINVAL;

	mipi = &mfd->panel_info.mipi;

	if (system_rev == 0) {
		if (!first_boot_on) {
			execute_panel_init(mfd);
			first_boot_on = 1;
		}

		if ((msd.mpd->manufacture_id & 0xFF) == 0x84 || \
			(msd.mpd->manufacture_id & 0xFF) == 0x4)
			mipi_samsung_disp_send_cmd(mfd,
						PANEL_NEED_FLIP, false);
	}
#if !defined(CONFIG_MACH_JACTIVE_ATT) && !defined(CONFIG_MACH_JACTIVE_EUR)
	mipi_samsung_disp_send_cmd(mfd, PANEL_ON, false);
	mfd->resume_state = MIPI_RESUME_STATE;

#if	defined(CONFIG_MDNIE_LITE_TUNING)
	if (!first_boot_on)
	{
		mfd->resume_state = MIPI_RESUME_STATE;
		first_boot_on = 1;
	}
#endif

#if defined(RUMTIME_MIPI_CLK_CHANGE)
	current_fps = mfd->panel_info.mipi.frame_rate;
#endif

#if defined(AUTO_BRIGHTNESS_CABC_FUNCTION)
	is_disp_on = 1;

	if( (is_cabc_delayed == 1) || (msd.mpd->siop_status == true) )
	{
		mipi_samsung_disp_send_cmd(mfd, PANEL_CABC_ENABLE, false);
		is_cabc_delayed = 0;
		printk ( KERN_ERR "%s-PANEL_CABC_ENABLE(delayed)\n", __func__ );
	}
#endif

	printk(KERN_INFO "[lcd] mipi_samsung_disp_on end %d\n", gpio_get_value(err_fg_gpio));

#if defined(CONFIG_ESD_ERR_FG_RECOVERY)
	enable_irq(PM8921_GPIO_IRQ(PM8921_IRQ_BASE, PMIC_GPIO_ERR_FG));
#endif
#endif
	return 0;
}
开发者ID:robcore,项目名称:Alucard-Kernel-jfltexx,代码行数:62,代码来源:mipi_samsung_tft.c


示例14: mipi_samsung_disp_probe

static int __devinit mipi_samsung_disp_probe(struct platform_device *pdev)
{
	int ret;
	struct platform_device *msm_fb_added_dev;
	struct lcd_device *lcd_device;
	struct backlight_device *bd = NULL;

	printk(KERN_INFO "[lcd] mipi_samsung_disp_probe start\n");

	if (pdev->id == 0) {
		msd.mipi_samsung_disp_pdata = pdev->dev.platform_data;

		printk(KERN_INFO
		"[lcd] pdev->id =%d,  pdev-name = %s\n", pdev->id, pdev->name);

		printk(KERN_INFO "[lcd] mipi_samsung_disp_probe end since pdev-id is 0\n");

		return 0;
	}

	printk(KERN_INFO "[lcd] msm_fb_add_device : %s\n", pdev->name);

	msm_fb_added_dev = msm_fb_add_device(pdev);

	mutex_init(&dsi_tx_mutex);

#if defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_LCD_CLASS_DEVICE)
	msd.msm_pdev = msm_fb_added_dev;
#endif

#if defined(CONFIG_HAS_EARLYSUSPEND)
	msd.early_suspend.suspend = mipi_samsung_disp_early_suspend;
	msd.early_suspend.resume = mipi_samsung_disp_late_resume;
	msd.early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN;
	register_early_suspend(&msd.early_suspend);
#endif

#if defined(CONFIG_ESD_ERR_FG_RECOVERY)
	INIT_WORK(&err_fg_work, err_fg_work_func);

	err_fg_gpio = PM8921_GPIO_PM_TO_SYS(PMIC_GPIO_ERR_FG);

	ret = gpio_request(err_fg_gpio, "err_fg");

	if (ret) {
		pr_err("request gpio err_fg failed, rc=%d\n", ret);
		return -ENODEV;
	}

	ret = pm8xxx_gpio_config(err_fg_gpio, &gpio_get_param);

	if (ret) {
		pr_err("gpio_config err_fg_gpio failed (3), rc=%d\n", ret);
		return -EINVAL;
	}

	ret = request_threaded_irq(PM8921_GPIO_IRQ(PM8921_IRQ_BASE, PMIC_GPIO_ERR_FG), 
		NULL, err_fg_irq_handler,  IRQF_TRIGGER_RISING | IRQF_ONESHOT, "esd_detect", NULL);
	if (ret) {
		pr_err("%s : Failed to request_irq.:ret=%d", __func__, ret);
	}

	disable_irq(PM8921_GPIO_IRQ(PM8921_IRQ_BASE, PMIC_GPIO_ERR_FG));
#endif

#if defined(CONFIG_LCD_CLASS_DEVICE)
	printk(KERN_INFO "[lcd] lcd_device_register for panel start\n");

	lcd_device = lcd_device_register("panel", &pdev->dev, NULL,
			&mipi_samsung_disp_props);

	if (IS_ERR(lcd_device)) {
		ret = PTR_ERR(lcd_device);
		printk(KERN_ERR "lcd : failed to register device\n");
		return ret;
	}

	sysfs_remove_file(&lcd_device->dev.kobj,
			&dev_attr_lcd_power.attr);

	ret = sysfs_create_file(&lcd_device->dev.kobj,
			&dev_attr_lcd_power.attr);
	if (ret) {
		pr_info("sysfs create fail-%s\n",
				dev_attr_lcd_power.attr.name);
	}

	ret = sysfs_create_file(&lcd_device->dev.kobj,
			&dev_attr_lcd_type.attr);
	if (ret) {
		pr_info("sysfs create fail-%s\n",
				dev_attr_lcd_type.attr.name);
	}

	ret = sysfs_create_file(&lcd_device->dev.kobj,
					&dev_attr_backlight.attr);
	if (ret) {
		pr_info("sysfs create fail-%s\n",
				dev_attr_backlight.attr.name);
	}
//.........这里部分代码省略.........
开发者ID:robcore,项目名称:Alucard-Kernel-jfltexx,代码行数:101,代码来源:mipi_samsung_tft.c


示例15: ARRAY_SIZE

#ifdef CONFIG_MMC_MSM_SDC3_SUPPORT
static unsigned int fighter_sd_slot_type = MMC_TYPE_SD;
static struct mmc_platform_data msm8960_sdc3_data = {
	.ocr_mask       = MMC_VDD_27_28 | MMC_VDD_28_29,
	.mmc_bus_width  = MMC_CAP_4_BIT_DATA,
	.sup_clk_table	= sdc3_sup_clk_rates,
	.sup_clk_cnt	= ARRAY_SIZE(sdc3_sup_clk_rates),
	.slot_type = &fighter_sd_slot_type,
#ifdef CONFIG_MMC_MSM_SDC3_WP_SUPPORT
	.wpswitch_gpio	= PM8921_GPIO_PM_TO_SYS(16),
#endif
	.vreg_data	= &mmc_slot_vreg_data[SDCC3],
	.pin_data	= &mmc_slot_pin_data[SDCC3],
#ifdef CONFIG_MMC_MSM_CARD_HW_DETECTION
	.status_gpio	= PM8921_GPIO_PM_TO_SYS(FIGHTER_PMGPIO_SD_CDETz),
	.status_irq	= PM8921_GPIO_IRQ(PM8921_IRQ_BASE, FIGHTER_PMGPIO_SD_CDETz),
	.irq_flags	= IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
	.is_status_gpio_active_low = true,
#endif
#if 0
	.xpc_cap	= 1,
	.uhs_caps	= (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 |
			MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_DDR50 |
			MMC_CAP_UHS_SDR104 | MMC_CAP_MAX_CURRENT_600),
#endif
	.msm_bus_voting_data = &sps_to_ddr_bus_voting_data,
};
#endif

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
static unsigned int sdc4_sup_clk_rates[] = {
开发者ID:BackupWildfireDEV,项目名称:ElementalX-Sense-5.0.2,代码行数:31,代码来源:board-fighter-storage.c


示例16: ARRAY_SIZE

#ifdef CONFIG_MMC_MSM_SDC3_SUPPORT
static unsigned int sdc3_sup_clk_rates[] = {
	400000, 24000000, 48000000, 96000000, 192000000
};

static unsigned int t6_sdc3_slot_type = MMC_TYPE_SD;
static struct mmc_platform_data sdc3_data = {
	.ocr_mask       = MMC_VDD_27_28 | MMC_VDD_28_29,
	.mmc_bus_width  = MMC_CAP_4_BIT_DATA,
	.sup_clk_table	= sdc3_sup_clk_rates,
	.sup_clk_cnt	= ARRAY_SIZE(sdc3_sup_clk_rates),
	.slot_type      = &t6_sdc3_slot_type,
	.pin_data	= &mmc_slot_pin_data[SDCC3],
	.vreg_data	= &mmc_slot_vreg_data[SDCC3],
	.status_gpio	= PM8921_GPIO_PM_TO_SYS(PM_SDC3_CDz),
	.status_irq	= PM8921_GPIO_IRQ(PM8921_IRQ_BASE, PM_SDC3_CDz),
	.irq_flags	= IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
	.is_status_gpio_active_low = 1,
	.xpc_cap	= 1,
	.uhs_caps	= (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 |
			MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_DDR50 |
			MMC_CAP_UHS_SDR104 | MMC_CAP_MAX_CURRENT_800),
	.msm_bus_voting_data = &sps_to_ddr_bus_voting_data,
};
static struct mmc_platform_data *t6_sdc3_pdata = &sdc3_data;
#else
static struct mmc_platform_data *t6_sdc3_pdata;
#endif
#endif

/* ---- WIFI ---- */
开发者ID:BackupWildfireDEV,项目名称:ElementalX-Sense-5.0.2,代码行数:31,代码来源:board-t6-storage.c


示例17: PM8921_GPIO_IRQ

	.adc_type = {
		SEC_BATTERY_ADC_TYPE_NONE,	/* CABLE_CHECK */
		SEC_BATTERY_ADC_TYPE_NONE,	/* BAT_CHECK */
		SEC_BATTERY_ADC_TYPE_AP,	/* TEMP */
		SEC_BATTERY_ADC_TYPE_AP,	/* TEMP_AMB */
		SEC_BATTERY_ADC_TYPE_AP,	/* FULL_CHECK */
	},

	/* Battery */
	.vendor = "SDI SDI",
	.technology = POWER_SUPPLY_TECHNOLOGY_LION,
	.battery_data = (void *)apexq_battery_data,
	.bat_gpio_ta_nconnected = 0,
	.bat_polarity_ta_nconnected = 0,
	.bat_irq =
		PM8921_GPIO_IRQ(PM8921_IRQ_BASE, PMIC_GPIO_OTG_POWER),
	.bat_irq_attr =
		IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
	.cable_check_type =
		SEC_BATTERY_CABLE_CHECK_PSY |
		SEC_BATTERY_CABLE_CHECK_INT,
	.cable_source_type =
		SEC_BATTERY_CABLE_SOURCE_EXTERNAL |
		SEC_BATTERY_CABLE_SOURCE_CALLBACK,

	.event_check = true,
	.event_waiting_time = 600,

	/* Monitor setting */
	.polling_type = SEC_BATTERY_MONITOR_ALARM,
	.monitor_initial_count = 3,
开发者ID:Chairshot215,项目名称:android_kernel_gogh,代码行数:31,代码来源:board-apexq-battery.c


示例18: PM8921_GPIO_PM_TO_SYS

		SEC_BATTERY_ADC_TYPE_IC,	/* CABLE_CHECK */
		SEC_BATTERY_ADC_TYPE_NONE,	/* BAT_CHECK */
		SEC_BATTERY_ADC_TYPE_NONE,	/* TEMP */
		SEC_BATTERY_ADC_TYPE_NONE,	/* TEMP_AMB */
		SEC_BATTERY_ADC_TYPE_AP,	/* FULL_CHECK */
	},

	/* Battery */
	.vendor = "SDI SDI",
	.technology = POWER_SUPPLY_TECHNOLOGY_LION,
	.battery_data = (void *)espresso_battery_data,
	.bat_gpio_ta_nconnected =
		PM8921_GPIO_PM_TO_SYS(PMIC_GPIO_TA_nCONNECTED),
	.bat_polarity_ta_nconnected = 0,
	.bat_irq =
		PM8921_GPIO_IRQ(PM8921_IRQ_BASE, PMIC_GPIO_TA_nCONNECTED),
	.bat_irq_attr =
		IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
	.cable_check_type =
		SEC_BATTERY_CABLE_CHECK_NOUSBCHARGE |
		SEC_BATTERY_CABLE_CHECK_INT,
	.cable_source_type = SEC_BATTERY_CABLE_SOURCE_ADC,

	.event_check = true,
	.event_waiting_time = 600,

	/* Monitor setting */
	.polling_type = SEC_BATTERY_MONITOR_ALARM,
	.monitor_initial_count = 3,

	/* Battery check */
开发者ID:AnDr0id,项目名称:SGH-I747,代码行数:31,代码来源:board-espresso-battery.c


示例19: ARRAY_SIZE

#ifdef CONFIG_MMC_MSM_SDC3_SUPPORT
static unsigned int valente_sdslot_type = MMC_TYPE_SD;
static struct mmc_platform_data msm8960_sdc3_data = {
	.ocr_mask       = MMC_VDD_27_28 | MMC_VDD_28_29,
	.mmc_bus_width  = MMC_CAP_4_BIT_DATA,
	.sup_clk_table	= sdc3_sup_clk_rates,
	.sup_clk_cnt	= ARRAY_SIZE(sdc3_sup_clk_rates),
#ifdef CONFIG_MMC_MSM_SDC3_WP_SUPPORT
	.wpswitch_gpio	= PM8921_GPIO_PM_TO_SYS(16),
#endif
	.vreg_data	= &mmc_slot_vreg_data[SDCC3],
	.pin_data	= &mmc_slot_pin_data[SDCC3],
#ifdef CONFIG_MMC_MSM_CARD_HW_DETECTION
	.status_gpio	= PM8921_GPIO_PM_TO_SYS(VALENTE_WX_C9_PMGPIO_SDC3_CDz),
	.status_irq     = PM8921_GPIO_IRQ(PM8921_IRQ_BASE, VALENTE_WX_C9_PMGPIO_SDC3_CDz),
	.irq_flags	= IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
	.is_status_gpio_active_low = true,
#endif
	.slot_type = &valente_sdslot_type,
#if 0
	.xpc_cap	= 1,
	.uhs_caps	= (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 |
			MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_DDR50 |
			MMC_CAP_UHS_SDR104 | MMC_CAP_MAX_CURRENT_600),
#endif
	.msm_bus_voting_data = &sps_to_ddr_bus_voting_data,
};
#endif

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
开发者ID:BackupWildfireDEV,项目名称:ElementalX-Sense-5.0.2,代码行数:30,代码来源:board-valente_wx_c9-storage.c


示例20: PM8921_GPIO_IRQ

		.cen_init = felica_cen_init,
		.cen_read = felica_cen_read,
		.cen_write = felica_cen_write,
	},
	.pon_pfdata = {
		.pon_init = felica_pon_init,
		.pon_write = felica_pon_write,
		.pon_release = felica_pon_release,
		.tvdd_on = felica_tvdd_on,
		.tvdd_off = felica_tvdd_off,
	},
	.rfs_pfdata = {
		.rfs_init = felica_rfs_init,
		.rfs_read = felica_rfs_read,
		.rfs_release = felica_rfs_release,
		.irq_rfs = PM8921_GPIO_IRQ(PM8921_IRQ_BASE, PM_GPIO_FELICA_RFS),
	},
	.int_pfdata = {
		.int_init = felica_int_init,
		.int_read = felica_int_read,
		.int_release = felica_int_release,
		.irq_int = MSM_GPIO_TO_INT(MSM_GPIO_FELICA_INT),
	},
#ifdef CONFIG_SONY_FELICA_NFC_SUPPORT
	.intu_pfdata = {
		.intu_init = snfc_intu_init,
		.intu_read = snfc_intu_read,
		.intu_release = snfc_intu_release,
		.irq_intu = MSM_GPIO_TO_INT(MSM_GPIO_S_COMBO_INTU),
	},
	.hsel_pfdata = {
开发者ID:arrhy,项目名称:android_kernel_sony_apq8064,代码行数:31,代码来源:board-sony_fusion3-felica.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ PM8921_GPIO_PM_TO_SYS函数代码示例发布时间:2022-05-30
下一篇:
C++ PM8058_GPIO_PM_TO_SYS函数代码示例发布时间: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