Lines Matching +full:buck +full:- +full:c
1 // SPDX-License-Identifier: GPL-2.0
3 // Copyright (c) 2017 MediaTek Inc.
12 #include <linux/regulator/mt6380-regulator.h>
81 * @modeset_reg: Register for controlling the buck/LDO control mode
82 * @modeset_mask: Mask for controlling the buck/LDO control mode
102 .n_voltages = ((max) - (min)) / (step) + 1, \
197 return -EINVAL; in mt6380_regulator_set_mode()
200 val <<= ffs(info->modeset_mask) - 1; in mt6380_regulator_set_mode()
202 return regmap_update_bits(rdev->regmap, info->modeset_reg, in mt6380_regulator_set_mode()
203 info->modeset_mask, val); in mt6380_regulator_set_mode()
213 ret = regmap_read(rdev->regmap, info->modeset_reg, &val); in mt6380_regulator_get_mode()
217 val &= info->modeset_mask; in mt6380_regulator_get_mode()
218 val >>= ffs(info->modeset_mask) - 1; in mt6380_regulator_get_mode()
228 return -EINVAL; in mt6380_regulator_get_mode()
271 MT6380_BUCK("buck-vcore1", VCPU, 600000, 1393750, 6250,
275 MT6380_BUCK("buck-vcore", VCORE, 600000, 1393750, 6250,
278 MT6380_BUCK("buck-vrf", VRF, 1200000, 1575000, 25000,
281 MT6380_LDO("ldo-vm", VMLDO, ldo_volt_table1, MT6380_LDO_CTRL_0,
283 MT6380_LDO("ldo-va", VALDO, ldo_volt_table2, MT6380_LDO_CTRL_0,
285 MT6380_REG_FIXED("ldo-vphy", VPHYLDO, MT6380_LDO_CTRL_0, 7, 1800000,
287 MT6380_LDO("ldo-vddr", VDDRLDO, ldo_volt_table3, MT6380_LDO_CTRL_0,
289 MT6380_LDO("ldo-vt", VTLDO, ldo_volt_table4, MT6380_LDO_CTRL_0, 3,
295 struct regmap *regmap = dev_get_regmap(pdev->dev.parent, NULL); in mt6380_regulator_probe()
301 config.dev = &pdev->dev; in mt6380_regulator_probe()
304 rdev = devm_regulator_register(&pdev->dev, in mt6380_regulator_probe()
308 dev_err(&pdev->dev, "failed to register %s\n", in mt6380_regulator_probe()
317 {"mt6380-regulator", 0},
323 { .compatible = "mediatek,mt6380-regulator", },
330 .name = "mt6380-regulator",