/* FIXME: All modules should get params from mod_dispatch */ static int init_modules(igd_param_t *params, igd_context_t *context) { unsigned int ret; EMGD_TRACE_ENTER; /* * Reg module must be first so that the state of the device can be * saved before anything else is touched. */ ret = REG_INIT(context, (params->preserve_regs)?IGD_DRIVER_SAVE_RESTORE:0); if (ret) { EMGD_DEBUG("Error initializing register module"); } /* * GMM is not optional. Its init function must exist. */ ret = gmm_init(context, params->page_request, params->max_fb_size); if(ret) { EMGD_ERROR_EXIT("GMM Module Init Failed"); return ret; } ret = CMD_INIT(context); if(ret) { EMGD_ERROR_EXIT("Command Module Init Failed"); return ret; } /* * Mode is not optional. Its init function must exist. */ ret = mode_init(context); if (ret) { EMGD_ERROR_EXIT("Mode Module Init Failed"); return ret; } ret = APPCONTEXT_INIT(context); if (ret) { EMGD_ERROR_EXIT("Appcontext Module Init Failed"); return ret; } ret = OVERLAY_INIT(context, params); if(ret) { EMGD_ERROR_EXIT("Overlay Module Init Failed"); return ret; } ret = PWR_INIT(context); if(ret) { EMGD_DEBUG("Error initializing power module"); } ret = RESET_INIT(context); if(ret) { EMGD_DEBUG("Error initializing reset module"); } ret = OS_INIT_INTERRUPT(context->device_context.did, context->device_context.virt_mmadr); if(ret) { EMGD_ERROR_EXIT("Interrupt Module Init Failed"); return ret; } ret = BLEND_INIT(context); if(ret) { EMGD_DEBUG("Error initializing blend module"); } ret = INIT_2D(context); if(ret) { EMGD_DEBUG("Error initializing 2d module"); } EMGD_TRACE_EXIT; return 0; }
{ \ .constraints = { \ .name = __stringify(_name), \ .min_uV = _min, \ .max_uV = _max, \ .always_on = _always, \ .boot_on = _boot, \ .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, \ }, \ .num_consumer_supplies = 1, \ .consumer_supplies = ®ulator_supply[PM8607_ID_##_name], \ } /* TODO: check the regulator data carefully */ static struct regulator_init_data regulator_data[] = { REG_INIT(BUCK1, 0, 1500000, 0, 0), REG_INIT(BUCK3, 0, 3000000, 0, 0), REG_INIT(LDO1, 1200000, 2800000, 0, 0), REG_INIT(LDO2, 1800000, 3300000, 0, 0), REG_INIT(LDO3, 1800000, 3300000, 0, 0), REG_INIT(LDO4, 1800000, 3300000, 0, 0), REG_INIT(LDO5, 2900000, 3300000, 0, 0), REG_INIT(LDO6, 1800000, 3300000, 0, 0), REG_INIT(LDO7, 1800000, 2900000, 0, 0), REG_INIT(LDO8, 1800000, 2900000, 0, 0), REG_INIT(LDO9, 1800000, 3300000, 0, 0), REG_INIT(LDO10, 1200000, 3300000, 0, 0), REG_INIT(LDO12, 1200000, 3300000, 0, 0), REG_INIT(LDO13, 1200000, 3300000, 0, 0), REG_INIT(LDO14, 1800000, 3300000, 0, 1), };