Loading drivers/power/qcom/apm.c +13 −0 Original line number Diff line number Diff line Loading @@ -440,6 +440,19 @@ static int msm_apm_switch_to_apcc(struct msm_apm_ctrl_dev *ctrl_dev) return ret; } /** * msm_apm_get_supply() - Returns the supply that is currently * powering the memory arrays * @ctrl_dev: Pointer to an MSM APM controller device * * Returns the supply currently selected by the APM. */ int msm_apm_get_supply(struct msm_apm_ctrl_dev *ctrl_dev) { return ctrl_dev->supply; } EXPORT_SYMBOL(msm_apm_get_supply); /** * msm_apm_set_supply() - Perform the necessary steps to switch the voltage * source of the memory arrays to a given supply Loading include/linux/power/qcom/apm.h +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ struct msm_apm_ctrl_dev; struct msm_apm_ctrl_dev *msm_apm_ctrl_dev_get(struct device *dev); int msm_apm_set_supply(struct msm_apm_ctrl_dev *ctrl_dev, enum msm_apm_supply supply); int msm_apm_get_supply(struct msm_apm_ctrl_dev *ctrl_dev); #else static inline struct msm_apm_ctrl_dev *msm_apm_ctrl_dev_get(struct device *dev) Loading @@ -41,5 +42,7 @@ static inline struct msm_apm_ctrl_dev *msm_apm_ctrl_dev_get(struct device *dev) static inline int msm_apm_set_supply(struct msm_apm_ctrl_dev *ctrl_dev, enum msm_apm_supply supply) { return -EPERM; } static inline int msm_apm_get_supply(struct msm_apm_ctrl_dev *ctrl_dev); { return -EPERM; } #endif #endif Loading
drivers/power/qcom/apm.c +13 −0 Original line number Diff line number Diff line Loading @@ -440,6 +440,19 @@ static int msm_apm_switch_to_apcc(struct msm_apm_ctrl_dev *ctrl_dev) return ret; } /** * msm_apm_get_supply() - Returns the supply that is currently * powering the memory arrays * @ctrl_dev: Pointer to an MSM APM controller device * * Returns the supply currently selected by the APM. */ int msm_apm_get_supply(struct msm_apm_ctrl_dev *ctrl_dev) { return ctrl_dev->supply; } EXPORT_SYMBOL(msm_apm_get_supply); /** * msm_apm_set_supply() - Perform the necessary steps to switch the voltage * source of the memory arrays to a given supply Loading
include/linux/power/qcom/apm.h +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ struct msm_apm_ctrl_dev; struct msm_apm_ctrl_dev *msm_apm_ctrl_dev_get(struct device *dev); int msm_apm_set_supply(struct msm_apm_ctrl_dev *ctrl_dev, enum msm_apm_supply supply); int msm_apm_get_supply(struct msm_apm_ctrl_dev *ctrl_dev); #else static inline struct msm_apm_ctrl_dev *msm_apm_ctrl_dev_get(struct device *dev) Loading @@ -41,5 +42,7 @@ static inline struct msm_apm_ctrl_dev *msm_apm_ctrl_dev_get(struct device *dev) static inline int msm_apm_set_supply(struct msm_apm_ctrl_dev *ctrl_dev, enum msm_apm_supply supply) { return -EPERM; } static inline int msm_apm_get_supply(struct msm_apm_ctrl_dev *ctrl_dev); { return -EPERM; } #endif #endif