Lines Matching +full:vsel +full:- +full:active +full:- +full:high

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Voltage regulation driver for active-semi ACT8945A PMIC
16 #include <dt-bindings/regulator/active-semi,8945a-regulator.h>
52 #define ACT8945A_ENA 0x80 /* ON - [7] */
53 #define ACT8945A_VSEL_MASK 0x3F /* VSET - [5:0] */
84 struct regmap *regmap = rdev->regmap; in act8945a_set_suspend_state()
118 return -EINVAL; in act8945a_set_suspend_state()
157 struct regmap *regmap = rdev->regmap; in act8945a_set_mode()
184 return -EINVAL; in act8945a_set_mode()
197 return -EINVAL; in act8945a_set_mode()
204 act8945a->op_mode[id] = mode; in act8945a_set_mode()
215 return -EINVAL; in act8945a_get_mode()
217 return act8945a->op_mode[id]; in act8945a_get_mode()
283 act8945a = devm_kzalloc(&pdev->dev, sizeof(*act8945a), GFP_KERNEL); in act8945a_pmic_probe()
285 return -ENOMEM; in act8945a_pmic_probe()
287 act8945a->regmap = dev_get_regmap(pdev->dev.parent, NULL); in act8945a_pmic_probe()
288 if (!act8945a->regmap) { in act8945a_pmic_probe()
289 dev_err(&pdev->dev, in act8945a_pmic_probe()
291 return -EINVAL; in act8945a_pmic_probe()
294 voltage_select = of_property_read_bool(pdev->dev.parent->of_node, in act8945a_pmic_probe()
295 "active-semi,vsel-high"); in act8945a_pmic_probe()
305 config.dev = &pdev->dev; in act8945a_pmic_probe()
306 config.dev->of_node = pdev->dev.parent->of_node; in act8945a_pmic_probe()
309 rdev = devm_regulator_register(&pdev->dev, &regulators[i], in act8945a_pmic_probe()
312 dev_err(&pdev->dev, in act8945a_pmic_probe()
322 return regmap_write(act8945a->regmap, ACT8945A_SYS_UNLK_REGS, 0xef); in act8945a_pmic_probe()
333 return regmap_write(act8945a->regmap, ACT8945A_SYS_CTRL, 0x42); in act8945a_suspend()
345 regmap_write(act8945a->regmap, ACT8945A_SYS_CTRL, 0x0); in act8945a_pmic_shutdown()
350 .name = "act8945a-regulator",
359 MODULE_DESCRIPTION("Active-semi ACT8945A voltage regulator driver");