From patchwork Tue Jun 16 05:20:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 192427 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC631C433E0 for ; Tue, 16 Jun 2020 05:25:58 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 48686206DB for ; Tue, 16 Jun 2020 05:25:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="unDIS24K" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 48686206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DE84E1682; Tue, 16 Jun 2020 07:25:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DE84E1682 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1592285157; bh=btRIGuJ0B9qBGhKpsZxd7pKvTJXPbb7LzBRK0bcAtmo=; h=Date:From:Subject:To:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=unDIS24KLS6zA+LvMMlFCQPb/YIRiqfZpPvGO5aQTEkN1BewrthUZwoZcUT13BbGR DEWzX127s93Y0qVA4ITmJW+T76HkNQ5OfEmjrsQnjuChetleJmm03Os2TY/kUgeROH J6uwAM6/mU5TcGpJ8Fl78Mf1cPOVSrrig/YuD8tU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 753CAF80305; Tue, 16 Jun 2020 07:21:10 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EA04EF802F8; Tue, 16 Jun 2020 07:21:04 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id ADEACF80101 for ; Tue, 16 Jun 2020 07:21:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ADEACF80101 Date: 16 Jun 2020 14:20:59 +0900 X-IronPort-AV: E=Sophos;i="5.73,517,1583161200"; d="scan'208";a="49787638" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 16 Jun 2020 14:20:59 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 1B85A41A9A9F; Tue, 16 Jun 2020 14:20:59 +0900 (JST) Message-ID: <87h7vb4mdf.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 09/16] ASoC: codecs: msm*: rename to snd_soc_component_read() User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Mark Brown In-Reply-To: <87tuzb4mjg.wl-kuninori.morimoto.gx@renesas.com> References: <87tuzb4mjg.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: Linux-ALSA X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Kuninori Morimoto We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto --- sound/soc/codecs/msm8916-wcd-analog.c | 14 +++++++------- sound/soc/codecs/msm8916-wcd-digital.c | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c index 85bc7ae4d267..30da00a3e789 100644 --- a/sound/soc/codecs/msm8916-wcd-analog.c +++ b/sound/soc/codecs/msm8916-wcd-analog.c @@ -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); - 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; pm8916_mbhc_configure_bias(wcd, micbias_enabled); @@ -730,8 +730,8 @@ static int pm8916_wcd_analog_probe(struct snd_soc_component *component) snd_soc_component_init_regmap(component, dev_get_regmap(component->dev->parent, NULL)); snd_soc_component_set_drvdata(component, priv); - priv->pmic_rev = snd_soc_component_read32(component, CDC_D_REVISION1); - priv->codec_version = snd_soc_component_read32(component, CDC_D_PERPH_SUBTYPE); + priv->pmic_rev = snd_soc_component_read(component, CDC_D_REVISION1); + priv->codec_version = snd_soc_component_read(component, CDC_D_PERPH_SUBTYPE); dev_info(component->dev, "PMIC REV: %d\t CODEC Version: %d\n", priv->pmic_rev, priv->codec_version); @@ -990,7 +990,7 @@ static irqreturn_t mbhc_btn_release_irq_handler(int irq, void *arg) if (priv->detect_accessory_type) { 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 */ 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) struct snd_soc_component *component = priv->component; 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; switch (btn_result) { @@ -1046,7 +1046,7 @@ static irqreturn_t pm8916_mbhc_switch_irq_handler(int irq, void *arg) struct snd_soc_component *component = priv->component; 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) ins = true; @@ -1059,7 +1059,7 @@ static irqreturn_t pm8916_mbhc_switch_irq_handler(int irq, void *arg) if (ins) { /* hs insertion */ 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) micbias_enabled = true; diff --git a/sound/soc/codecs/msm8916-wcd-digital.c b/sound/soc/codecs/msm8916-wcd-digital.c index 09fccacadd6b..fcc10c8bc625 100644 --- a/sound/soc/codecs/msm8916-wcd-digital.c +++ b/sound/soc/codecs/msm8916-wcd-digital.c @@ -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; else if (w->shift == 1) 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); break; default: @@ -387,7 +387,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component, ((band_idx * BAND_MAX + coeff_idx) * 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)); snd_soc_component_write(component, @@ -395,7 +395,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component, ((band_idx * BAND_MAX + coeff_idx) * 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); snd_soc_component_write(component, @@ -403,7 +403,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component, ((band_idx * BAND_MAX + coeff_idx) * 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); snd_soc_component_write(component, @@ -412,7 +412,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component, * sizeof(uint32_t) + 3) & 0x7F); /* 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); return value; @@ -584,7 +584,7 @@ static int msm8916_wcd_digital_enable_interpolator( /* apply the digital gain after the interpolator is enabled */ usleep_range(10000, 10100); 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; case SND_SOC_DAPM_POST_PMD: 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, snd_soc_component_update_bits(component, tx_vol_ctl_reg, TX_VOL_CTL_CFG_MUTE_EN_MASK, 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; 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) { @@ -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); /* apply the digital gain after the decimator is enabled */ 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, TX_VOL_CTL_CFG_MUTE_EN_MASK, 0); break;