• Home
  • Raw
  • Download

Lines Matching full:buck

3  * TI LP8788 MFD - buck regulator driver
94 /* BUCK 1 ~ 4 voltage ranges */
100 static void lp8788_buck1_set_dvs(struct lp8788_buck *buck) in lp8788_buck1_set_dvs() argument
102 struct lp8788_buck1_dvs *dvs = (struct lp8788_buck1_dvs *)buck->dvs; in lp8788_buck1_set_dvs()
113 static void lp8788_buck2_set_dvs(struct lp8788_buck *buck) in lp8788_buck2_set_dvs() argument
115 struct lp8788_buck2_dvs *dvs = (struct lp8788_buck2_dvs *)buck->dvs; in lp8788_buck2_set_dvs()
149 static void lp8788_set_dvs(struct lp8788_buck *buck, enum lp8788_buck_id id) in lp8788_set_dvs() argument
153 lp8788_buck1_set_dvs(buck); in lp8788_set_dvs()
156 lp8788_buck2_set_dvs(buck); in lp8788_set_dvs()
164 lp8788_get_buck_dvs_ctrl_mode(struct lp8788_buck *buck, enum lp8788_buck_id id) in lp8788_get_buck_dvs_ctrl_mode() argument
179 lp8788_read_byte(buck->lp, LP8788_BUCK_DVS_SEL, &val); in lp8788_get_buck_dvs_ctrl_mode()
201 static u8 lp8788_select_buck_vout_addr(struct lp8788_buck *buck, in lp8788_select_buck_vout_addr() argument
204 enum lp8788_dvs_mode mode = lp8788_get_buck_dvs_ctrl_mode(buck, id); in lp8788_select_buck_vout_addr()
213 b1_dvs = (struct lp8788_buck1_dvs *)buck->dvs; in lp8788_select_buck_vout_addr()
219 lp8788_read_byte(buck->lp, LP8788_BUCK_DVS_SEL, &val); in lp8788_select_buck_vout_addr()
226 b2_dvs = (struct lp8788_buck2_dvs *)buck->dvs; in lp8788_select_buck_vout_addr()
242 lp8788_read_byte(buck->lp, LP8788_BUCK_DVS_SEL, &val); in lp8788_select_buck_vout_addr()
259 struct lp8788_buck *buck = rdev_get_drvdata(rdev); in lp8788_buck12_set_voltage_sel() local
263 if (buck->dvs) in lp8788_buck12_set_voltage_sel()
264 lp8788_set_dvs(buck, id); in lp8788_buck12_set_voltage_sel()
266 addr = lp8788_select_buck_vout_addr(buck, id); in lp8788_buck12_set_voltage_sel()
270 return lp8788_update_bits(buck->lp, addr, LP8788_VOUT_M, selector); in lp8788_buck12_set_voltage_sel()
275 struct lp8788_buck *buck = rdev_get_drvdata(rdev); in lp8788_buck12_get_voltage_sel() local
280 addr = lp8788_select_buck_vout_addr(buck, id); in lp8788_buck12_get_voltage_sel()
284 ret = lp8788_read_byte(buck->lp, addr, &val); in lp8788_buck12_get_voltage_sel()
293 struct lp8788_buck *buck = rdev_get_drvdata(rdev); in lp8788_buck_enable_time() local
297 if (lp8788_read_byte(buck->lp, addr, &val)) in lp8788_buck_enable_time()
307 struct lp8788_buck *buck = rdev_get_drvdata(rdev); in lp8788_buck_set_mode() local
323 return lp8788_update_bits(buck->lp, LP8788_BUCK_PWM, mask, val); in lp8788_buck_set_mode()
328 struct lp8788_buck *buck = rdev_get_drvdata(rdev); in lp8788_buck_get_mode() local
333 ret = lp8788_read_byte(buck->lp, LP8788_BUCK_PWM, &val); in lp8788_buck_get_mode()
423 struct lp8788_buck *buck, in lp8788_dvs_gpio_request() argument
426 struct lp8788_platform_data *pdata = buck->lp->pdata; in lp8788_dvs_gpio_request()
439 buck->dvs = pdata->buck1_dvs; in lp8788_dvs_gpio_request()
449 buck->dvs = pdata->buck2_dvs; in lp8788_dvs_gpio_request()
459 struct lp8788_buck *buck, enum lp8788_buck_id id) in lp8788_init_dvs() argument
461 struct lp8788_platform_data *pdata = buck->lp->pdata; in lp8788_init_dvs()
478 if (lp8788_dvs_gpio_request(pdev, buck, id)) in lp8788_init_dvs()
481 return lp8788_update_bits(buck->lp, LP8788_BUCK_DVS_SEL, mask[id], in lp8788_init_dvs()
485 return lp8788_update_bits(buck->lp, LP8788_BUCK_DVS_SEL, mask[id], in lp8788_init_dvs()
493 struct lp8788_buck *buck; in lp8788_buck_probe() local
501 buck = devm_kzalloc(&pdev->dev, sizeof(struct lp8788_buck), GFP_KERNEL); in lp8788_buck_probe()
502 if (!buck) in lp8788_buck_probe()
505 buck->lp = lp; in lp8788_buck_probe()
507 ret = lp8788_init_dvs(pdev, buck, id); in lp8788_buck_probe()
513 cfg.driver_data = buck; in lp8788_buck_probe()
519 dev_err(&pdev->dev, "BUCK%d regulator register err = %d\n", in lp8788_buck_probe()
524 buck->regulator = rdev; in lp8788_buck_probe()
525 platform_set_drvdata(pdev, buck); in lp8788_buck_probe()
549 MODULE_DESCRIPTION("TI LP8788 BUCK Driver");
552 MODULE_ALIAS("platform:lp8788-buck");