static int nuri_bl_notify(struct device *dev, int brightness) { if (brightness < 1) brightness = 0; gpio_set_value(EXYNOS4_GPE2(3), 1); return brightness; }
static int nuri_bl_init(struct device *dev) { int ret, gpio = EXYNOS4_GPE2(3); ret = gpio_request(gpio, "LCD_LDO_EN"); if (!ret) gpio_direction_output(gpio, 0); return ret; }
static void __init universal_tsp_init(void) { int gpio; /* TSP_LDO_ON: XMDMADDR_11 */ gpio = EXYNOS4_GPE2(3); gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "TSP_LDO_ON"); gpio_export(gpio, 0); /* TSP_INT: XMDMADDR_7 */ gpio = EXYNOS4_GPE1(7); gpio_request(gpio, "TSP_INT"); s5p_register_gpio_interrupt(gpio); s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); i2c3_devs[0].irq = gpio_to_irq(gpio); }
{ MAX8998_ESAFEOUT2, &lp3974_esafeout2_data }, }; static struct max8998_platform_data universal_lp3974_pdata = { .num_regulators = ARRAY_SIZE(lp3974_regulators), .regulators = lp3974_regulators, .buck1_voltage1 = 1100000, /* INT */ .buck1_voltage2 = 1000000, .buck1_voltage3 = 1100000, .buck1_voltage4 = 1000000, .buck1_set1 = EXYNOS4_GPX0(5), .buck1_set2 = EXYNOS4_GPX0(6), .buck2_voltage1 = 1200000, /* G3D */ .buck2_voltage2 = 1100000, .buck1_default_idx = 0, .buck2_set3 = EXYNOS4_GPE2(0), .buck2_default_idx = 0, .wakeup = true, }; enum fixed_regulator_id { FIXED_REG_ID_MMC0, FIXED_REG_ID_HDMI_5V, FIXED_REG_ID_CAM_S_IF, FIXED_REG_ID_CAM_I_CORE, FIXED_REG_ID_CAM_VT_DIO, }; static struct regulator_consumer_supply hdmi_fixed_consumer = REGULATOR_SUPPLY("hdmi-en", "exynos4-hdmi");
static void nuri_bl_exit(struct device *dev) { gpio_free(EXYNOS4_GPE2(3)); }
static int nuri_bl_init(struct device *dev) { return gpio_request_one(EXYNOS4_GPE2(3), GPIOF_OUT_INIT_LOW, "LCD_LD0_EN"); }
}; static struct platform_device max8903_fixed_reg_dev = { .name = "reg-fixed-voltage", .id = FIXED_REG_ID_MAX8903, .dev = { .platform_data = &max8903_charger_en }, }; static struct max8903_pdata nuri_max8903 = { /* * cen: don't control with the driver, let it be * controlled by regulator above */ .dok = EXYNOS4_GPX1(4), /* TA_nCONNECTED */ /* uok, usus: not connected */ .chg = EXYNOS4_GPE2(0), /* TA_nCHG */ /* flt: vcc_1.8V_pda */ .dcm = EXYNOS4_GPL0(1), /* CURR_ADJ */ .dc_valid = true, .usb_valid = false, /* USB is not wired to MAX8903 */ }; static struct platform_device nuri_max8903_device = { .name = "max8903-charger", .dev = { .platform_data = &nuri_max8903, }, }; static void __init nuri_power_init(void)
{ MAX8998_ESAFEOUT2, &lp3974_esafeout2_data }, }; static struct max8998_platform_data universal_lp3974_pdata = { .num_regulators = ARRAY_SIZE(lp3974_regulators), .regulators = lp3974_regulators, .buck1_voltage1 = 1100000, /* INT */ .buck1_voltage2 = 1000000, .buck1_voltage3 = 1100000, .buck1_voltage4 = 1000000, .buck1_set1 = EXYNOS4_GPX0(5), .buck1_set2 = EXYNOS4_GPX0(6), .buck2_voltage1 = 1200000, /* G3D */ .buck2_voltage2 = 1100000, .buck1_default_idx = 0, .buck2_set3 = EXYNOS4_GPE2(0), .buck2_default_idx = 0, .wakeup = true, }; /* GPIO I2C 5 (PMIC) */ static struct i2c_board_info i2c5_devs[] __initdata = { { I2C_BOARD_INFO("max8952", 0xC0 >> 1), .platform_data = &universal_max8952_pdata, }, { I2C_BOARD_INFO("lp3974", 0xCC >> 1), .platform_data = &universal_lp3974_pdata, }, };
}, }, { .chip = { .base = EXYNOS4_GPE0(0), .ngpio = EXYNOS4_GPIO_E0_NR, .label = "GPE0", }, }, { .chip = { .base = EXYNOS4_GPE1(0), .ngpio = EXYNOS4_GPIO_E1_NR, .label = "GPE1", }, }, { .chip = { .base = EXYNOS4_GPE2(0), .ngpio = EXYNOS4_GPIO_E2_NR, .label = "GPE2", }, }, { .chip = { .base = EXYNOS4_GPE3(0), .ngpio = EXYNOS4_GPIO_E3_NR, .label = "GPE3", }, }, { .chip = { .base = EXYNOS4_GPE4(0), .ngpio = EXYNOS4_GPIO_E4_NR, .label = "GPE4", },