]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: pcm6240: Drop bogus code handling IRQ as GPIO
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 12 Mar 2025 13:31:52 +0000 (14:31 +0100)
committerMark Brown <broonie@kernel.org>
Sun, 16 Mar 2025 23:27:39 +0000 (23:27 +0000)
commit17fdf318f5fbe5c27353ae917c0c5a2899d9c259
tree35df66c75f842c67498e268acf2e2b87dd72c54d
parentef5aa8bd22372dd67b7fe19613b86181cd765af8
ASoC: pcm6240: Drop bogus code handling IRQ as GPIO

The current code for the IRQ in pcm6240 makes no sense:
it looks up an IRQ with of_irq_get(), treat it as a GPIO
by issuing gpio_request(), gpio_direction_input()
and gpio_to_irq() on it.

This is just wrong, if the device tree assigns the IRQ
from a GPIO number this is just incorrect: it is clearly
stated that GPIO providers and IRQ providers are
orthogonal.

It is possible to look up an IRQ to a corresponding GPIO
line but this is taking an IRQ and pretending it's a
GPIO, which is just semantically wrong.

Drop the offending code and treat the IRQ that we get
from the device tree as any other IRQ, see for example
other codec drivers.

The DT bindings for this codec does not have any in-tree
DTS files, which may explain why things are weird.

As a bonus, this moves the driver away from the legacy
<linux/gpio.h> include.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patch.msgid.link/20250312-pcm-codecs-v1-3-41ffc4f8fc5c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/pcm6240.c
sound/soc/codecs/pcm6240.h