static int __init mahimahi_rfkill_init(void) { if (!machine_is_mahimahi()) return 0; return platform_driver_register(&mahimahi_rfkill_driver); }
int __init mahimahi_init_panel(void) { int ret; if (!machine_is_mahimahi()) return 0; if (system_rev > 0xC0) { /* CDMA version (except for EVT1) supports RGB666 */ init_tablep = samsung_oled_rgb666_init_table; init_table_sz = ARRAY_SIZE(samsung_oled_rgb666_init_table); mahimahi_lcdc_fb_data.output_format = MSM_MDP_OUT_IF_FMT_RGB666; } ret = platform_device_register(&msm_device_mdp); if (ret != 0) return ret; ret = mahimahi_init_spi_hack(); if (ret != 0) return ret; if (gpio_get_value(MAHIMAHI_GPIO_LCD_ID0)) { pr_info("%s: tft panel\n", __func__); vreg_lcm_rftx_2v6 = vreg_get(0, "rftx"); if (IS_ERR(vreg_lcm_rftx_2v6)) return PTR_ERR(vreg_lcm_rftx_2v6); vreg_set_level(vreg_lcm_rftx_2v6, 2600); vreg_lcm_aux_2v6 = vreg_get(0, "gp4"); if (IS_ERR(vreg_lcm_aux_2v6)) return PTR_ERR(vreg_lcm_aux_2v6); if (gpio_get_value(MAHIMAHI_GPIO_LCD_RST_N)) tft_panel_on = 1; ret = platform_device_register(&mahimahi_lcdc_tft_device); INIT_WORK(&brightness_delayed_work, mahimahi_brightness_tft_set_work); } else { pr_info("%s: amoled panel\n", __func__); ret = platform_device_register(&mahimahi_lcdc_amoled_device); INIT_WORK(&brightness_delayed_work, mahimahi_brightness_amoled_set_work); } if (ret != 0) return ret; ret = led_classdev_register(NULL, &mahimahi_brightness_led); if (ret != 0) { pr_err("%s: Cannot register brightness led\n", __func__); return ret; } return 0; }
static int __init mahimahi_wifi_init(void) { if (!machine_is_mahimahi()) return 0; printk("%s: start\n", __func__); mahimahi_wifi_update_nvs("sd_oobonly=1\r\n", 0); mahimahi_wifi_update_nvs("btc_params70=0x32\r\n", 1); mahimahi_init_wifi_mem(); return platform_device_register(&mahimahi_wifi_device); }
static int __init mahimahi_wifi_init(void) { int ret; if (!machine_is_mahimahi()) return 0; printk("%s: start\n", __func__); mahimahi_wifi_update_nvs("sd_oobonly=1\r\n"); mahimahi_init_wifi_mem(); ret = platform_device_register(&mahimahi_wifi_device); return ret; }
static int __init mahimahimmc_dbg_init(void) { struct dentry *dent; if (!machine_is_mahimahi()) return 0; dent = debugfs_create_dir("mahimahi_mmc_dbg", 0); if (IS_ERR(dent)) return PTR_ERR(dent); debugfs_create_file("wifi_reset", 0644, dent, NULL, &mahimahimmc_dbg_wifi_reset_fops); debugfs_create_file("wifi_cd", 0644, dent, NULL, &mahimahimmc_dbg_wifi_cd_fops); debugfs_create_file("wifi_pwr", 0644, dent, NULL, &mahimahimmc_dbg_wifi_pwr_fops); debugfs_create_file("sd_pwr", 0644, dent, NULL, &mahimahimmc_dbg_sd_pwr_fops); debugfs_create_file("sd_cd", 0644, dent, NULL, &mahimahimmc_dbg_sd_cd_fops); return 0; }
int __init mahimahi_init_panel(void) { int ret; if (!machine_is_mahimahi()) return 0; if (system_rev > 0xC0) { init_tablep = samsung_oled_rgb666_init_table; init_table_sz = ARRAY_SIZE(samsung_oled_rgb666_init_table); mahimahi_lcdc_fb_data.output_format = MSM_MDP_OUT_IF_FMT_RGB666; } ret = platform_device_register(&msm_device_mdp); if (ret != 0) return ret; ret = mahimahi_init_spi_hack(); if (ret != 0) return ret; INIT_WORK(&brightness_delayed_work, mahimahi_brightness_set_work); ret = platform_device_register(&mahimahi_lcdc_device); if (ret != 0) return ret; ret = led_classdev_register(NULL, &mahimahi_brightness_led); if (ret != 0) { pr_err("%s: Cannot register brightness led\n", __func__); return ret; } return 0; }