.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * arizona.c - Wolfson Arizona class device shared support |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright 2012 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/delay.h> |
---|
.. | .. |
---|
90 | 87 | |
---|
91 | 88 | switch (event) { |
---|
92 | 89 | case SND_SOC_DAPM_POST_PMU: |
---|
93 | | - val = snd_soc_component_read32(component, |
---|
| 90 | + val = snd_soc_component_read(component, |
---|
94 | 91 | ARIZONA_INTERRUPT_RAW_STATUS_3); |
---|
95 | 92 | if (val & ARIZONA_SPK_OVERHEAT_STS) { |
---|
96 | 93 | dev_crit(arizona->dev, |
---|
.. | .. |
---|
900 | 897 | bool arizona_input_analog(struct snd_soc_component *component, int shift) |
---|
901 | 898 | { |
---|
902 | 899 | unsigned int reg = ARIZONA_IN1L_CONTROL + ((shift / 2) * 8); |
---|
903 | | - unsigned int val = snd_soc_component_read32(component, reg); |
---|
| 900 | + unsigned int val = snd_soc_component_read(component, reg); |
---|
904 | 901 | |
---|
905 | 902 | return !(val & ARIZONA_IN1_MODE_MASK); |
---|
906 | 903 | } |
---|
.. | .. |
---|
940 | 937 | break; |
---|
941 | 938 | case SND_SOC_DAPM_POST_PMD: |
---|
942 | 939 | /* Disable volume updates if no inputs are enabled */ |
---|
943 | | - reg = snd_soc_component_read32(component, ARIZONA_INPUT_ENABLES); |
---|
| 940 | + reg = snd_soc_component_read(component, ARIZONA_INPUT_ENABLES); |
---|
944 | 941 | if (reg == 0) |
---|
945 | 942 | arizona_in_set_vu(component, 0); |
---|
946 | 943 | break; |
---|
.. | .. |
---|
1758 | 1755 | { |
---|
1759 | 1756 | int val; |
---|
1760 | 1757 | |
---|
1761 | | - val = snd_soc_component_read32(component, base + ARIZONA_AIF_BCLK_CTRL); |
---|
| 1758 | + val = snd_soc_component_read(component, base + ARIZONA_AIF_BCLK_CTRL); |
---|
1762 | 1759 | if (bclk != (val & ARIZONA_AIF1_BCLK_FREQ_MASK)) |
---|
1763 | 1760 | return true; |
---|
1764 | 1761 | |
---|
1765 | | - val = snd_soc_component_read32(component, base + ARIZONA_AIF_TX_BCLK_RATE); |
---|
| 1762 | + val = snd_soc_component_read(component, base + ARIZONA_AIF_TX_BCLK_RATE); |
---|
1766 | 1763 | if (lrclk != (val & ARIZONA_AIF1TX_BCPF_MASK)) |
---|
1767 | 1764 | return true; |
---|
1768 | 1765 | |
---|
1769 | | - val = snd_soc_component_read32(component, base + ARIZONA_AIF_FRAME_CTRL_1); |
---|
| 1766 | + val = snd_soc_component_read(component, base + ARIZONA_AIF_FRAME_CTRL_1); |
---|
1770 | 1767 | if (frame != (val & (ARIZONA_AIF1TX_WL_MASK | |
---|
1771 | 1768 | ARIZONA_AIF1TX_SLOT_LEN_MASK))) |
---|
1772 | 1769 | return true; |
---|
.. | .. |
---|
1816 | 1813 | } |
---|
1817 | 1814 | |
---|
1818 | 1815 | /* Force multiple of 2 channels for I2S mode */ |
---|
1819 | | - val = snd_soc_component_read32(component, base + ARIZONA_AIF_FORMAT); |
---|
| 1816 | + val = snd_soc_component_read(component, base + ARIZONA_AIF_FORMAT); |
---|
1820 | 1817 | val &= ARIZONA_AIF1_FMT_MASK; |
---|
1821 | 1818 | if ((channels & 1) && (val == ARIZONA_FMT_I2S_MODE)) { |
---|
1822 | 1819 | arizona_aif_dbg(dai, "Forcing stereo mode\n"); |
---|
.. | .. |
---|
1848 | 1845 | |
---|
1849 | 1846 | if (reconfig) { |
---|
1850 | 1847 | /* Save AIF TX/RX state */ |
---|
1851 | | - aif_tx_state = snd_soc_component_read32(component, |
---|
| 1848 | + aif_tx_state = snd_soc_component_read(component, |
---|
1852 | 1849 | base + ARIZONA_AIF_TX_ENABLES); |
---|
1853 | | - aif_rx_state = snd_soc_component_read32(component, |
---|
| 1850 | + aif_rx_state = snd_soc_component_read(component, |
---|
1854 | 1851 | base + ARIZONA_AIF_RX_ENABLES); |
---|
1855 | 1852 | /* Disable AIF TX/RX before reconfiguring it */ |
---|
1856 | 1853 | regmap_update_bits_async(arizona->regmap, |
---|
.. | .. |
---|
1929 | 1926 | if (clk_id == dai_priv->clk) |
---|
1930 | 1927 | return 0; |
---|
1931 | 1928 | |
---|
1932 | | - if (dai->active) { |
---|
| 1929 | + if (snd_soc_dai_active(dai)) { |
---|
1933 | 1930 | dev_err(component->dev, "Can't change clock on active DAI %d\n", |
---|
1934 | 1931 | dai->id); |
---|
1935 | 1932 | return -EBUSY; |
---|