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); }
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
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); }
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; }
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); } }
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; }
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); }
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; }
#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
#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
}; 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, };
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); }
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; }
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); } #if defined(RUMTIME_MIPI_CLK_CHANGE) ret = sysfs_create_file(&lcd_device->dev.kobj, &dev_attr_fps_change.attr); if (ret) { pr_info("sysfs create fail-%s\n", dev_attr_fps_change.attr.name); } #endif ret = sysfs_create_file(&lcd_device->dev.kobj, &dev_attr_siop_enable.attr); if (ret) { pr_info("sysfs create fail-%s\n", dev_attr_siop_enable.attr.name); } printk(KERN_INFO "[lcd] backlight_device_register for panel start\n"); bd = backlight_device_register("panel", &lcd_device->dev, NULL, NULL, NULL); if (IS_ERR(bd)) { ret = PTR_ERR(bd); pr_info("backlight : failed to register device\n"); return ret; } ret = sysfs_create_file(&bd->dev.kobj, &dev_attr_auto_brightness.attr); if (ret) { pr_info("sysfs create fail-%s\n", dev_attr_auto_brightness.attr.name); } #endif #if defined(CONFIG_FB_MDP4_ENHANCE) init_mdnie_class(); #elif defined(CONFIG_MDNIE_LITE_TUNING) pr_info("[%s] CONFIG_MDNIE_LITE_TUNING ok ! init class called!\n", __func__); mdnie_lite_tuning_init(); #endif #if defined(DDI_VIDEO_ENHANCE_TUNING) ret = sysfs_create_file(&lcd_device->dev.kobj, &dev_attr_tuning.attr); if (ret) { pr_info("sysfs create fail-%s\n", dev_attr_tuning.attr.name); } #endif printk(KERN_INFO "[lcd] mipi_samsung_disp_probe end\n"); return 0; }
#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[] = {
#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 ---- */
.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,
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 */
#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
.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 = {
&macpattern[0], &macpattern[1], &macpattern[2], &macpattern[3], &macpattern[4], &macpattern[5]); for (i = 0; i < ETHER_ADDR_LEN; i++) ether_mac_addr[i] = (u8)macpattern[i]; } memcpy(buf, ether_mac_addr, sizeof(ether_mac_addr)); printk(KERN_INFO"m7_wifi_get_mac_addr = %02x %02x %02x %02x %02x %02x \n", ether_mac_addr[0], ether_mac_addr[1], ether_mac_addr[2], ether_mac_addr[3], ether_mac_addr[4], ether_mac_addr[5]); return 0; } static struct resource m7_wifi_resources[] = { [0] = { .name = "bcmdhd_wlan_irq", .start = PM8921_GPIO_IRQ(PM8921_IRQ_BASE, WL_HOST_WAKE), .end = PM8921_GPIO_IRQ(PM8921_IRQ_BASE, WL_HOST_WAKE), #ifdef HW_OOB .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE, #else .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, #endif }, }; static struct wifi_platform_data m7_wifi_control = { .set_power = m7_wifi_power, .set_reset = m7_wifi_reset, .set_carddetect = m7_wifi_set_carddetect, .mem_prealloc = m7_wifi_mem_prealloc, .get_mac_addr = m7_wifi_get_mac_addr,
#endif static unsigned int sdc4_sup_clk_rates[] = { 400000, 24000000, 48000000, 96000000, 192000000 }; static unsigned int sdc4_sdslot_type = MMC_TYPE_SD; static struct mmc_platform_data sdc4_sdslot_data = { .ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, .config_sdgpio = msm_sdcc_setup_gpio, .mmc_bus_width = MMC_CAP_4_BIT_DATA, .sup_clk_table = sdc4_sup_clk_rates, .sup_clk_cnt = ARRAY_SIZE(sdc4_sup_clk_rates), .vreg_data = &mmc_slot_vreg_data[SDCC4], .status_gpio = PM8921_GPIO_PM_TO_SYS(uSD_CD), .status_irq = PM8921_GPIO_IRQ(PM8921_IRQ_BASE, uSD_CD), .irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, .is_status_gpio_active_low = 1, .slot_type = &sdc4_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_800), #endif .msm_bus_voting_data = &sps_to_ddr_bus_voting_data, }; #define PM8XXX_GPIO_INIT(_gpio, _dir, _buf, _val, _pull, _vin, _out_strength, \ _func, _inv, _disable) \ { \