Lines Matching +full:buck +full:- +full:c
1 // SPDX-License-Identifier: GPL-2.0
3 // Copyright (c) 2022 MediaTek Inc.
4 // Copyright (c) 2022 BayLibre, SAS.
9 // Based on mt6397-regulator.c
20 #include <linux/regulator/mt6357-regulator.h>
27 * @da_vsel_reg: Monitor register for query buck's voltage.
28 * @da_vsel_mask: Mask for query buck's voltage.
47 .n_voltages = ((max) - (min)) / (step) + 1, \
90 .n_voltages = ((max) - (min)) / (step) + 1, \
120 * mt6357_get_buck_voltage_sel - get_voltage_sel for regmap users
133 ret = regmap_read(rdev->regmap, info->da_vsel_reg, ®val); in mt6357_get_buck_voltage_sel()
135 dev_err(&rdev->dev, in mt6357_get_buck_voltage_sel()
136 "Failed to get mt6357 Buck %s vsel reg: %d\n", in mt6357_get_buck_voltage_sel()
137 info->desc.name, ret); in mt6357_get_buck_voltage_sel()
141 regval &= info->da_vsel_mask; in mt6357_get_buck_voltage_sel()
142 regval >>= ffs(info->da_vsel_mask) - 1; in mt6357_get_buck_voltage_sel()
344 MT6357_BUCK("buck-vcore", VCORE, 518750, 1312500, 6250,
346 MT6357_BUCK("buck-vproc", VPROC, 518750, 1312500, 6250,
348 MT6357_BUCK("buck-vmodem", VMODEM, 500000, 1293750, 6250,
350 MT6357_BUCK("buck-vpa", VPA, 500000, 3650000, 50000,
352 MT6357_BUCK("buck-vs1", VS1, 1200000, 2787500, 12500,
356 MT6357_LDO("ldo-vcama", VCAMA, vcama_voltages,
358 MT6357_LDO("ldo-vcamd", VCAMD, vcamd_voltages,
360 MT6357_LDO("ldo-vcn33-bt", VCN33_BT, vcn33_voltages,
362 MT6357_LDO("ldo-vcn33-wifi", VCN33_WIFI, vcn33_voltages,
364 MT6357_LDO("ldo-vdram", VDRAM, vdram_voltages,
366 MT6357_LDO("ldo-vefuse", VEFUSE, vefuse_voltages,
368 MT6357_LDO("ldo-vemc", VEMC, vemc_voltages,
370 MT6357_LDO("ldo-vibr", VIBR, vibr_voltages,
372 MT6357_LDO("ldo-vldo28", VLDO28, vldo28_voltages,
374 MT6357_LDO("ldo-vmc", VMC, vmc_voltages,
376 MT6357_LDO("ldo-vmch", VMCH, vmch_voltages,
378 MT6357_LDO("ldo-vsim1", VSIM1, vsim_voltages,
380 MT6357_LDO("ldo-vsim2", VSIM2, vsim_voltages,
382 MT6357_LDO("ldo-vusb33", VUSB33, vusb_voltages,
384 MT6357_LDO("ldo-vxo22", VXO22, vxo22_voltages,
387 MT6357_LDO1("ldo-vsram-proc", VSRAM_PROC, 518750, 1312500, 6250,
390 MT6357_LDO1("ldo-vsram-others", VSRAM_OTHERS, 518750, 1312500, 6250,
394 MT6357_REG_FIXED("ldo-vaud28", VAUD28, 2800000),
395 MT6357_REG_FIXED("ldo-vaux18", VAUX18, 1800000),
396 MT6357_REG_FIXED("ldo-vcamio18", VCAMIO, 1800000),
397 MT6357_REG_FIXED("ldo-vcn18", VCN18, 1800000),
398 MT6357_REG_FIXED("ldo-vcn28", VCN28, 2800000),
399 MT6357_REG_FIXED("ldo-vfe28", VFE28, 2800000),
400 MT6357_REG_FIXED("ldo-vio18", VIO18, 1800000),
401 MT6357_REG_FIXED("ldo-vio28", VIO28, 2800000),
402 MT6357_REG_FIXED("ldo-vrf12", VRF12, 1200000),
403 MT6357_REG_FIXED("ldo-vrf18", VRF18, 1800000),
408 struct mt6397_chip *mt6357 = dev_get_drvdata(pdev->dev.parent); in mt6357_regulator_probe()
413 pdev->dev.of_node = pdev->dev.parent->of_node; in mt6357_regulator_probe()
416 config.dev = &pdev->dev; in mt6357_regulator_probe()
418 config.regmap = mt6357->regmap; in mt6357_regulator_probe()
420 rdev = devm_regulator_register(&pdev->dev, in mt6357_regulator_probe()
424 dev_err(&pdev->dev, "failed to register %s\n", in mt6357_regulator_probe()
434 { "mt6357-regulator" },
441 .name = "mt6357-regulator",