Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: cs530x: Sort #include directives and tydy up whitespaces

Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Link: https://patch.msgid.link/20251023090327.58275-3-vitalyr@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Vitaly Rodionov and committed by
Mark Brown
1e0722a7 ca4d49f8

+23 -28
+1 -1
sound/soc/codecs/cs530x-i2c.c
··· 48 48 cs530x->regmap = devm_regmap_init_i2c(client, &cs530x_regmap); 49 49 if (IS_ERR(cs530x->regmap)) 50 50 return dev_err_probe(&client->dev, PTR_ERR(cs530x->regmap), 51 - "Failed to allocate register map\n"); 51 + "Failed to allocate register map\n"); 52 52 53 53 cs530x->devtype = (uintptr_t)i2c_get_match_data(client); 54 54 cs530x->dev = &client->dev;
+22 -27
sound/soc/codecs/cs530x.c
··· 5 5 // Copyright (C) 2024-2025 Cirrus Logic, Inc. and 6 6 // Cirrus Logic International Semiconductor Ltd. 7 7 8 - #include <sound/core.h> 9 8 #include <linux/delay.h> 10 9 #include <linux/i2c.h> 11 10 #include <linux/init.h> 12 - #include <sound/initval.h> 13 11 #include <linux/module.h> 14 - #include <sound/pcm.h> 15 - #include <sound/pcm_params.h> 16 12 #include <linux/pm.h> 17 13 #include <linux/property.h> 18 14 #include <linux/slab.h> 15 + #include <sound/core.h> 16 + #include <sound/initval.h> 17 + #include <sound/pcm.h> 18 + #include <sound/pcm_params.h> 19 19 #include <sound/soc.h> 20 20 #include <sound/tlv.h> 21 21 ··· 104 104 } 105 105 106 106 static int cs530x_put_volsw_vu(struct snd_kcontrol *kcontrol, 107 - struct snd_ctl_elem_value *ucontrol) 107 + struct snd_ctl_elem_value *ucontrol) 108 108 { 109 109 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 110 110 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); ··· 224 224 }; 225 225 226 226 static int cs530x_adc_event(struct snd_soc_dapm_widget *w, 227 - struct snd_kcontrol *kcontrol, int event) 227 + struct snd_kcontrol *kcontrol, int event) 228 228 { 229 229 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); 230 230 struct cs530x_priv *cs530x = snd_soc_component_get_drvdata(component); ··· 236 236 break; 237 237 case SND_SOC_DAPM_POST_PMU: 238 238 regmap_clear_bits(regmap, CS530X_IN_VOL_CTRL1_0 + 239 - (w->shift * 2), CS530X_IN_MUTE); 239 + (w->shift * 2), CS530X_IN_MUTE); 240 240 regmap_clear_bits(regmap, CS530X_IN_VOL_CTRL1_0 + 241 - ((w->shift+1) * 2), CS530X_IN_MUTE); 241 + ((w->shift + 1) * 2), CS530X_IN_MUTE); 242 242 243 243 cs530x->adc_pairs_count--; 244 244 if (!cs530x->adc_pairs_count) { ··· 249 249 break; 250 250 case SND_SOC_DAPM_PRE_PMD: 251 251 regmap_set_bits(regmap, CS530X_IN_VOL_CTRL1_0 + 252 - (w->shift * 2), CS530X_IN_MUTE); 252 + (w->shift * 2), CS530X_IN_MUTE); 253 253 regmap_set_bits(regmap, CS530X_IN_VOL_CTRL1_0 + 254 - ((w->shift+1) * 2), CS530X_IN_MUTE); 254 + ((w->shift + 1) * 2), CS530X_IN_MUTE); 255 255 return regmap_write(regmap, CS530X_IN_VOL_CTRL5, 256 256 CS530X_IN_VU); 257 257 default: ··· 263 263 264 264 static const struct snd_kcontrol_new adc12_ctrl = 265 265 SOC_DAPM_SINGLE_VIRT("Switch", 1); 266 - 267 266 static const struct snd_kcontrol_new adc34_ctrl = 268 267 SOC_DAPM_SINGLE_VIRT("Switch", 1); 269 - 270 268 static const struct snd_kcontrol_new adc56_ctrl = 271 269 SOC_DAPM_SINGLE_VIRT("Switch", 1); 272 - 273 270 static const struct snd_kcontrol_new adc78_ctrl = 274 271 SOC_DAPM_SINGLE_VIRT("Switch", 1); 275 - 276 272 static const struct snd_kcontrol_new in_hpf_ctrl = 277 273 SOC_DAPM_SINGLE_VIRT("Switch", 1); 278 274 ··· 446 450 } 447 451 448 452 static int cs530x_set_pll_refclk(struct snd_soc_component *component, 449 - const unsigned int freq) 453 + const unsigned int freq) 450 454 { 451 455 struct cs530x_priv *priv = snd_soc_component_get_drvdata(component); 452 456 struct regmap *regmap = priv->regmap; ··· 487 491 struct regmap *regmap = cs530x->regmap; 488 492 int ret = 0, fs = params_rate(params), bclk; 489 493 unsigned int fs_val; 490 - 491 494 492 495 switch (fs) { 493 496 case 32000: ··· 535 540 } 536 541 537 542 if (!regmap_test_bits(regmap, CS530X_CLK_CFG_0, 538 - CS530X_PLL_REFCLK_SRC_MASK)) { 543 + CS530X_PLL_REFCLK_SRC_MASK)) { 539 544 ret = cs530x_set_pll_refclk(component, bclk); 540 545 if (ret) 541 546 return ret; ··· 609 614 } 610 615 611 616 static int cs530x_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, 612 - unsigned int rx_mask, int slots, int slot_width) 617 + unsigned int rx_mask, int slots, int slot_width) 613 618 { 614 619 struct snd_soc_component *component = dai->component; 615 620 struct cs530x_priv *cs530x = snd_soc_component_get_drvdata(component); ··· 681 686 }; 682 687 683 688 static int cs530x_set_pll(struct snd_soc_component *component, int pll_id, 684 - int source, unsigned int freq_in, 685 - unsigned int freq_out) 689 + int source, unsigned int freq_in, 690 + unsigned int freq_out) 686 691 { 687 692 struct cs530x_priv *cs530x = snd_soc_component_get_drvdata(component); 688 693 struct regmap *regmap = cs530x->regmap; ··· 738 743 cs530x_in_sum_4ch_controls, 739 744 num_widgets); 740 745 break; 741 - 742 746 case CS5308: 743 747 cs530x_add_12_adc_widgets(component); 744 748 cs530x_add_34_adc_widgets(component); ··· 769 775 } 770 776 771 777 static int cs530x_set_sysclk(struct snd_soc_component *component, int clk_id, 772 - int source, unsigned int freq, int dir) 778 + int source, unsigned int freq, int dir) 773 779 { 774 780 struct cs530x_priv *cs530x = snd_soc_component_get_drvdata(component); 775 781 struct regmap *regmap = cs530x->regmap; ··· 889 895 int ret, i; 890 896 891 897 cs530x->dev_dai = devm_kmemdup(dev, &cs530x_dai, 892 - sizeof(*(cs530x->dev_dai)), 893 - GFP_KERNEL); 898 + sizeof(*(cs530x->dev_dai)), 899 + GFP_KERNEL); 894 900 if (!cs530x->dev_dai) 895 901 return -ENOMEM; 896 902 ··· 908 914 return dev_err_probe(dev, ret, "Failed to enable supplies"); 909 915 910 916 cs530x->reset_gpio = devm_gpiod_get_optional(dev, "reset", 911 - GPIOD_OUT_HIGH); 917 + GPIOD_OUT_HIGH); 912 918 if (IS_ERR(cs530x->reset_gpio)) { 913 919 ret = dev_err_probe(dev, PTR_ERR(cs530x->reset_gpio), 914 - "Reset gpio not available\n"); 920 + "Reset gpio not available\n"); 915 921 goto err_regulator; 916 922 } 917 923 ··· 941 947 cs530x->dev_dai->capture.channels_max = cs530x->num_adcs; 942 948 943 949 ret = devm_snd_soc_register_component(dev, 944 - &soc_component_dev_cs530x, cs530x->dev_dai, 1); 950 + &soc_component_dev_cs530x, 951 + cs530x->dev_dai, 1); 945 952 if (ret) { 946 953 dev_err_probe(dev, ret, "Can't register cs530x component\n"); 947 954 goto err_reset;