hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/sound/soc/codecs/wm5100.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * wm5100.c -- WM5100 ALSA SoC Audio driver
34 *
45 * Copyright 2011-2 Wolfson Microelectronics plc
56 *
67 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
118 */
129
1310 #include <linux/module.h>
....@@ -140,7 +137,7 @@
140137 sr_free = i;
141138 continue;
142139 }
143
- if ((snd_soc_component_read32(component, wm5100_sr_regs[i]) &
140
+ if ((snd_soc_component_read(component, wm5100_sr_regs[i]) &
144141 WM5100_SAMPLE_RATE_1_MASK) == sr_code)
145142 break;
146143 }
....@@ -192,7 +189,7 @@
192189 if (!wm5100->sr_ref[i])
193190 continue;
194191
195
- if ((snd_soc_component_read32(component, wm5100_sr_regs[i]) &
192
+ if ((snd_soc_component_read(component, wm5100_sr_regs[i]) &
196193 WM5100_SAMPLE_RATE_1_MASK) == sr_code)
197194 break;
198195 }
....@@ -741,9 +738,9 @@
741738
742739 /* Wait for the outputs to flag themselves as enabled */
743740 if (wm5100->out_ena[0]) {
744
- expect = snd_soc_component_read32(component, WM5100_CHANNEL_ENABLES_1);
741
+ expect = snd_soc_component_read(component, WM5100_CHANNEL_ENABLES_1);
745742 for (i = 0; i < 200; i++) {
746
- val = snd_soc_component_read32(component, WM5100_OUTPUT_STATUS_1);
743
+ val = snd_soc_component_read(component, WM5100_OUTPUT_STATUS_1);
747744 if (val == expect) {
748745 wm5100->out_ena[0] = false;
749746 break;
....@@ -756,9 +753,9 @@
756753 }
757754
758755 if (wm5100->out_ena[1]) {
759
- expect = snd_soc_component_read32(component, WM5100_OUTPUT_ENABLES_2);
756
+ expect = snd_soc_component_read(component, WM5100_OUTPUT_ENABLES_2);
760757 for (i = 0; i < 200; i++) {
761
- val = snd_soc_component_read32(component, WM5100_OUTPUT_STATUS_2);
758
+ val = snd_soc_component_read(component, WM5100_OUTPUT_STATUS_2);
762759 if (val == expect) {
763760 wm5100->out_ena[1] = false;
764761 break;
....@@ -844,13 +841,13 @@
844841 struct wm5100_priv *wm5100 = snd_soc_component_get_drvdata(component);
845842 int ret;
846843
847
- ret = snd_soc_component_read32(component, WM5100_INTERRUPT_RAW_STATUS_3);
844
+ ret = snd_soc_component_read(component, WM5100_INTERRUPT_RAW_STATUS_3);
848845 ret &= WM5100_SPK_SHUTDOWN_WARN_STS |
849846 WM5100_SPK_SHUTDOWN_STS | WM5100_CLKGEN_ERR_STS |
850847 WM5100_CLKGEN_ERR_ASYNC_STS;
851848 wm5100_log_status3(wm5100, ret);
852849
853
- ret = snd_soc_component_read32(component, WM5100_INTERRUPT_RAW_STATUS_4);
850
+ ret = snd_soc_component_read(component, WM5100_INTERRUPT_RAW_STATUS_4);
854851 wm5100_log_status4(wm5100, ret);
855852
856853 return 0;
....@@ -1851,7 +1848,7 @@
18511848 msleep(1);
18521849 }
18531850
1854
- ret = snd_soc_component_read32(component,
1851
+ ret = snd_soc_component_read(component,
18551852 WM5100_INTERRUPT_RAW_STATUS_3);
18561853 if (ret < 0) {
18571854 dev_err(component->dev,