Lines Matching +full:regulator +full:- +full:allow +full:- +full:bypass

1 // SPDX-License-Identifier: GPL-2.0-only
6 * Copyright (C) 2014-2020 NXP Semiconductors, All Rights Reserved.
14 #include <linux/regulator/consumer.h>
61 struct regulator *vddd_supply;
111 gpiod_set_value_cansleep(tfa989x->rcv_gpiod, ucontrol->value.enumerated.item[0]); in tfa989x_put_mode()
126 if (tfa989x->rev->rev == TFA9897_REVISION) in tfa989x_probe()
155 return -EINVAL; in tfa989x_find_sample_rate()
162 struct snd_soc_component *component = dai->component; in tfa989x_hw_params()
179 .name = "tfa989x-hifi",
196 /* temporarily allow access to hidden registers */ in tfa9890_init()
270 * no documentation for it - the public "short datasheets" do not provide
275 * rely on obscure firmware blobs for configuration (so-called "containers").
290 /* Clear CHSA to bypass DSP and take input from I2S 1 left channel */ in tfa989x_dsp_bypass()
314 regulator_disable(tfa989x->vddd_supply); in tfa989x_regulator_disable()
319 struct device *dev = &i2c->dev; in tfa989x_i2c_probe()
329 return -ENODEV; in tfa989x_i2c_probe()
334 return -ENOMEM; in tfa989x_i2c_probe()
336 tfa989x->rev = rev; in tfa989x_i2c_probe()
339 tfa989x->vddd_supply = devm_regulator_get(dev, "vddd"); in tfa989x_i2c_probe()
340 if (IS_ERR(tfa989x->vddd_supply)) in tfa989x_i2c_probe()
341 return dev_err_probe(dev, PTR_ERR(tfa989x->vddd_supply), in tfa989x_i2c_probe()
342 "Failed to get vddd regulator\n"); in tfa989x_i2c_probe()
344 if (tfa989x->rev->rev == TFA9897_REVISION) { in tfa989x_i2c_probe()
345 tfa989x->rcv_gpiod = devm_gpiod_get_optional(dev, "rcv", GPIOD_OUT_LOW); in tfa989x_i2c_probe()
346 if (IS_ERR(tfa989x->rcv_gpiod)) in tfa989x_i2c_probe()
347 return PTR_ERR(tfa989x->rcv_gpiod); in tfa989x_i2c_probe()
354 ret = regulator_enable(tfa989x->vddd_supply); in tfa989x_i2c_probe()
356 dev_err(dev, "Failed to enable vddd regulator: %d\n", ret); in tfa989x_i2c_probe()
364 /* Bypass regcache for reset and init sequence */ in tfa989x_i2c_probe()
377 if (val != rev->rev) { in tfa989x_i2c_probe()
379 rev->rev, val); in tfa989x_i2c_probe()
380 return -ENODEV; in tfa989x_i2c_probe()
389 ret = rev->init(regmap); in tfa989x_i2c_probe()
397 dev_err(dev, "failed to enable DSP bypass: %d\n", ret); in tfa989x_i2c_probe()