Tero Kristo <t-kristo@xxxxxx> writes: > All voltagedomains that have support for vc and vp are now automatically > registered with SMPS regulator driver. Voltage.c builds a platform device > structure for this purpose during late init. > > Signed-off-by: Tero Kristo <t-kristo@xxxxxx> [...] > +static void smps_add_regulator(struct platform_device *smps_dev, > + struct voltagedomain *voltdm) > +{ > + struct omap_smps_platform_data *info; > + struct regulator_init_data *init_data; > + struct regulator_consumer_supply *supply; > + > + if (!smps_dev || !voltdm) > + return; > + > + info = smps_dev->dev.platform_data; > + > + init_data = kzalloc(sizeof(struct regulator_init_data), GFP_KERNEL); > + supply = kzalloc(sizeof(struct regulator_consumer_supply), GFP_KERNEL); > + > + if (!init_data || !supply) { > + kfree(init_data); > + kfree(supply); > + return; > + } > + supply->supply = "vcc"; > + supply->dev_name = voltdm->name; > + init_data->constraints.min_uV = 600000; > + init_data->constraints.max_uV = 1450000; These values should come from the OMAP/PMIC limitations, not from hard coded values. Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html