• Home
  • Raw
  • Download

Lines Matching refs:pmic

89 static const struct rk8xx_reg_info *get_buck_reg(struct udevice *pmic,  in get_buck_reg()  argument
92 struct rk8xx_priv *priv = dev_get_priv(pmic); in get_buck_reg()
101 static int _buck_set_value(struct udevice *pmic, int buck, int uvolt) in _buck_set_value() argument
103 const struct rk8xx_reg_info *info = get_buck_reg(pmic, buck - 1); in _buck_set_value()
113 return pmic_clrsetbits(pmic, info->vsel_reg, mask, val); in _buck_set_value()
116 static int _buck_set_enable(struct udevice *pmic, int buck, bool enable) in _buck_set_enable() argument
124 ret = pmic_clrsetbits(pmic, REG_DCDC_ILMAX, 0, 3 << (buck * 2)); in _buck_set_enable()
127 ret = pmic_clrsetbits(pmic, REG_DCDC_UV_ACT, 1 << buck, 0); in _buck_set_enable()
132 return pmic_clrsetbits(pmic, REG_DCDC_EN, mask, enable ? mask : 0); in _buck_set_enable()
136 static const struct rk8xx_reg_info *get_ldo_reg(struct udevice *pmic, in get_ldo_reg() argument
139 struct rk8xx_priv *priv = dev_get_priv(pmic); in get_ldo_reg()
356 int rk8xx_spl_configure_buck(struct udevice *pmic, int buck, int uvolt) in rk8xx_spl_configure_buck() argument
360 ret = _buck_set_value(pmic, buck, uvolt); in rk8xx_spl_configure_buck()
364 return _buck_set_enable(pmic, buck, true); in rk8xx_spl_configure_buck()
367 int rk818_spl_configure_usb_input_current(struct udevice *pmic, int current_ma) in rk818_spl_configure_usb_input_current() argument
375 return pmic_clrsetbits(pmic, REG_USB_CTRL, RK818_USB_ILIM_SEL_MASK, i); in rk818_spl_configure_usb_input_current()
378 int rk818_spl_configure_usb_chrg_shutdown(struct udevice *pmic, int uvolt) in rk818_spl_configure_usb_chrg_shutdown() argument
386 return pmic_clrsetbits(pmic, REG_USB_CTRL, RK818_USB_CHG_SD_VSEL_MASK, in rk818_spl_configure_usb_chrg_shutdown()