Unverified Commit 9d33f9ca authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: soc-dapm: add prefix on dapm_xxx_event()



dapm_xxx_event() is global function. Let's add snd_soc_ prefix.

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87jz4shisc.wl-kuninori.morimoto.gx@renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 805c019f
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -295,7 +295,7 @@ struct snd_soc_pcm_runtime;
#define SND_SOC_DAPM_CLOCK_SUPPLY(wname) \
(struct snd_soc_dapm_widget) { \
	.id = snd_soc_dapm_clock_supply, .name = wname, \
	.reg = SND_SOC_NOPM, .event = dapm_clock_event, \
	.reg = SND_SOC_NOPM, .event = snd_soc_dapm_clock_event, \
	.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD }

/* generic widgets */
@@ -312,7 +312,7 @@ struct snd_soc_pcm_runtime;
#define SND_SOC_DAPM_REGULATOR_SUPPLY(wname, wdelay, wflags)	    \
(struct snd_soc_dapm_widget) { \
	.id = snd_soc_dapm_regulator_supply, .name = wname, \
	.reg = SND_SOC_NOPM, .shift = wdelay, .event = dapm_regulator_event, \
	.reg = SND_SOC_NOPM, .shift = wdelay, .event = snd_soc_dapm_regulator_event, \
	.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD, \
	.on_val = wflags}
#define SND_SOC_DAPM_PINCTRL(wname, active, sleep) \
@@ -320,7 +320,7 @@ struct snd_soc_pcm_runtime;
	.id = snd_soc_dapm_pinctrl, .name = wname, \
	.priv = (&(struct snd_soc_dapm_pinctrl_priv) \
		{ .active_state = active, .sleep_state = sleep,}), \
	.reg = SND_SOC_NOPM, .event = dapm_pinctrl_event, \
	.reg = SND_SOC_NOPM, .event = snd_soc_dapm_pinctrl_event, \
	.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD }


@@ -630,9 +630,9 @@ enum snd_soc_dapm_direction {
#define SND_SOC_DAPM_EP_SOURCE	SND_SOC_DAPM_DIR_TO_EP(SND_SOC_DAPM_DIR_IN)
#define SND_SOC_DAPM_EP_SINK	SND_SOC_DAPM_DIR_TO_EP(SND_SOC_DAPM_DIR_OUT)

int dapm_regulator_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event);
int dapm_clock_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event);
int dapm_pinctrl_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event);
int snd_soc_dapm_regulator_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event);
int snd_soc_dapm_clock_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event);
int snd_soc_dapm_pinctrl_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event);

/* dapm controls */
int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
+2 −2
Original line number Diff line number Diff line
@@ -408,7 +408,7 @@ static int mt8188_mt6359_mtkaif_calibration(struct snd_soc_pcm_runtime *rtd)
	}

	if (pin_w)
		dapm_pinctrl_event(pin_w, NULL, SND_SOC_DAPM_PRE_PMU);
		snd_soc_dapm_pinctrl_event(pin_w, NULL, SND_SOC_DAPM_PRE_PMU);
	else
		dev_dbg(afe->dev, "%s(), no pinmux widget, please check if default on\n", __func__);

@@ -510,7 +510,7 @@ static int mt8188_mt6359_mtkaif_calibration(struct snd_soc_pcm_runtime *rtd)
		param->mtkaif_phase_cycle[i] = mtkaif_phase_cycle[i];

	if (pin_w)
		dapm_pinctrl_event(pin_w, NULL, SND_SOC_DAPM_POST_PMD);
		snd_soc_dapm_pinctrl_event(pin_w, NULL, SND_SOC_DAPM_POST_PMD);

	dev_dbg(afe->dev, "%s(), end, calibration ok %d\n",
		__func__, param->mtkaif_calibration_ok);
+10 −10
Original line number Diff line number Diff line
@@ -1537,7 +1537,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_dai_free_widgets);
/*
 * Handler for regulator supply widget.
 */
int dapm_regulator_event(struct snd_soc_dapm_widget *w,
int snd_soc_dapm_regulator_event(struct snd_soc_dapm_widget *w,
				 struct snd_kcontrol *kcontrol, int event)
{
	int ret;
@@ -1566,12 +1566,12 @@ int dapm_regulator_event(struct snd_soc_dapm_widget *w,
		return regulator_disable_deferred(w->regulator, w->shift);
	}
}
EXPORT_SYMBOL_GPL(dapm_regulator_event);
EXPORT_SYMBOL_GPL(snd_soc_dapm_regulator_event);

/*
 * Handler for pinctrl widget.
 */
int dapm_pinctrl_event(struct snd_soc_dapm_widget *w,
int snd_soc_dapm_pinctrl_event(struct snd_soc_dapm_widget *w,
			       struct snd_kcontrol *kcontrol, int event)
{
	struct snd_soc_dapm_pinctrl_priv *priv = w->priv;
@@ -1591,12 +1591,12 @@ int dapm_pinctrl_event(struct snd_soc_dapm_widget *w,

	return pinctrl_select_state(p, s);
}
EXPORT_SYMBOL_GPL(dapm_pinctrl_event);
EXPORT_SYMBOL_GPL(snd_soc_dapm_pinctrl_event);

/*
 * Handler for clock supply widget.
 */
int dapm_clock_event(struct snd_soc_dapm_widget *w,
int snd_soc_dapm_clock_event(struct snd_soc_dapm_widget *w,
			     struct snd_kcontrol *kcontrol, int event)
{
	if (!w->clk)
@@ -1613,7 +1613,7 @@ int dapm_clock_event(struct snd_soc_dapm_widget *w,

	return 0;
}
EXPORT_SYMBOL_GPL(dapm_clock_event);
EXPORT_SYMBOL_GPL(snd_soc_dapm_clock_event);

static int dapm_widget_power_check(struct snd_soc_dapm_widget *w)
{
@@ -3668,7 +3668,7 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
		}

		/* set to sleep_state when initializing */
		dapm_pinctrl_event(w, NULL, SND_SOC_DAPM_POST_PMD);
		snd_soc_dapm_pinctrl_event(w, NULL, SND_SOC_DAPM_POST_PMD);
		break;
	case snd_soc_dapm_clock_supply:
		w->clk = devm_clk_get(dapm->dev, widget->name);