本文整理汇总了C++中PM8921_GPIO_IRQ函数的典型用法代码示例。如果您正苦于以下问题:C++ PM8921_GPIO_IRQ函数的具体用法?C++ PM8921_GPIO_IRQ怎么用?C++ PM8921_GPIO_IRQ使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PM8921_GPIO_IRQ函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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),
¶m);
#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
示例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);
}
示例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;
}
示例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);
}
}
示例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;
}
示例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);
}
示例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;
}
示例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
示例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
示例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,
};
示例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);
}
示例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;
}
示例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);
}
//.........这里部分代码省略.........
示例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[] = {