Lines Matching +full:vdd_lvs1 +full:- +full:supply

1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
12 #include <linux/soc/qcom/smd-rpm.h>
49 if (vreg->enabled_updated) { in rpm_reg_write_active()
52 req[reqlen].value = cpu_to_le32(vreg->is_enabled); in rpm_reg_write_active()
56 if (vreg->uv_updated && vreg->is_enabled) { in rpm_reg_write_active()
59 req[reqlen].value = cpu_to_le32(vreg->uV); in rpm_reg_write_active()
63 if (vreg->load_updated && vreg->is_enabled) { in rpm_reg_write_active()
66 req[reqlen].value = cpu_to_le32(vreg->load / 1000); in rpm_reg_write_active()
73 ret = qcom_rpm_smd_write(vreg->rpm, QCOM_SMD_RPM_ACTIVE_STATE, in rpm_reg_write_active()
74 vreg->type, vreg->id, in rpm_reg_write_active()
77 vreg->enabled_updated = 0; in rpm_reg_write_active()
78 vreg->uv_updated = 0; in rpm_reg_write_active()
79 vreg->load_updated = 0; in rpm_reg_write_active()
90 vreg->is_enabled = 1; in rpm_reg_enable()
91 vreg->enabled_updated = 1; in rpm_reg_enable()
95 vreg->is_enabled = 0; in rpm_reg_enable()
104 return vreg->is_enabled; in rpm_reg_is_enabled()
112 vreg->is_enabled = 0; in rpm_reg_disable()
113 vreg->enabled_updated = 1; in rpm_reg_disable()
117 vreg->is_enabled = 1; in rpm_reg_disable()
126 return vreg->uV; in rpm_reg_get_voltage()
136 int old_uV = vreg->uV; in rpm_reg_set_voltage()
138 vreg->uV = min_uV; in rpm_reg_set_voltage()
139 vreg->uv_updated = 1; in rpm_reg_set_voltage()
143 vreg->uV = old_uV; in rpm_reg_set_voltage()
151 u32 old_load = vreg->load; in rpm_reg_set_load()
154 vreg->load = load_uA; in rpm_reg_set_load()
155 vreg->load_updated = 1; in rpm_reg_set_load()
158 vreg->load = old_load; in rpm_reg_set_load()
792 const char *supply; member
950 { "lvs1", QCOM_SMD_RPM_VSA, 1, &pm8226_switch, "vdd_lvs1" },
1277 { "boost-bypass", QCOM_SMD_RPM_BBYB, 1, &pmi8994_bby, "vdd_bst_byp" },
1323 { .compatible = "qcom,rpm-mp5496-regulators", .data = &rpm_mp5496_regulators },
1324 { .compatible = "qcom,rpm-pm2250-regulators", .data = &rpm_pm2250_regulators },
1325 { .compatible = "qcom,rpm-pm6125-regulators", .data = &rpm_pm6125_regulators },
1326 { .compatible = "qcom,rpm-pm660-regulators", .data = &rpm_pm660_regulators },
1327 { .compatible = "qcom,rpm-pm660l-regulators", .data = &rpm_pm660l_regulators },
1328 { .compatible = "qcom,rpm-pm8226-regulators", .data = &rpm_pm8226_regulators },
1329 { .compatible = "qcom,rpm-pm8841-regulators", .data = &rpm_pm8841_regulators },
1330 { .compatible = "qcom,rpm-pm8909-regulators", .data = &rpm_pm8909_regulators },
1331 { .compatible = "qcom,rpm-pm8916-regulators", .data = &rpm_pm8916_regulators },
1332 { .compatible = "qcom,rpm-pm8941-regulators", .data = &rpm_pm8941_regulators },
1333 { .compatible = "qcom,rpm-pm8950-regulators", .data = &rpm_pm8950_regulators },
1334 { .compatible = "qcom,rpm-pm8953-regulators", .data = &rpm_pm8953_regulators },
1335 { .compatible = "qcom,rpm-pm8994-regulators", .data = &rpm_pm8994_regulators },
1336 { .compatible = "qcom,rpm-pm8998-regulators", .data = &rpm_pm8998_regulators },
1337 { .compatible = "qcom,rpm-pma8084-regulators", .data = &rpm_pma8084_regulators },
1338 { .compatible = "qcom,rpm-pmi8994-regulators", .data = &rpm_pmi8994_regulators },
1339 { .compatible = "qcom,rpm-pmi8998-regulators", .data = &rpm_pmi8998_regulators },
1340 { .compatible = "qcom,rpm-pmr735a-regulators", .data = &rpm_pmr735a_regulators },
1341 { .compatible = "qcom,rpm-pms405-regulators", .data = &rpm_pms405_regulators },
1347 * rpm_regulator_init_vreg() - initialize all attributes of a qcom_smd-regulator
1348 * @vreg: Pointer to the individual qcom_smd-regulator resource
1349 * @dev: Pointer to the top level qcom_smd-regulator PMIC device
1350 * @node: Pointer to the individual qcom_smd-regulator resource
1353 * @pmic_rpm_data: Pointer to a null-terminated array of qcom_smd-regulator
1367 for (rpm_data = pmic_rpm_data; rpm_data->name; rpm_data++) in rpm_regulator_init_vreg()
1368 if (of_node_name_eq(node, rpm_data->name)) in rpm_regulator_init_vreg()
1371 if (!rpm_data->name) { in rpm_regulator_init_vreg()
1373 return -EINVAL; in rpm_regulator_init_vreg()
1376 vreg->dev = dev; in rpm_regulator_init_vreg()
1377 vreg->rpm = rpm; in rpm_regulator_init_vreg()
1378 vreg->type = rpm_data->type; in rpm_regulator_init_vreg()
1379 vreg->id = rpm_data->id; in rpm_regulator_init_vreg()
1381 memcpy(&vreg->desc, rpm_data->desc, sizeof(vreg->desc)); in rpm_regulator_init_vreg()
1382 vreg->desc.name = rpm_data->name; in rpm_regulator_init_vreg()
1383 vreg->desc.supply_name = rpm_data->supply; in rpm_regulator_init_vreg()
1384 vreg->desc.owner = THIS_MODULE; in rpm_regulator_init_vreg()
1385 vreg->desc.type = REGULATOR_VOLTAGE; in rpm_regulator_init_vreg()
1386 vreg->desc.of_match = rpm_data->name; in rpm_regulator_init_vreg()
1392 rdev = devm_regulator_register(dev, &vreg->desc, &config); in rpm_regulator_init_vreg()
1404 struct device *dev = &pdev->dev; in rpm_reg_probe()
1411 rpm = dev_get_drvdata(pdev->dev.parent); in rpm_reg_probe()
1413 dev_err(&pdev->dev, "Unable to retrieve handle to rpm\n"); in rpm_reg_probe()
1414 return -ENODEV; in rpm_reg_probe()
1419 return -ENODEV; in rpm_reg_probe()
1421 for_each_available_child_of_node(dev->of_node, node) { in rpm_reg_probe()
1422 vreg = devm_kzalloc(&pdev->dev, sizeof(*vreg), GFP_KERNEL); in rpm_reg_probe()
1425 return -ENOMEM; in rpm_reg_probe()