Lines Matching refs:mV
120 static inline unsigned int wm8350_ldo_mvolts_to_val(int mV)
122 if (mV < 1800)
123 return (mV - 900) / 50;
125 return ((mV - 1800) / 100) + 16;
133 static inline unsigned int wm8350_dcdc_mvolts_to_val(int mV)
135 return (mV - 850) / 25;
366 int volt_reg, dcdc = rdev_get_id(rdev), mV,
375 /* step size is 25mV */
376 mV = (min_mV - 826) / 25;
377 if (wm8350_dcdc_val_to_mvolts(mV) > max_mV)
379 BUG_ON(wm8350_dcdc_val_to_mvolts(mV) < min_mV);
400 /* all DCDCs have same mV bits */
402 wm8350_reg_write(wm8350, volt_reg, val | mV);
431 /* all DCDCs have same mV bits */
447 int volt_reg, mV = uV / 1000, dcdc = rdev_get_id(rdev);
450 dev_dbg(wm8350->dev, "%s %d mV %d\n", __func__, dcdc, mV);
452 if (mV && (mV < 850 || mV > 4025)) {
454 "DCDC%d suspend voltage %d mV out of range\n",
455 dcdc, mV);
458 if (mV == 0)
459 mV = 850;
480 /* all DCDCs have same mV bits */
483 val | wm8350_dcdc_mvolts_to_val(mV));
663 int volt_reg, mV = uV / 1000, ldo = rdev_get_id(rdev);
666 dev_dbg(wm8350->dev, "%s %d mV %d\n", __func__, ldo, mV);
668 if (mV < 900 || mV > 3300) {
669 dev_err(wm8350->dev, "LDO%d voltage %d mV out of range\n",
670 ldo, mV);
691 /* all LDOs have same mV bits */
694 val | wm8350_ldo_mvolts_to_val(mV));
721 /* all LDOs have same mV bits */
750 /* all LDOs have same mV bits */
760 int volt_reg, ldo = rdev_get_id(rdev), mV, min_mV = min_uV / 1000,
770 /* step size is 50mV < 1800mV */
771 mV = (min_mV - 851) / 50;
772 if (wm8350_ldo_val_to_mvolts(mV) > max_mV)
774 BUG_ON(wm8350_ldo_val_to_mvolts(mV) < min_mV);
776 /* step size is 100mV > 1800mV */
777 mV = ((min_mV - 1701) / 100) + 16;
778 if (wm8350_ldo_val_to_mvolts(mV) > max_mV)
780 BUG_ON(wm8350_ldo_val_to_mvolts(mV) < min_mV);
800 /* all LDOs have same mV bits */
802 wm8350_reg_write(wm8350, volt_reg, val | mV);
829 /* all LDOs have same mV bits */