Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: codecs: wcd938x/wcd934x: loglevel fix and

Merge series from Johan Hovold <johan+linaro@kernel.org>:

When investigating a race in the wcd938x driver I noticed that the MBHC
impedance measurements where printed at error loglevel which is clearly
wrong.

Fix that, and clean up the logging somewhat by using dev_printk() and
addressing some style issues.

Included are also two patches that drop the bogus inline keywords from
the functions involved.

+13 -12
+4 -4
sound/soc/codecs/wcd934x.c
··· 2642 2642 return rc; 2643 2643 } 2644 2644 2645 - static inline void wcd934x_mbhc_get_result_params(struct wcd934x_codec *wcd934x, 2645 + static void wcd934x_mbhc_get_result_params(struct wcd934x_codec *wcd934x, 2646 2646 s16 *d1_a, u16 noff, 2647 2647 int32_t *zdet) 2648 2648 { ··· 2683 2683 else if (x1 < minCode_param[noff]) 2684 2684 *zdet = WCD934X_ZDET_FLOATING_IMPEDANCE; 2685 2685 2686 - dev_info(wcd934x->dev, "%s: d1=%d, c1=%d, x1=0x%x, z_val=%d(milliOhm)\n", 2686 + dev_dbg(wcd934x->dev, "%s: d1=%d, c1=%d, x1=0x%x, z_val=%di (milliohm)\n", 2687 2687 __func__, d1, c1, x1, *zdet); 2688 2688 ramp_down: 2689 2689 i = 0; ··· 2740 2740 *zr = zdet; 2741 2741 } 2742 2742 2743 - static inline void wcd934x_wcd_mbhc_qfuse_cal(struct snd_soc_component *component, 2744 - int32_t *z_val, int flag_l_r) 2743 + static void wcd934x_wcd_mbhc_qfuse_cal(struct snd_soc_component *component, 2744 + int32_t *z_val, int flag_l_r) 2745 2745 { 2746 2746 s16 q1; 2747 2747 int q1_cal;
+9 -8
sound/soc/codecs/wcd938x.c
··· 2124 2124 return wcd938x_mbhc_micb_adjust_voltage(component, micb_mv, MIC_BIAS_2); 2125 2125 } 2126 2126 2127 - static inline void wcd938x_mbhc_get_result_params(struct wcd938x_priv *wcd938x, 2127 + static void wcd938x_mbhc_get_result_params(struct snd_soc_component *component, 2128 2128 s16 *d1_a, u16 noff, 2129 2129 int32_t *zdet) 2130 2130 { 2131 + struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); 2131 2132 int i; 2132 2133 int val, val1; 2133 2134 s16 c1; ··· 2155 2154 usleep_range(5000, 5050); 2156 2155 2157 2156 if (!c1 || !x1) { 2158 - pr_err("%s: Impedance detect ramp error, c1=%d, x1=0x%x\n", 2159 - __func__, c1, x1); 2157 + dev_err(component->dev, "Impedance detect ramp error, c1=%d, x1=0x%x\n", 2158 + c1, x1); 2160 2159 goto ramp_down; 2161 2160 } 2162 2161 d1 = d1_a[c1]; ··· 2166 2165 else if (x1 < minCode_param[noff]) 2167 2166 *zdet = WCD938X_ZDET_FLOATING_IMPEDANCE; 2168 2167 2169 - pr_err("%s: d1=%d, c1=%d, x1=0x%x, z_val=%d(milliOhm)\n", 2168 + dev_dbg(component->dev, "%s: d1=%d, c1=%d, x1=0x%x, z_val=%d (milliohm)\n", 2170 2169 __func__, d1, c1, x1, *zdet); 2171 2170 ramp_down: 2172 2171 i = 0; ··· 2211 2210 WCD938X_ANA_MBHC_ZDET, 0x80, 0x80); 2212 2211 dev_dbg(component->dev, "%s: ramp for HPH_L, noff = %d\n", 2213 2212 __func__, zdet_param->noff); 2214 - wcd938x_mbhc_get_result_params(wcd938x, d1_a, zdet_param->noff, &zdet); 2213 + wcd938x_mbhc_get_result_params(component, d1_a, zdet_param->noff, &zdet); 2215 2214 regmap_update_bits(wcd938x->regmap, 2216 2215 WCD938X_ANA_MBHC_ZDET, 0x80, 0x00); 2217 2216 ··· 2225 2224 WCD938X_ANA_MBHC_ZDET, 0x40, 0x40); 2226 2225 dev_dbg(component->dev, "%s: ramp for HPH_R, noff = %d\n", 2227 2226 __func__, zdet_param->noff); 2228 - wcd938x_mbhc_get_result_params(wcd938x, d1_a, zdet_param->noff, &zdet); 2227 + wcd938x_mbhc_get_result_params(component, d1_a, zdet_param->noff, &zdet); 2229 2228 regmap_update_bits(wcd938x->regmap, 2230 2229 WCD938X_ANA_MBHC_ZDET, 0x40, 0x00); 2231 2230 2232 2231 *zr = zdet; 2233 2232 } 2234 2233 2235 - static inline void wcd938x_wcd_mbhc_qfuse_cal(struct snd_soc_component *component, 2236 - int32_t *z_val, int flag_l_r) 2234 + static void wcd938x_wcd_mbhc_qfuse_cal(struct snd_soc_component *component, 2235 + int32_t *z_val, int flag_l_r) 2237 2236 { 2238 2237 s16 q1; 2239 2238 int q1_cal;