lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 16 Jun 2024 16:54:58 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Mohammad Rafi Shaik <quic_mohs@...cinc.com>,
 Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
 Banajit Goswami <bgoswami@...cinc.com>, Liam Girdwood <lgirdwood@...il.com>,
 Mark Brown <broonie@...nel.org>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
 Takashi Iwai <tiwai@...e.com>
Cc: alsa-devel@...a-project.org, linux-arm-msm@...r.kernel.org,
 linux-sound@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org, quic_rohkumar@...cinc.com,
 quic_pkumpatl@...cinc.com, Konrad Dybcio <konrad.dybcio@...aro.org>
Subject: Re: [PATCH v6 3/7] ASoC: codecs: wcd937x: add wcd937x codec driver

Le 11/06/2024 à 09:45, Mohammad Rafi Shaik a écrit :
> From: Prasad Kumpatla <quic_pkumpatl@...cinc.com>
> 
> This patch adds basic SoundWire codec driver to support for
> WCD9370/WCD9375 TX and RX devices.
> 
> The WCD9370/WCD9375 has Multi Button Headset Control hardware to
> support Headset insertion, type detection, 8 headset buttons detection,
> Over Current detection and Impedence measurements.
> This patch adds support for this using wcd-mbhc apis.
> 
> Co-developed-by: Konrad Dybcio <konrad.dybcio@...aro.org>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>
> Signed-off-by: Prasad Kumpatla <quic_pkumpatl@...cinc.com>
> Co-developed-by: Mohammad Rafi Shaik <quic_mohs@...cinc.com>
> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@...cinc.com>
> ---

Hi,

this pathc has reached -next, but I have a question.

If I'm correct, I can send a patch, but if the fix can be folded 
somewhere, this is also fine for me.

...

> +static int wcd937x_soc_codec_probe(struct snd_soc_component *component)
> +{

...

> +	wcd937x->hphr_pdm_wd_int = regmap_irq_get_virq(wcd937x->irq_chip,
> +						       WCD937X_IRQ_HPHR_PDM_WD_INT);
> +	wcd937x->hphl_pdm_wd_int = regmap_irq_get_virq(wcd937x->irq_chip,
> +						       WCD937X_IRQ_HPHL_PDM_WD_INT);
> +	wcd937x->aux_pdm_wd_int = regmap_irq_get_virq(wcd937x->irq_chip,
> +						      WCD937X_IRQ_AUX_PDM_WD_INT);
> +
> +	/* Request for watchdog interrupt */
> +	ret = devm_request_threaded_irq(dev, wcd937x->hphr_pdm_wd_int, NULL, wcd937x_wd_handle_irq,
> +					IRQF_ONESHOT | IRQF_TRIGGER_RISING,
> +					"HPHR PDM WDOG INT", wcd937x);
> +	if (ret)
> +		dev_err(dev, "Failed to request HPHR watchdog interrupt (%d)\n", ret);
> +
> +	ret = devm_request_threaded_irq(dev, wcd937x->hphl_pdm_wd_int, NULL, wcd937x_wd_handle_irq,
> +					IRQF_ONESHOT | IRQF_TRIGGER_RISING,
> +					"HPHL PDM WDOG INT", wcd937x);
> +	if (ret)
> +		dev_err(dev, "Failed to request HPHL watchdog interrupt (%d)\n", ret);
> +
> +	ret = devm_request_threaded_irq(dev, wcd937x->aux_pdm_wd_int, NULL, wcd937x_wd_handle_irq,
> +					IRQF_ONESHOT | IRQF_TRIGGER_RISING,
> +					"AUX PDM WDOG INT", wcd937x);
> +	if (ret)
> +		dev_err(dev, "Failed to request Aux watchdog interrupt (%d)\n", ret);
> +
> +	/* Disable watchdog interrupt for HPH and AUX */
> +	disable_irq_nosync(wcd937x->hphr_pdm_wd_int);
> +	disable_irq_nosync(wcd937x->hphl_pdm_wd_int);
> +	disable_irq_nosync(wcd937x->aux_pdm_wd_int);
> +
> +	ret = wcd937x_mbhc_init(component);
> +	if (ret)
> +		dev_err(component->dev, "mbhc initialization failed\n");
> +
> +	return ret;
> +}
> +
> +static void wcd937x_soc_codec_remove(struct snd_soc_component *component)
> +{
> +	struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(component);
> +
> +	wcd937x_mbhc_deinit(component);
> +	free_irq(wcd937x->aux_pdm_wd_int, wcd937x);
> +	free_irq(wcd937x->hphl_pdm_wd_int, wcd937x);
> +	free_irq(wcd937x->hphr_pdm_wd_int, wcd937x);

These irq have been requested wth devm_request_threaded_irq(), so either 
this free_irq should be removed, or devm_free_irq() should be used if 
the order is important.

CJ

> +
> +	wcd_clsh_ctrl_free(wcd937x->clsh_info);
> +}




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ