mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
ASoC: rt5640: Handle nested IRQs
On some Tegra platforms, the RT5640 codec interrupt line is connected via a GPIO controller that operates as a nested IRQ domain. Since nested IRQ controllers only support threaded handlers, request_irq() returns -EINVAL: rt5640 3-001c: Failed to request IRQ 186: -22 Switch to request_any_context_irq() to let the kernel pick the appropriate handler type based on the parent IRQ controller. Signed-off-by: Anupama Kunkulagunta <akunkulagunt@nvidia.com> Signed-off-by: Sheetal <sheetal@nvidia.com> Link: https://patch.msgid.link/20260507094431.3316763-1-sheetal@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
42d99857d6
commit
b613e2b407
|
|
@ -2554,10 +2554,12 @@ static void rt5640_enable_jack_detect(struct snd_soc_component *component,
|
|||
rt5640->jd_gpio = jack_data->jd_gpio;
|
||||
rt5640->jd_gpio_irq = gpiod_to_irq(rt5640->jd_gpio);
|
||||
|
||||
ret = request_irq(rt5640->jd_gpio_irq, rt5640_jd_gpio_irq,
|
||||
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
|
||||
"rt5640-jd-gpio", rt5640);
|
||||
if (ret) {
|
||||
ret = request_any_context_irq(rt5640->jd_gpio_irq,
|
||||
rt5640_jd_gpio_irq,
|
||||
IRQF_TRIGGER_RISING |
|
||||
IRQF_TRIGGER_FALLING,
|
||||
"rt5640-jd-gpio", rt5640);
|
||||
if (ret < 0) {
|
||||
dev_warn(component->dev, "Failed to request jd GPIO IRQ %d: %d\n",
|
||||
rt5640->jd_gpio_irq, ret);
|
||||
rt5640_disable_jack_detect(component);
|
||||
|
|
@ -2569,10 +2571,10 @@ static void rt5640_enable_jack_detect(struct snd_soc_component *component,
|
|||
if (jack_data && jack_data->use_platform_clock)
|
||||
rt5640->use_platform_clock = jack_data->use_platform_clock;
|
||||
|
||||
ret = request_irq(rt5640->irq, rt5640_irq,
|
||||
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
|
||||
"rt5640", rt5640);
|
||||
if (ret) {
|
||||
ret = request_any_context_irq(rt5640->irq, rt5640_irq,
|
||||
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
|
||||
"rt5640", rt5640);
|
||||
if (ret < 0) {
|
||||
dev_warn(component->dev, "Failed to request IRQ %d: %d\n", rt5640->irq, ret);
|
||||
rt5640_disable_jack_detect(component);
|
||||
return;
|
||||
|
|
@ -2623,9 +2625,9 @@ static void rt5640_enable_hda_jack_detect(
|
|||
|
||||
rt5640->jack = jack;
|
||||
|
||||
ret = request_irq(rt5640->irq, rt5640_irq,
|
||||
IRQF_TRIGGER_RISING, "rt5640", rt5640);
|
||||
if (ret) {
|
||||
ret = request_any_context_irq(rt5640->irq, rt5640_irq,
|
||||
IRQF_TRIGGER_RISING, "rt5640", rt5640);
|
||||
if (ret < 0) {
|
||||
dev_warn(component->dev, "Failed to request IRQ %d: %d\n", rt5640->irq, ret);
|
||||
rt5640->jack = NULL;
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user