Guest User

Untitled

a guest
Jun 25th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1. int soc_update_sys_vdd(enum sys_vdd_level level)
  2. {
  3. int rc, target_mv;
  4. static const int mv[NUM_SYS_VDD_LEVELS] = {
  5. [NONE...LOW] = 1000,
  6. [NOMINAL] = 1100,
  7. [HIGH] = 1200,
  8. };
  9.  
  10. target_mv = mv[level];
  11. rc = msm_proc_comm(PCOM_CLKCTL_RPC_MIN_MSMC1, &target_mv, NULL);
  12. if (rc)
  13. goto out;
  14. if (target_mv) {
  15. rc = -EINVAL;
  16. goto out;
  17. }
  18. out:
  19. return rc;
  20. }
Add Comment
Please, Sign In to add comment