diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2024-08-07 17:02:32 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-10-04 16:29:05 +0200 |
| commit | 92b53ece5d3701c526ee5ac626ddd752548d2c01 (patch) | |
| tree | 2d5b842187ed0902c9451f73c8c37e9baa9ebbb2 /include/sound | |
| parent | ac7976b672770b0d7722e0885c3f6543a8a3cacf (diff) | |
| download | linux-92b53ece5d3701c526ee5ac626ddd752548d2c01.tar.gz linux-92b53ece5d3701c526ee5ac626ddd752548d2c01.tar.bz2 linux-92b53ece5d3701c526ee5ac626ddd752548d2c01.zip | |
ASoC: tas2781-i2c: Drop weird GPIO code
[ Upstream commit c2c0b67dca3cb3b3cea0dd60075a1c5ba77e2fcd ]
The tas2781-i2c driver gets an IRQ from either ACPI or device tree,
then proceeds to check if the IRQ has a corresponding GPIO and in
case it does enforce the GPIO as input and set a label on it.
This is abuse of the API:
- First we cannot guarantee that the numberspaces of the GPIOs and
the IRQs are the same, i.e that an IRQ number corresponds to
a GPIO number like that.
- Second, GPIO chips and IRQ chips should be treated as orthogonal
APIs, the irqchip needs to ascertain that the backing GPIO line
is set to input etc just using the irqchip.
- Third it is using the legacy <linux/gpio.h> API which should not
be used in new code yet this was added just a year ago.
Delete the offending code.
If this creates problems the GPIO and irqchip maintainers can help
to fix the issues.
It *should* not create any problems, because the irq isn't
used anywhere in the driver, it's just obtained and then
left unused.
Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patch.msgid.link/20240807-asoc-tas-gpios-v2-1-bd0f2705d58b@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/sound')
| -rw-r--r-- | include/sound/tas2781.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h index be6f70dd54f9..f97f386e5a55 100644 --- a/include/sound/tas2781.h +++ b/include/sound/tas2781.h @@ -78,11 +78,6 @@ struct tasdevice { bool is_loaderr; }; -struct tasdevice_irqinfo { - int irq_gpio; - int irq; -}; - struct calidata { unsigned char *data; unsigned long total_sz; @@ -90,7 +85,6 @@ struct calidata { struct tasdevice_priv { struct tasdevice tasdevice[TASDEVICE_MAX_CHANNELS]; - struct tasdevice_irqinfo irq_info; struct tasdevice_rca rcabin; struct calidata cali_data; struct tasdevice_fw *fmw; @@ -111,6 +105,7 @@ struct tasdevice_priv { unsigned int chip_id; unsigned int sysclk; + int irq; int cur_prog; int cur_conf; int fw_state; |
