summaryrefslogtreecommitdiffstats
path: root/sound/core/info.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-08-19 21:05:39 +0200
committerMark Brown <broonie@kernel.org>2021-08-19 23:27:56 +0100
commit15d54840ecf6f00061d03180394a0a21ff8ffa48 (patch)
tree47581d9ee7dd2c5bf78219db52ac8e1113fd9876 /sound/core/info.c
parent5caab9f48b96f6998fb23d38a7b57fca91ef1653 (diff)
downloadlinux-15d54840ecf6f00061d03180394a0a21ff8ffa48.tar.bz2
ASoC: rt5640: Delay requesting IRQ until the machine-drv calls set_jack
Delay requesting the IRQ until the machine-drv calls set_jack. The main reason for this is that the codec's IRQ is unused on some boards, in which case we really should not call request_irq at all. On some boards there is an IRQ listed at index 0 for the codec, but this is not connected to the codec, but rather is directly connected to the jack's jack-detect pin. These special setups will be handled by the machine-driver, but the machine driver can only request the IRQ if it is not first requested by the codec driver. Moving the request_irq to the set_jack callback (which will not get called in this case) avoids the codec-driver clobbering the IRQ. Moving the request_irq also removes the need to disable the IRQ immediately after requesting it, avoiding a small race (this could also have been fixed by using the new IRQF_NO_AUTOEN flag when requesting the IRQ). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210819190543.784415-3-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/core/info.c')
0 files changed, 0 insertions, 0 deletions