Lines Matching +full:vdddig +full:- +full:supply
1 // SPDX-License-Identifier: GPL-2.0-only
7 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
41 { "vdddig", 1800000, 1800000, 10000 },
52 { "vdddig", 1200000, 1225000, 10000 },
63 { "vdddig", 1800000, 1800000, 10000 },
73 ret = regulator_bulk_enable(iris->num_vregs, iris->vregs); in qcom_iris_enable()
77 ret = clk_prepare_enable(iris->xo_clk); in qcom_iris_enable()
79 dev_err(&iris->dev, "failed to enable xo clk\n"); in qcom_iris_enable()
86 regulator_bulk_disable(iris->num_vregs, iris->vregs); in qcom_iris_enable()
93 clk_disable_unprepare(iris->xo_clk); in qcom_iris_disable()
94 regulator_bulk_disable(iris->num_vregs, iris->vregs); in qcom_iris_disable()
109 of_node_put(iris->dev.of_node); in qcom_iris_release()
122 of_node = of_get_child_by_name(parent->of_node, "iris"); in qcom_iris_probe()
125 return ERR_PTR(-EINVAL); in qcom_iris_probe()
131 return ERR_PTR(-ENOMEM); in qcom_iris_probe()
134 device_initialize(&iris->dev); in qcom_iris_probe()
135 iris->dev.parent = parent; in qcom_iris_probe()
136 iris->dev.release = qcom_iris_release; in qcom_iris_probe()
137 iris->dev.of_node = of_node; in qcom_iris_probe()
139 dev_set_name(&iris->dev, "%s.iris", dev_name(parent)); in qcom_iris_probe()
141 ret = device_add(&iris->dev); in qcom_iris_probe()
143 put_device(&iris->dev); in qcom_iris_probe()
147 match = of_match_device(iris_of_match, &iris->dev); in qcom_iris_probe()
149 dev_err(&iris->dev, "no matching compatible for iris\n"); in qcom_iris_probe()
150 ret = -EINVAL; in qcom_iris_probe()
154 data = match->data; in qcom_iris_probe()
156 iris->xo_clk = devm_clk_get(&iris->dev, "xo"); in qcom_iris_probe()
157 if (IS_ERR(iris->xo_clk)) { in qcom_iris_probe()
158 ret = PTR_ERR(iris->xo_clk); in qcom_iris_probe()
159 if (ret != -EPROBE_DEFER) in qcom_iris_probe()
160 dev_err(&iris->dev, "failed to acquire xo clk\n"); in qcom_iris_probe()
164 iris->num_vregs = data->num_vregs; in qcom_iris_probe()
165 iris->vregs = devm_kcalloc(&iris->dev, in qcom_iris_probe()
166 iris->num_vregs, in qcom_iris_probe()
169 if (!iris->vregs) { in qcom_iris_probe()
170 ret = -ENOMEM; in qcom_iris_probe()
174 for (i = 0; i < iris->num_vregs; i++) in qcom_iris_probe()
175 iris->vregs[i].supply = data->vregs[i].name; in qcom_iris_probe()
177 ret = devm_regulator_bulk_get(&iris->dev, iris->num_vregs, iris->vregs); in qcom_iris_probe()
179 dev_err(&iris->dev, "failed to get regulators\n"); in qcom_iris_probe()
183 for (i = 0; i < iris->num_vregs; i++) { in qcom_iris_probe()
184 if (data->vregs[i].max_voltage) in qcom_iris_probe()
185 regulator_set_voltage(iris->vregs[i].consumer, in qcom_iris_probe()
186 data->vregs[i].min_voltage, in qcom_iris_probe()
187 data->vregs[i].max_voltage); in qcom_iris_probe()
189 if (data->vregs[i].load_uA) in qcom_iris_probe()
190 regulator_set_load(iris->vregs[i].consumer, in qcom_iris_probe()
191 data->vregs[i].load_uA); in qcom_iris_probe()
194 *use_48mhz_xo = data->use_48mhz_xo; in qcom_iris_probe()
199 device_del(&iris->dev); in qcom_iris_probe()
206 device_del(&iris->dev); in qcom_iris_remove()