Linux Kernel
3.7.1
|
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/err.h>
#include <linux/export.h>
#include <linux/debugfs.h>
#include <linux/slab.h>
#include <linux/clk.h>
#include "common.h"
#include "prm-regbits-34xx.h"
#include "prm-regbits-44xx.h"
#include "prm44xx.h"
#include "prcm44xx.h"
#include "prminst44xx.h"
#include "control.h"
#include "voltage.h"
#include "powerdomain.h"
#include "vc.h"
#include "vp.h"
Go to the source code of this file.
void omap_change_voltscale_method | ( | struct voltagedomain * | voltdm, |
int | voltscale_method | ||
) |
omap_change_voltscale_method() - API to change the voltage scaling method. : pointer to the VDD whose voltage scaling method has to be changed. : the method to be used for voltage scaling.
This API can be used by the board files to change the method of voltage scaling between vpforceupdate and vcbypass. The parameter values are defined in voltage.h
|
read |
omap_voltage_get_voltdata() - API to get the voltage table entry for a particular voltage : pointer to the VDD whose voltage table has to be searched : the voltage to be searched in the voltage table
This API searches through the voltage table for the required voltage domain and tries to find a matching entry for the passed voltage volt. If a matching entry is found volt_data is populated with that entry. This API searches only through the non-compensated voltages int the voltage table. Returns pointer to the voltage table entry corresponding to volt on success. Returns -ENODATA if no voltage table exisits for the passed voltage domain or if there is no matching entry.
void omap_voltage_get_volttable | ( | struct voltagedomain * | voltdm, |
struct omap_volt_data ** | volt_data | ||
) |
omap_voltage_get_volttable() - API to get the voltage table associated with a particular voltage domain. : pointer to the VDD for which the voltage table is required : the voltage table for the particular vdd which is to be populated by this API
This API populates the voltage table associated with a VDD into the passed parameter pointer. Returns the count of distinct voltages supported by this vdd.
int omap_voltage_register_pmic | ( | struct voltagedomain * | voltdm, |
struct omap_voltdm_pmic * | pmic | ||
) |
omap_voltage_register_pmic() - API to register PMIC specific data : pointer to the VDD for which the PMIC specific data is to be registered : the structure containing pmic info
This API is to be called by the SOC/PMIC file to specify the pmic specific info as present in omap_voltdm_pmic structure.
int voltdm_add_pwrdm | ( | struct voltagedomain * | voltdm, |
struct powerdomain * | pwrdm | ||
) |
voltdm_add_pwrdm - add a powerdomain to a voltagedomain : struct voltagedomain * to add the powerdomain to : struct powerdomain * to associate with a voltagedomain
Associate the powerdomain with a voltagedomain . This enables the use of voltdm_for_each_pwrdm(). Returns -EINVAL if presented with invalid pointers; -ENOMEM if memory could not be allocated; or 0 upon success.
int voltdm_for_each_pwrdm | ( | struct voltagedomain * | voltdm, |
int(*)(struct voltagedomain *voltdm, struct powerdomain *pwrdm) | fn | ||
) |
unsigned long voltdm_get_voltage | ( | struct voltagedomain * | voltdm | ) |
void voltdm_init | ( | struct voltagedomain ** | voltdms | ) |
voltdm_init - set up the voltagedomain layer : array of struct voltagedomain pointers to register
Loop through the array of voltagedomains , registering all that are available on the current CPU. If voltdm_list is supplied and not null, all of the referenced voltagedomains will be registered. No return value.
|
read |
void voltdm_reset | ( | struct voltagedomain * | voltdm | ) |
voltdm_reset() - Resets the voltage of a particular voltage domain to that of the current OPP. : pointer to the voltage domain whose voltage is to be reset.
This API finds out the correct voltage the voltage domain is supposed to be at and resets the voltage to that level. Should be used especially while disabling any voltage compensation modules.
int voltdm_scale | ( | struct voltagedomain * | voltdm, |
unsigned long | target_volt | ||
) |