Lines Matching +full:- +full:30 +full:mv

1 // SPDX-License-Identifier: GPL-2.0-only
4 // bd71815-regulator.c ROHM BD71815 regulator driver
22 #include <linux/mfd/rohm-generic.h>
23 #include <linux/mfd/rohm-bd71815.h>
32 10, 20, 30, 50, 70, 100, 200, 300, 500, 700, 1000, 2000, 3000, 4000,
180 return rohm_regulator_set_dvs_levels(data->dvs, np, desc, cfg->regmap); in set_hw_dvs_levels()
186 * by a control bit in register - or by HW state. If HW state specific voltages
187 * are given - then we assume HW state based control should be used.
189 * If volatge value is updated to currently selected register - then output
204 if (of_find_property(np, "rohm,dvs-run-voltage", NULL) || in buck12_set_hw_dvs_levels()
205 of_find_property(np, "rohm,dvs-suspend-voltage", NULL) || in buck12_set_hw_dvs_levels()
206 of_find_property(np, "rohm,dvs-lpsr-voltage", NULL) || in buck12_set_hw_dvs_levels()
207 of_find_property(np, "rohm,dvs-snvs-voltage", NULL)) { in buck12_set_hw_dvs_levels()
208 ret = regmap_read(cfg->regmap, desc->vsel_reg, &val); in buck12_set_hw_dvs_levels()
222 ret = regmap_read(cfg->regmap, desc->vsel_reg + 1, in buck12_set_hw_dvs_levels()
227 ret = regmap_update_bits(cfg->regmap, desc->vsel_reg, in buck12_set_hw_dvs_levels()
234 ret = rohm_regulator_set_dvs_levels(data->dvs, np, desc, in buck12_set_hw_dvs_levels()
235 cfg->regmap); in buck12_set_hw_dvs_levels()
239 * DVS levels were given => use HW-state machine for voltage in buck12_set_hw_dvs_levels()
241 * by SW the ramp-rate is not respected. Should we disable in buck12_set_hw_dvs_levels()
244 ret = regmap_update_bits(cfg->regmap, desc->vsel_reg, in buck12_set_hw_dvs_levels()
255 * 00: 10.00mV/usec 10mV 1uS
256 * 01: 5.00mV/usec 10mV 2uS
257 * 10: 2.50mV/usec 10mV 4uS
258 * 11: 1.25mV/usec 10mV 8uS
303 ret = regmap_read(rdev->regmap, regh, &val); in bd7181x_buck12_get_voltage_sel()
308 * If we use HW state machine based voltage reg selection - then we in bd7181x_buck12_get_voltage_sel()
315 ret = regmap_read(rdev->regmap, regl, &val); in bd7181x_buck12_get_voltage_sel()
335 ret = regmap_read(rdev->regmap, regh, &val); in bd7181x_buck12_set_voltage_sel()
340 * If bucks 1 & 2 are controlled by state machine - then the RUN state in bd7181x_buck12_set_voltage_sel()
345 return regmap_update_bits(rdev->regmap, regh, BD71815_VOLT_MASK, in bd7181x_buck12_set_voltage_sel()
354 ret = regmap_update_bits(rdev->regmap, reg, BD71815_VOLT_MASK, sel); in bd7181x_buck12_set_voltage_sel()
359 return regmap_update_bits(rdev->regmap, regh, BD71815_BUCK_DVSSEL, in bd7181x_buck12_set_voltage_sel()
433 .n_voltages = ((max) - (min)) / (step) + 1, \
456 .n_voltages = ((max) - (min)) / (step) + 1, \
502 .n_voltages = ((max) - (min)) / (step) + 1, \
569 regmap = dev_get_regmap(pdev->dev.parent, NULL); in bd7181x_probe()
571 dev_err(&pdev->dev, "No parent regmap\n"); in bd7181x_probe()
572 return -ENODEV; in bd7181x_probe()
575 ldo4_en = devm_fwnode_gpiod_get(&pdev->dev, in bd7181x_probe()
576 dev_fwnode(pdev->dev.parent), in bd7181x_probe()
577 "rohm,vsel", GPIOD_ASIS, "ldo4-en"); in bd7181x_probe()
580 if (ret != -ENOENT) in bd7181x_probe()
585 /* Disable to go to ship-mode */ in bd7181x_probe()
590 config.dev = pdev->dev.parent; in bd7181x_probe()
604 rdev = devm_regulator_register(&pdev->dev, desc, &config); in bd7181x_probe()
606 dev_err(&pdev->dev, in bd7181x_probe()
608 desc->name); in bd7181x_probe()
616 { "bd71815-pmic", ROHM_CHIP_TYPE_BD71815 },
623 .name = "bd7181x-pmic",
633 MODULE_ALIAS("platform:bd7181x-pmic");