Lines Matching +full:wcd9340 +full:- +full:gpio

1 // SPDX-License-Identifier: GPL-2.0
5 #include <linux/gpio/consumer.h>
36 .name = "wcd934x-codec",
38 .name = "wcd934x-gpio",
39 .of_compatible = "qcom,wcd9340-gpio",
41 .name = "wcd934x-soundwire",
42 .of_compatible = "qcom,soundwire-v1.3.0",
125 struct regmap *regmap = ddata->regmap; in wcd934x_bring_up()
139 dev_info(ddata->dev, "WCD934x chip id major 0x%x, minor 0x%x\n", in wcd934x_bring_up()
158 struct device *dev = &sdev->dev; in wcd934x_slim_status_up()
164 ddata->regmap = regmap_init_slimbus(sdev, &wcd934x_regmap_config); in wcd934x_slim_status_up()
165 if (IS_ERR(ddata->regmap)) { in wcd934x_slim_status_up()
167 return PTR_ERR(ddata->regmap); in wcd934x_slim_status_up()
176 ret = devm_regmap_add_irq_chip(dev, ddata->regmap, ddata->irq, in wcd934x_slim_status_up()
179 &ddata->irq_data); in wcd934x_slim_status_up()
203 mfd_remove_devices(&sdev->dev); in wcd934x_slim_status()
206 return -EINVAL; in wcd934x_slim_status()
214 struct device *dev = &sdev->dev; in wcd934x_slim_probe()
215 struct device_node *np = dev->of_node; in wcd934x_slim_probe()
222 return -ENOMEM; in wcd934x_slim_probe()
224 ddata->irq = of_irq_get(np, 0); in wcd934x_slim_probe()
225 if (ddata->irq < 0) in wcd934x_slim_probe()
226 return dev_err_probe(ddata->dev, ddata->irq, in wcd934x_slim_probe()
229 ddata->extclk = devm_clk_get(dev, "extclk"); in wcd934x_slim_probe()
230 if (IS_ERR(ddata->extclk)) in wcd934x_slim_probe()
231 return dev_err_probe(dev, PTR_ERR(ddata->extclk), in wcd934x_slim_probe()
234 ddata->supplies[0].supply = "vdd-buck"; in wcd934x_slim_probe()
235 ddata->supplies[1].supply = "vdd-buck-sido"; in wcd934x_slim_probe()
236 ddata->supplies[2].supply = "vdd-tx"; in wcd934x_slim_probe()
237 ddata->supplies[3].supply = "vdd-rx"; in wcd934x_slim_probe()
238 ddata->supplies[4].supply = "vdd-io"; in wcd934x_slim_probe()
240 ret = regulator_bulk_get(dev, WCD934X_MAX_SUPPLY, ddata->supplies); in wcd934x_slim_probe()
244 ret = regulator_bulk_enable(WCD934X_MAX_SUPPLY, ddata->supplies); in wcd934x_slim_probe()
257 "Failed to get reset gpio\n"); in wcd934x_slim_probe()
264 ddata->dev = dev; in wcd934x_slim_probe()
270 regulator_bulk_disable(WCD934X_MAX_SUPPLY, ddata->supplies); in wcd934x_slim_probe()
276 struct wcd934x_ddata *ddata = dev_get_drvdata(&sdev->dev); in wcd934x_slim_remove()
278 regulator_bulk_disable(WCD934X_MAX_SUPPLY, ddata->supplies); in wcd934x_slim_remove()
279 mfd_remove_devices(&sdev->dev); in wcd934x_slim_remove()
291 .name = "wcd934x-slim",