| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * wm5100.c -- WM5100 ALSA SoC Audio driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright 2011-2 Wolfson Microelectronics plc |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * 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. |
|---|
| 11 | 8 | */ |
|---|
| 12 | 9 | |
|---|
| 13 | 10 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 140 | 137 | sr_free = i; |
|---|
| 141 | 138 | continue; |
|---|
| 142 | 139 | } |
|---|
| 143 | | - if ((snd_soc_component_read32(component, wm5100_sr_regs[i]) & |
|---|
| 140 | + if ((snd_soc_component_read(component, wm5100_sr_regs[i]) & |
|---|
| 144 | 141 | WM5100_SAMPLE_RATE_1_MASK) == sr_code) |
|---|
| 145 | 142 | break; |
|---|
| 146 | 143 | } |
|---|
| .. | .. |
|---|
| 192 | 189 | if (!wm5100->sr_ref[i]) |
|---|
| 193 | 190 | continue; |
|---|
| 194 | 191 | |
|---|
| 195 | | - if ((snd_soc_component_read32(component, wm5100_sr_regs[i]) & |
|---|
| 192 | + if ((snd_soc_component_read(component, wm5100_sr_regs[i]) & |
|---|
| 196 | 193 | WM5100_SAMPLE_RATE_1_MASK) == sr_code) |
|---|
| 197 | 194 | break; |
|---|
| 198 | 195 | } |
|---|
| .. | .. |
|---|
| 741 | 738 | |
|---|
| 742 | 739 | /* Wait for the outputs to flag themselves as enabled */ |
|---|
| 743 | 740 | 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); |
|---|
| 745 | 742 | 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); |
|---|
| 747 | 744 | if (val == expect) { |
|---|
| 748 | 745 | wm5100->out_ena[0] = false; |
|---|
| 749 | 746 | break; |
|---|
| .. | .. |
|---|
| 756 | 753 | } |
|---|
| 757 | 754 | |
|---|
| 758 | 755 | 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); |
|---|
| 760 | 757 | 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); |
|---|
| 762 | 759 | if (val == expect) { |
|---|
| 763 | 760 | wm5100->out_ena[1] = false; |
|---|
| 764 | 761 | break; |
|---|
| .. | .. |
|---|
| 844 | 841 | struct wm5100_priv *wm5100 = snd_soc_component_get_drvdata(component); |
|---|
| 845 | 842 | int ret; |
|---|
| 846 | 843 | |
|---|
| 847 | | - ret = snd_soc_component_read32(component, WM5100_INTERRUPT_RAW_STATUS_3); |
|---|
| 844 | + ret = snd_soc_component_read(component, WM5100_INTERRUPT_RAW_STATUS_3); |
|---|
| 848 | 845 | ret &= WM5100_SPK_SHUTDOWN_WARN_STS | |
|---|
| 849 | 846 | WM5100_SPK_SHUTDOWN_STS | WM5100_CLKGEN_ERR_STS | |
|---|
| 850 | 847 | WM5100_CLKGEN_ERR_ASYNC_STS; |
|---|
| 851 | 848 | wm5100_log_status3(wm5100, ret); |
|---|
| 852 | 849 | |
|---|
| 853 | | - ret = snd_soc_component_read32(component, WM5100_INTERRUPT_RAW_STATUS_4); |
|---|
| 850 | + ret = snd_soc_component_read(component, WM5100_INTERRUPT_RAW_STATUS_4); |
|---|
| 854 | 851 | wm5100_log_status4(wm5100, ret); |
|---|
| 855 | 852 | |
|---|
| 856 | 853 | return 0; |
|---|
| .. | .. |
|---|
| 1851 | 1848 | msleep(1); |
|---|
| 1852 | 1849 | } |
|---|
| 1853 | 1850 | |
|---|
| 1854 | | - ret = snd_soc_component_read32(component, |
|---|
| 1851 | + ret = snd_soc_component_read(component, |
|---|
| 1855 | 1852 | WM5100_INTERRUPT_RAW_STATUS_3); |
|---|
| 1856 | 1853 | if (ret < 0) { |
|---|
| 1857 | 1854 | dev_err(component->dev, |
|---|