Lines Matching +full:db8500 +full:- +full:prcmu

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson SA 2010
5 * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
6 * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
8 * Power domain regulators on DB8500
16 #include <linux/mfd/dbx500-prcmu.h>
19 #include <linux/regulator/db8500-prcmu.h>
23 #include "dbx500-prcmu.h"
30 return -EINVAL; in db8500_regulator_enable()
32 dev_vdbg(rdev_get_dev(rdev), "regulator-%s-enable\n", in db8500_regulator_enable()
33 info->desc.name); in db8500_regulator_enable()
35 if (!info->is_enabled) { in db8500_regulator_enable()
36 info->is_enabled = true; in db8500_regulator_enable()
37 if (!info->exclude_from_power_state) in db8500_regulator_enable()
50 return -EINVAL; in db8500_regulator_disable()
52 dev_vdbg(rdev_get_dev(rdev), "regulator-%s-disable\n", in db8500_regulator_disable()
53 info->desc.name); in db8500_regulator_disable()
55 if (info->is_enabled) { in db8500_regulator_disable()
56 info->is_enabled = false; in db8500_regulator_disable()
57 if (!info->exclude_from_power_state) in db8500_regulator_disable()
69 return -EINVAL; in db8500_regulator_is_enabled()
71 dev_vdbg(rdev_get_dev(rdev), "regulator-%s-is_enabled (is_enabled):" in db8500_regulator_is_enabled()
72 " %i\n", info->desc.name, info->is_enabled); in db8500_regulator_is_enabled()
74 return info->is_enabled; in db8500_regulator_is_enabled()
77 /* db8500 regulator operations */
147 return -EINVAL; in db8500_regulator_switch_enable()
149 dev_vdbg(rdev_get_dev(rdev), "regulator-switch-%s-enable\n", in db8500_regulator_switch_enable()
150 info->desc.name); in db8500_regulator_switch_enable()
152 ret = enable_epod(info->epod_id, info->is_ramret); in db8500_regulator_switch_enable()
155 "regulator-switch-%s-enable: prcmu call failed\n", in db8500_regulator_switch_enable()
156 info->desc.name); in db8500_regulator_switch_enable()
160 info->is_enabled = true; in db8500_regulator_switch_enable()
171 return -EINVAL; in db8500_regulator_switch_disable()
173 dev_vdbg(rdev_get_dev(rdev), "regulator-switch-%s-disable\n", in db8500_regulator_switch_disable()
174 info->desc.name); in db8500_regulator_switch_disable()
176 ret = disable_epod(info->epod_id, info->is_ramret); in db8500_regulator_switch_disable()
179 "regulator_switch-%s-disable: prcmu call failed\n", in db8500_regulator_switch_disable()
180 info->desc.name); in db8500_regulator_switch_disable()
184 info->is_enabled = false; in db8500_regulator_switch_disable()
194 return -EINVAL; in db8500_regulator_switch_is_enabled()
197 "regulator-switch-%s-is_enabled (is_enabled): %i\n", in db8500_regulator_switch_is_enabled()
198 info->desc.name, info->is_enabled); in db8500_regulator_switch_is_enabled()
200 return info->is_enabled; in db8500_regulator_switch_is_enabled()
216 .name = "db8500-vape",
226 .name = "db8500-varm",
236 .name = "db8500-vmodem",
246 .name = "db8500-vpll",
256 .name = "db8500-vsmps1",
266 .name = "db8500-vsmps2",
279 .name = "db8500-vsmps3",
289 .name = "db8500-vrf1",
299 .name = "db8500-sva-mmdsp",
310 .name = "db8500-sva-mmdsp-ret",
322 .name = "db8500-sva-pipe",
333 .name = "db8500-sia-mmdsp",
344 .name = "db8500-sia-mmdsp-ret",
356 .name = "db8500-sia-pipe",
367 .name = "db8500-sga",
378 .name = "db8500-b2r2-mcde",
389 .name = "db8500-esram12",
401 .name = "db8500-esram12-ret",
413 .name = "db8500-esram34",
425 .name = "db8500-esram34-ret",
445 db8500_init_data = dev_get_platdata(&pdev->dev); in db8500_regulator_probe()
448 /* assign per-regulator data */ in db8500_regulator_probe()
452 config.dev = &pdev->dev; in db8500_regulator_probe()
456 rdev = devm_regulator_register(&pdev->dev, &info->desc, in db8500_regulator_probe()
460 dev_err(&pdev->dev, "failed to register %s: err %i\n", in db8500_regulator_probe()
461 info->desc.name, err); in db8500_regulator_probe()
464 dev_dbg(&pdev->dev, "regulator-%s-probed\n", info->desc.name); in db8500_regulator_probe()
479 .name = "db8500-prcmu-regulators",
499 MODULE_AUTHOR("STMicroelectronics/ST-Ericsson");
500 MODULE_DESCRIPTION("DB8500 regulator driver");