.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * max98095.c -- MAX98095 ALSA SoC Audio driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright 2011 Maxim Integrated Products |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License version 2 as |
---|
8 | | - * published by the Free Software Foundation. |
---|
9 | 6 | */ |
---|
10 | 7 | |
---|
11 | 8 | #include <linux/module.h> |
---|
.. | .. |
---|
974 | 971 | cdata->rate = rate; |
---|
975 | 972 | |
---|
976 | 973 | /* Configure NI when operating as master */ |
---|
977 | | - if (snd_soc_component_read32(component, M98095_02A_DAI1_FORMAT) & M98095_DAI_MAS) { |
---|
| 974 | + if (snd_soc_component_read(component, M98095_02A_DAI1_FORMAT) & M98095_DAI_MAS) { |
---|
978 | 975 | if (max98095->sysclk == 0) { |
---|
979 | 976 | dev_err(component->dev, "Invalid system clock frequency\n"); |
---|
980 | 977 | return -EINVAL; |
---|
.. | .. |
---|
1035 | 1032 | cdata->rate = rate; |
---|
1036 | 1033 | |
---|
1037 | 1034 | /* Configure NI when operating as master */ |
---|
1038 | | - if (snd_soc_component_read32(component, M98095_034_DAI2_FORMAT) & M98095_DAI_MAS) { |
---|
| 1035 | + if (snd_soc_component_read(component, M98095_034_DAI2_FORMAT) & M98095_DAI_MAS) { |
---|
1039 | 1036 | if (max98095->sysclk == 0) { |
---|
1040 | 1037 | dev_err(component->dev, "Invalid system clock frequency\n"); |
---|
1041 | 1038 | return -EINVAL; |
---|
.. | .. |
---|
1096 | 1093 | cdata->rate = rate; |
---|
1097 | 1094 | |
---|
1098 | 1095 | /* Configure NI when operating as master */ |
---|
1099 | | - if (snd_soc_component_read32(component, M98095_03E_DAI3_FORMAT) & M98095_DAI_MAS) { |
---|
| 1096 | + if (snd_soc_component_read(component, M98095_03E_DAI3_FORMAT) & M98095_DAI_MAS) { |
---|
1100 | 1097 | if (max98095->sysclk == 0) { |
---|
1101 | 1098 | dev_err(component->dev, "Invalid system clock frequency\n"); |
---|
1102 | 1099 | return -EINVAL; |
---|
.. | .. |
---|
1537 | 1534 | regmask = (channel == 0) ? M98095_EQ1EN : M98095_EQ2EN; |
---|
1538 | 1535 | |
---|
1539 | 1536 | /* Disable filter while configuring, and save current on/off state */ |
---|
1540 | | - regsave = snd_soc_component_read32(component, M98095_088_CFG_LEVEL); |
---|
| 1537 | + regsave = snd_soc_component_read(component, M98095_088_CFG_LEVEL); |
---|
1541 | 1538 | snd_soc_component_update_bits(component, M98095_088_CFG_LEVEL, regmask, 0); |
---|
1542 | 1539 | |
---|
1543 | 1540 | mutex_lock(&max98095->lock); |
---|
.. | .. |
---|
1688 | 1685 | regmask = (channel == 0) ? M98095_BQ1EN : M98095_BQ2EN; |
---|
1689 | 1686 | |
---|
1690 | 1687 | /* Disable filter while configuring, and save current on/off state */ |
---|
1691 | | - regsave = snd_soc_component_read32(component, M98095_088_CFG_LEVEL); |
---|
| 1688 | + regsave = snd_soc_component_read(component, M98095_088_CFG_LEVEL); |
---|
1692 | 1689 | snd_soc_component_update_bits(component, M98095_088_CFG_LEVEL, regmask, 0); |
---|
1693 | 1690 | |
---|
1694 | 1691 | mutex_lock(&max98095->lock); |
---|
.. | .. |
---|
1819 | 1816 | int mic_report = 0; |
---|
1820 | 1817 | |
---|
1821 | 1818 | /* Read the Jack Status Register */ |
---|
1822 | | - value = snd_soc_component_read32(component, M98095_007_JACK_AUTO_STS); |
---|
| 1819 | + value = snd_soc_component_read(component, M98095_007_JACK_AUTO_STS); |
---|
1823 | 1820 | |
---|
1824 | 1821 | /* If ddone is not set, then detection isn't finished yet */ |
---|
1825 | 1822 | if ((value & M98095_DDONE) == 0) |
---|
.. | .. |
---|
1975 | 1972 | /* Reset to hardware default for registers, as there is not |
---|
1976 | 1973 | * a soft reset hardware control register */ |
---|
1977 | 1974 | for (i = M98095_010_HOST_INT_CFG; i < M98095_REG_MAX_CACHED; i++) { |
---|
1978 | | - ret = snd_soc_component_write(component, i, snd_soc_component_read32(component, i)); |
---|
| 1975 | + ret = snd_soc_component_write(component, i, snd_soc_component_read(component, i)); |
---|
1979 | 1976 | if (ret < 0) { |
---|
1980 | 1977 | dev_err(component->dev, "Failed to reset: %d\n", ret); |
---|
1981 | 1978 | return ret; |
---|
.. | .. |
---|
2041 | 2038 | } |
---|
2042 | 2039 | } |
---|
2043 | 2040 | |
---|
2044 | | - ret = snd_soc_component_read32(component, M98095_0FF_REV_ID); |
---|
| 2041 | + ret = snd_soc_component_read(component, M98095_0FF_REV_ID); |
---|
2045 | 2042 | if (ret < 0) { |
---|
2046 | 2043 | dev_err(component->dev, "Failure reading hardware revision: %d\n", |
---|
2047 | 2044 | ret); |
---|