Skip to content

Commit

Permalink
pm wip
Browse files Browse the repository at this point in the history
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
  • Loading branch information
krzk committed Apr 5, 2022
1 parent ae883f4 commit fff8a3e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions include/linux/pm_opp.h
Expand Up @@ -26,6 +26,22 @@ enum dev_pm_opp_event {
OPP_EVENT_ADJUST_VOLTAGE,
};

/**
* struct dev_pm_opp_supply - Power supply voltage/current values
* @u_volt: Target voltage in microvolts corresponding to this OPP
* @u_volt_min: Minimum voltage in microvolts corresponding to this OPP
* @u_volt_max: Maximum voltage in microvolts corresponding to this OPP
* @u_amp: Maximum current drawn by the device in microamperes
* @u_watt: Power used by the device in microwatts
*
* This structure stores the voltage/current/power values for a single power
* supply.
*/
struct dev_pm_opp_clock {
unsigned long rate;
};


/**
* struct dev_pm_opp_supply - Power supply voltage/current values
* @u_volt: Target voltage in microvolts corresponding to this OPP
Expand Down Expand Up @@ -158,6 +174,10 @@ int devm_pm_opp_set_regulators(struct device *dev, const char * const names[], u
struct opp_table *dev_pm_opp_set_clkname(struct device *dev, const char *name);
void dev_pm_opp_put_clkname(struct opp_table *opp_table);
int devm_pm_opp_set_clkname(struct device *dev, const char *name);
struct opp_table *dev_pm_opp_set_clknames(struct device *dev,
const char * const names[],
unsigned int count);
void dev_pm_opp_put_clknames(struct opp_table *opp_table);
struct opp_table *dev_pm_opp_register_set_opp_helper(struct device *dev, int (*set_opp)(struct dev_pm_set_opp_data *data));
void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table);
int devm_pm_opp_register_set_opp_helper(struct device *dev, int (*set_opp)(struct dev_pm_set_opp_data *data));
Expand Down Expand Up @@ -381,6 +401,16 @@ static inline struct opp_table *dev_pm_opp_set_clkname(struct device *dev, const

static inline void dev_pm_opp_put_clkname(struct opp_table *opp_table) {}

static inline struct opp_table *dev_pm_opp_set_clknames(struct device *dev,
const char * const names[],
unsigned int count)
{
return ERR_PTR(-EOPNOTSUPP);
}

static inline void dev_pm_opp_put_clknames(struct opp_table *opp_table) {}


static inline int devm_pm_opp_set_clkname(struct device *dev, const char *name)
{
return -EOPNOTSUPP;
Expand Down

0 comments on commit fff8a3e

Please sign in to comment.