Skip to content

Commit

Permalink
OMAP3+: voltage: rename omap_voltage_get_nom_volt -> voltdm_get_voltage
Browse files Browse the repository at this point in the history
Use preferred voltdm_ naming for getting current nominal voltage.

No functional changes.

Signed-off-by: Kevin Hilman <khilman@ti.com>
  • Loading branch information
Kevin Hilman committed Sep 15, 2011
1 parent e327788 commit d5c1282
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/smartreflex-class3.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

static int sr_class3_enable(struct voltagedomain *voltdm)
{
unsigned long volt = omap_voltage_get_nom_volt(voltdm);
unsigned long volt = voltdm_get_voltage(voltdm);

if (!volt) {
pr_warning("%s: Curr voltage unknown. Cannot enable sr_%s\n",
Expand Down
14 changes: 8 additions & 6 deletions arch/arm/mach-omap2/voltage.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ static LIST_HEAD(voltdm_list);

/* Public functions */
/**
* omap_voltage_get_nom_volt() - Gets the current non-auto-compensated voltage
* @voltdm: pointer to the VDD for which current voltage info is needed
* voltdm_get_voltage() - Gets the current non-auto-compensated voltage
* @voltdm: pointer to the voltdm for which current voltage info is needed
*
* API to get the current non-auto-compensated voltage for a VDD.
* Returns 0 in case of error else returns the current voltage for the VDD.
* API to get the current non-auto-compensated voltage for a voltage domain.
* Returns 0 in case of error else returns the current voltage.
*/
unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm)
unsigned long voltdm_get_voltage(struct voltagedomain *voltdm)
{
if (!voltdm || IS_ERR(voltdm)) {
pr_warning("%s: VDD specified does not exist!\n", __func__);
Expand All @@ -72,6 +72,8 @@ unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm)
int voltdm_scale(struct voltagedomain *voltdm,
unsigned long target_volt)
{
int ret;

if (!voltdm || IS_ERR(voltdm)) {
pr_warning("%s: VDD specified does not exist!\n", __func__);
return -EINVAL;
Expand Down Expand Up @@ -104,7 +106,7 @@ void voltdm_reset(struct voltagedomain *voltdm)
return;
}

target_volt = omap_voltage_get_nom_volt(voltdm);
target_volt = voltdm_get_voltage(voltdm);
if (!target_volt) {
pr_err("%s: unable to find current voltage for vdd_%s\n",
__func__, voltdm->name);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/voltage.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ void omap_voltage_get_volttable(struct voltagedomain *voltdm,
struct omap_volt_data **volt_data);
struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
unsigned long volt);
unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm);
#ifdef CONFIG_PM
int omap_voltage_register_pmic(struct voltagedomain *voltdm,
struct omap_voltdm_pmic *pmic);
Expand Down Expand Up @@ -183,4 +182,5 @@ int voltdm_for_each_pwrdm(struct voltagedomain *voltdm,
struct powerdomain *pwrdm));
int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
void voltdm_reset(struct voltagedomain *voltdm);
unsigned long voltdm_get_voltage(struct voltagedomain *voltdm);
#endif

0 comments on commit d5c1282

Please sign in to comment.