Lines Matching +full:brownout +full:- +full:release +full:- +full:rate +full:- +full:ms

1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright 2013 - 2014 Maxim Integrated Products
107 struct snd_soc_component *c = snd_soc_dapm_to_component(w->dapm); in max98504_pcm_rx_ev()
112 regmap_write(max98504->regmap, MAX98504_PCM_RX_ENABLE, in max98504_pcm_rx_ev()
113 max98504->pcm_rx_channels); in max98504_pcm_rx_ev()
116 regmap_write(max98504->regmap, MAX98504_PCM_RX_ENABLE, 0); in max98504_pcm_rx_ev()
126 struct regmap *map = max98504->regmap; in max98504_component_probe()
129 ret = regulator_bulk_enable(MAX98504_NUM_SUPPLIES, max98504->supplies); in max98504_component_probe()
136 if (!max98504->brownout_enable) in max98504_component_probe()
142 (max98504->brownout_threshold & 0x1f) << 3 | in max98504_component_probe()
143 (max98504->brownout_attenuation & 0x3)); in max98504_component_probe()
146 max98504->brownout_attack_hold & 0xff); in max98504_component_probe()
149 max98504->brownout_timed_hold & 0xff); in max98504_component_probe()
152 max98504->brownout_release_rate & 0xff); in max98504_component_probe()
161 regulator_bulk_disable(MAX98504_NUM_SUPPLIES, max98504->supplies); in max98504_component_remove()
204 struct regmap *map = max98504->regmap; in max98504_set_tdm_slot()
207 switch (dai->id) { in max98504_set_tdm_slot()
210 max98504->pcm_rx_channels = rx_mask; in max98504_set_tdm_slot()
227 struct regmap *map = max98504->regmap; in max98504_set_channel_map()
234 switch (dai->id) { in max98504_set_channel_map()
267 .name = "max98504-aif2",
310 struct device *dev = &client->dev; in max98504_i2c_probe()
311 struct device_node *node = dev->of_node; in max98504_i2c_probe()
317 return -ENOMEM; in max98504_i2c_probe()
320 if (!of_property_read_u32(node, "maxim,brownout-threshold", in max98504_i2c_probe()
321 &max98504->brownout_threshold)) in max98504_i2c_probe()
322 max98504->brownout_enable = true; in max98504_i2c_probe()
324 of_property_read_u32(node, "maxim,brownout-attenuation", in max98504_i2c_probe()
325 &max98504->brownout_attenuation); in max98504_i2c_probe()
326 of_property_read_u32(node, "maxim,brownout-attack-hold-ms", in max98504_i2c_probe()
327 &max98504->brownout_attack_hold); in max98504_i2c_probe()
328 of_property_read_u32(node, "maxim,brownout-timed-hold-ms", in max98504_i2c_probe()
329 &max98504->brownout_timed_hold); in max98504_i2c_probe()
330 of_property_read_u32(node, "maxim,brownout-release-rate-ms", in max98504_i2c_probe()
331 &max98504->brownout_release_rate); in max98504_i2c_probe()
334 max98504->regmap = devm_regmap_init_i2c(client, &max98504_regmap); in max98504_i2c_probe()
335 if (IS_ERR(max98504->regmap)) { in max98504_i2c_probe()
336 ret = PTR_ERR(max98504->regmap); in max98504_i2c_probe()
337 dev_err(&client->dev, "regmap initialization failed: %d\n", ret); in max98504_i2c_probe()
342 max98504->supplies[i].supply = max98504_supply_names[i]; in max98504_i2c_probe()
345 max98504->supplies); in max98504_i2c_probe()