Commit a6f80d99 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: codecs: msm*: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h7vb4mdf.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1227f601
...@@ -510,7 +510,7 @@ static void pm8916_wcd_setup_mbhc(struct pm8916_wcd_analog_priv *wcd) ...@@ -510,7 +510,7 @@ static void pm8916_wcd_setup_mbhc(struct pm8916_wcd_analog_priv *wcd)
DIG_CLK_CTL_D_MBHC_CLK_EN_MASK, DIG_CLK_CTL_D_MBHC_CLK_EN_MASK,
DIG_CLK_CTL_D_MBHC_CLK_EN); DIG_CLK_CTL_D_MBHC_CLK_EN);
if (snd_soc_component_read32(component, CDC_A_MICB_2_EN) & CDC_A_MICB_2_EN_ENABLE) if (snd_soc_component_read(component, CDC_A_MICB_2_EN) & CDC_A_MICB_2_EN_ENABLE)
micbias_enabled = true; micbias_enabled = true;
pm8916_mbhc_configure_bias(wcd, micbias_enabled); pm8916_mbhc_configure_bias(wcd, micbias_enabled);
...@@ -730,8 +730,8 @@ static int pm8916_wcd_analog_probe(struct snd_soc_component *component) ...@@ -730,8 +730,8 @@ static int pm8916_wcd_analog_probe(struct snd_soc_component *component)
snd_soc_component_init_regmap(component, snd_soc_component_init_regmap(component,
dev_get_regmap(component->dev->parent, NULL)); dev_get_regmap(component->dev->parent, NULL));
snd_soc_component_set_drvdata(component, priv); snd_soc_component_set_drvdata(component, priv);
priv->pmic_rev = snd_soc_component_read32(component, CDC_D_REVISION1); priv->pmic_rev = snd_soc_component_read(component, CDC_D_REVISION1);
priv->codec_version = snd_soc_component_read32(component, CDC_D_PERPH_SUBTYPE); priv->codec_version = snd_soc_component_read(component, CDC_D_PERPH_SUBTYPE);
dev_info(component->dev, "PMIC REV: %d\t CODEC Version: %d\n", dev_info(component->dev, "PMIC REV: %d\t CODEC Version: %d\n",
priv->pmic_rev, priv->codec_version); priv->pmic_rev, priv->codec_version);
...@@ -990,7 +990,7 @@ static irqreturn_t mbhc_btn_release_irq_handler(int irq, void *arg) ...@@ -990,7 +990,7 @@ static irqreturn_t mbhc_btn_release_irq_handler(int irq, void *arg)
if (priv->detect_accessory_type) { if (priv->detect_accessory_type) {
struct snd_soc_component *component = priv->component; struct snd_soc_component *component = priv->component;
u32 val = snd_soc_component_read32(component, CDC_A_MBHC_RESULT_1); u32 val = snd_soc_component_read(component, CDC_A_MBHC_RESULT_1);
/* check if its BTN0 thats released */ /* check if its BTN0 thats released */
if ((val != -1) && !(val & CDC_A_MBHC_RESULT_1_BTN_RESULT_MASK)) if ((val != -1) && !(val & CDC_A_MBHC_RESULT_1_BTN_RESULT_MASK))
...@@ -1009,7 +1009,7 @@ static irqreturn_t mbhc_btn_press_irq_handler(int irq, void *arg) ...@@ -1009,7 +1009,7 @@ static irqreturn_t mbhc_btn_press_irq_handler(int irq, void *arg)
struct snd_soc_component *component = priv->component; struct snd_soc_component *component = priv->component;
u32 btn_result; u32 btn_result;
btn_result = snd_soc_component_read32(component, CDC_A_MBHC_RESULT_1) & btn_result = snd_soc_component_read(component, CDC_A_MBHC_RESULT_1) &
CDC_A_MBHC_RESULT_1_BTN_RESULT_MASK; CDC_A_MBHC_RESULT_1_BTN_RESULT_MASK;
switch (btn_result) { switch (btn_result) {
...@@ -1046,7 +1046,7 @@ static irqreturn_t pm8916_mbhc_switch_irq_handler(int irq, void *arg) ...@@ -1046,7 +1046,7 @@ static irqreturn_t pm8916_mbhc_switch_irq_handler(int irq, void *arg)
struct snd_soc_component *component = priv->component; struct snd_soc_component *component = priv->component;
bool ins = false; bool ins = false;
if (snd_soc_component_read32(component, CDC_A_MBHC_DET_CTL_1) & if (snd_soc_component_read(component, CDC_A_MBHC_DET_CTL_1) &
CDC_A_MBHC_DET_CTL_MECH_DET_TYPE_MASK) CDC_A_MBHC_DET_CTL_MECH_DET_TYPE_MASK)
ins = true; ins = true;
...@@ -1059,7 +1059,7 @@ static irqreturn_t pm8916_mbhc_switch_irq_handler(int irq, void *arg) ...@@ -1059,7 +1059,7 @@ static irqreturn_t pm8916_mbhc_switch_irq_handler(int irq, void *arg)
if (ins) { /* hs insertion */ if (ins) { /* hs insertion */
bool micbias_enabled = false; bool micbias_enabled = false;
if (snd_soc_component_read32(component, CDC_A_MICB_2_EN) & if (snd_soc_component_read(component, CDC_A_MICB_2_EN) &
CDC_A_MICB_2_EN_ENABLE) CDC_A_MICB_2_EN_ENABLE)
micbias_enabled = true; micbias_enabled = true;
......
...@@ -366,7 +366,7 @@ static int msm8x16_wcd_codec_set_iir_gain(struct snd_soc_dapm_widget *w, ...@@ -366,7 +366,7 @@ static int msm8x16_wcd_codec_set_iir_gain(struct snd_soc_dapm_widget *w,
reg = LPASS_CDC_IIR1_GAIN_B1_CTL; reg = LPASS_CDC_IIR1_GAIN_B1_CTL;
else if (w->shift == 1) else if (w->shift == 1)
reg = LPASS_CDC_IIR2_GAIN_B1_CTL; reg = LPASS_CDC_IIR2_GAIN_B1_CTL;
value = snd_soc_component_read32(component, reg); value = snd_soc_component_read(component, reg);
snd_soc_component_write(component, reg, value); snd_soc_component_write(component, reg, value);
break; break;
default: default:
...@@ -387,7 +387,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component, ...@@ -387,7 +387,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component,
((band_idx * BAND_MAX + coeff_idx) ((band_idx * BAND_MAX + coeff_idx)
* sizeof(uint32_t)) & 0x7F); * sizeof(uint32_t)) & 0x7F);
value |= snd_soc_component_read32(component, value |= snd_soc_component_read(component,
(LPASS_CDC_IIR1_COEF_B2_CTL + 64 * iir_idx)); (LPASS_CDC_IIR1_COEF_B2_CTL + 64 * iir_idx));
snd_soc_component_write(component, snd_soc_component_write(component,
...@@ -395,7 +395,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component, ...@@ -395,7 +395,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component,
((band_idx * BAND_MAX + coeff_idx) ((band_idx * BAND_MAX + coeff_idx)
* sizeof(uint32_t) + 1) & 0x7F); * sizeof(uint32_t) + 1) & 0x7F);
value |= (snd_soc_component_read32(component, value |= (snd_soc_component_read(component,
(LPASS_CDC_IIR1_COEF_B2_CTL + 64 * iir_idx)) << 8); (LPASS_CDC_IIR1_COEF_B2_CTL + 64 * iir_idx)) << 8);
snd_soc_component_write(component, snd_soc_component_write(component,
...@@ -403,7 +403,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component, ...@@ -403,7 +403,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component,
((band_idx * BAND_MAX + coeff_idx) ((band_idx * BAND_MAX + coeff_idx)
* sizeof(uint32_t) + 2) & 0x7F); * sizeof(uint32_t) + 2) & 0x7F);
value |= (snd_soc_component_read32(component, value |= (snd_soc_component_read(component,
(LPASS_CDC_IIR1_COEF_B2_CTL + 64 * iir_idx)) << 16); (LPASS_CDC_IIR1_COEF_B2_CTL + 64 * iir_idx)) << 16);
snd_soc_component_write(component, snd_soc_component_write(component,
...@@ -412,7 +412,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component, ...@@ -412,7 +412,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component,
* sizeof(uint32_t) + 3) & 0x7F); * sizeof(uint32_t) + 3) & 0x7F);
/* Mask bits top 2 bits since they are reserved */ /* Mask bits top 2 bits since they are reserved */
value |= ((snd_soc_component_read32(component, value |= ((snd_soc_component_read(component,
(LPASS_CDC_IIR1_COEF_B2_CTL + 64 * iir_idx)) & 0x3f) << 24); (LPASS_CDC_IIR1_COEF_B2_CTL + 64 * iir_idx)) & 0x3f) << 24);
return value; return value;
...@@ -584,7 +584,7 @@ static int msm8916_wcd_digital_enable_interpolator( ...@@ -584,7 +584,7 @@ static int msm8916_wcd_digital_enable_interpolator(
/* apply the digital gain after the interpolator is enabled */ /* apply the digital gain after the interpolator is enabled */
usleep_range(10000, 10100); usleep_range(10000, 10100);
snd_soc_component_write(component, rx_gain_reg[w->shift], snd_soc_component_write(component, rx_gain_reg[w->shift],
snd_soc_component_read32(component, rx_gain_reg[w->shift])); snd_soc_component_read(component, rx_gain_reg[w->shift]));
break; break;
case SND_SOC_DAPM_POST_PMD: case SND_SOC_DAPM_POST_PMD:
snd_soc_component_update_bits(component, LPASS_CDC_CLK_RX_RESET_CTL, snd_soc_component_update_bits(component, LPASS_CDC_CLK_RX_RESET_CTL,
...@@ -615,7 +615,7 @@ static int msm8916_wcd_digital_enable_dec(struct snd_soc_dapm_widget *w, ...@@ -615,7 +615,7 @@ static int msm8916_wcd_digital_enable_dec(struct snd_soc_dapm_widget *w,
snd_soc_component_update_bits(component, tx_vol_ctl_reg, snd_soc_component_update_bits(component, tx_vol_ctl_reg,
TX_VOL_CTL_CFG_MUTE_EN_MASK, TX_VOL_CTL_CFG_MUTE_EN_MASK,
TX_VOL_CTL_CFG_MUTE_EN_ENABLE); TX_VOL_CTL_CFG_MUTE_EN_ENABLE);
dec_hpf_cut_of_freq = snd_soc_component_read32(component, tx_mux_ctl_reg) & dec_hpf_cut_of_freq = snd_soc_component_read(component, tx_mux_ctl_reg) &
TX_MUX_CTL_CUT_OFF_FREQ_MASK; TX_MUX_CTL_CUT_OFF_FREQ_MASK;
dec_hpf_cut_of_freq >>= TX_MUX_CTL_CUT_OFF_FREQ_SHIFT; dec_hpf_cut_of_freq >>= TX_MUX_CTL_CUT_OFF_FREQ_SHIFT;
if (dec_hpf_cut_of_freq != TX_MUX_CTL_CF_NEG_3DB_150HZ) { if (dec_hpf_cut_of_freq != TX_MUX_CTL_CF_NEG_3DB_150HZ) {
...@@ -632,7 +632,7 @@ static int msm8916_wcd_digital_enable_dec(struct snd_soc_dapm_widget *w, ...@@ -632,7 +632,7 @@ static int msm8916_wcd_digital_enable_dec(struct snd_soc_dapm_widget *w,
TX_MUX_CTL_HPF_BP_SEL_NO_BYPASS); TX_MUX_CTL_HPF_BP_SEL_NO_BYPASS);
/* apply the digital gain after the decimator is enabled */ /* apply the digital gain after the decimator is enabled */
snd_soc_component_write(component, tx_gain_reg[w->shift], snd_soc_component_write(component, tx_gain_reg[w->shift],
snd_soc_component_read32(component, tx_gain_reg[w->shift])); snd_soc_component_read(component, tx_gain_reg[w->shift]));
snd_soc_component_update_bits(component, tx_vol_ctl_reg, snd_soc_component_update_bits(component, tx_vol_ctl_reg,
TX_VOL_CTL_CFG_MUTE_EN_MASK, 0); TX_VOL_CTL_CFG_MUTE_EN_MASK, 0);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment