Stop the DKMS Intel CVS driver from claiming the amplifiers' speaker-ID GPIO

The in-tree 7.2 CVS driver we ship as the intel-cvs DKMS module requests its
"wake" line with devm_gpiod_get(). On the Dell XPS 14 DA14260 that pin
(\_SB.GPI1 20) is the shared GpioIo the four CS35L57 amplifiers read their
speaker ID from, so with this package installed every cs35l56 probe fails with
"error -EBUSY: Failed to get spk-id-gpios" and the machine has no sound card.

Carry Junjie Cao's upstream fix, "media: i2c: cvs: Get the wake IRQ without
claiming the GPIO" (Cc: stable, Fixes: 8e2b43d2c10b), applied to the
downloaded intel-cvs-core.c in prepare(). makepkg symlinks plain downloads
into srcdir and patch refuses symlinks, so the file is copied first. Drop the
patch once the stable tag we fetch from contains the fix.

Link: https://github.com/thesofproject/sof/issues/11152
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2529031
This commit is contained in:
Spencer Bull committed 2026-09-12 19:25:52 -05:00
1 parent 5501e168f7
commit 21c0630334
4 files changed
+110 -8

No files matched your search

@@ -0,0 +1,83 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Junjie Cao <junjie.cao@intel.com>
Date: Tue, 08 Sep 2026 18:57:17 +0800
Subject: [PATCH] media: i2c: cvs: Get the wake IRQ without claiming the GPIO
Message-ID: <20260908105717.496232-1-junjie.cao@intel.com>
Link: https://patchwork.linuxtv.org/project/linux-media/patch/20260908105717.496232-1-junjie.cao@intel.com/
The wake line is only used as an IRQ source, yet the driver requests
it with devm_gpiod_get() before the I2C handshake. Where ipu-bridge
does not expose the CSI endpoints, CSI init returns -EPROBE_DEFER and
every retry claims the line again for the length of the handshake.
On the Dell XPS 14 DA14260 (Panther Lake) the four CS35L57 amplifiers
read their speaker ID from one GpioIo (DSDT decoded in the second
link):
GpioIo (Shared, PullNone, 0, 0, IoRestrictionInputOnly,
"\_SB.GPI1", 0, ResourceConsumer,,) {20}
A request that lands while another consumer holds the line fails, and
cs35l56 does not retry:
cs35l56 sdw:0:2:01fa:3557:01:2: error -EBUSY: Failed to get spk-id-gpios
All four fail on Fedora 7.1.13, the first Fedora 7.1 kernel with the
driver enabled; the same board on 7.1.12 without it creates the card.
The second link shows the same failure on openSUSE 7.2.2, whose
config also enables the driver.
The INTC10E1 _CRS of this machine has not been decoded. The vendor
driver in intel/vision-drivers requests req, resp and rst the same
way but maps wake to an IRQ with acpi_dev_gpio_irq_get_by() without
requesting it, and on another DA14260 (board 0VRKYR, BIOS 1.8.2) a
build of it is bound while the amplifiers probe. The wake entry is
the line that differs.
Take the IRQ from the GpioInt entry the same way, as the I2C core
does for client->irq; this also applies the trigger type from _CRS.
The driver binds as a platform device too, hence the explicit lookup.
Fixes: 8e2b43d2c10b ("media: i2c: cvs: Add driver of Intel Computer Vision Sensing Controller(CVS)")
Cc: stable@vger.kernel.org
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2529031
Link: https://github.com/thesofproject/sof/issues/11152
Signed-off-by: Junjie Cao <junjie.cao@intel.com>
---
drivers/media/i2c/cvs/core.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/media/i2c/cvs/core.c b/drivers/media/i2c/cvs/core.c
index d4a3b9c3bab1e..8d857bbd8ab51 100644
--- a/drivers/media/i2c/cvs/core.c
+++ b/drivers/media/i2c/cvs/core.c
@@ -725,8 +725,6 @@ static int cvs_core_probe(struct device *dev, struct i2c_client *i2c)
}
if (ctx->res == ICVS_FULLCAP) {
- struct gpio_desc *wake;
-
ctx->rst = devm_gpiod_get(dev, "rst", GPIOD_OUT_HIGH);
if (IS_ERR(ctx->rst)) {
ret = dev_err_probe(dev, PTR_ERR(ctx->rst),
@@ -734,14 +732,12 @@ static int cvs_core_probe(struct device *dev, struct i2c_client *i2c)
goto err_put_ipu;
}
- wake = devm_gpiod_get(dev, "wake", GPIOD_IN);
- if (IS_ERR(wake)) {
- ret = dev_err_probe(dev, PTR_ERR(wake),
- "failed to get wake GPIO\n");
- goto err_put_ipu;
- }
-
- ctx->irq = gpiod_to_irq(wake);
+ /*
+ * Do not request the line: another device's _CRS may list
+ * the same pin, and its driver would then fail with -EBUSY.
+ */
+ ctx->irq = acpi_dev_gpio_irq_get_by(ACPI_COMPANION(dev),
+ "wake", 0);
if (ctx->irq < 0) {
ret = dev_err_probe(dev, ctx->irq,
"failed to get wake IRQ\n");
+19 -2
View File
@@ -2,7 +2,7 @@
pkgname=intel-ipu7-camera
pkgver=1.0.6
pkgrel=1
pkgrel=2
pkgdesc="Intel IPU7 MIPI camera stack for Hurrican/Performance (OV08X40 + hardware ISP)"
arch=('x86_64')
url="https://github.com/TsaiGaggery/hurrican_omarchy_enabling"
@@ -42,10 +42,16 @@ _icamerasrc_commit="4fb31db76b618aae72184c59314b839dedb42689"
# CSI2 receiver as an "Intel CVS" V4L2 bridge sub-device, provided by the
# in-tree drivers/media/i2c/cvs driver. The legacy vision-drivers misc driver
# has no such sub-device, so on 7.2 the sensor never joins the graph and the
# HAL finds no camera. We ship the in-tree driver verbatim as a DKMS module
# HAL finds no camera. We ship the in-tree driver as a DKMS module
# for 7.2+ kernels (Arch-derived kernel configs cannot enable it: the option
# is hidden behind MEDIA_HIDE_ANCILLARY_SUBDRV) and keep vision-drivers for
# older kernels. Both dkms.conf files carry matching BUILD_EXCLUSIVE_KERNEL.
#
# 0007 is the upstream fix for the audio regression on the Dell XPS 14
# DA14260: the driver requested its "wake" GPIO, which shares a pin with the
# CS35L57 amplifiers' speaker-ID GpioIo, so every cs35l56 probe failed with
# -EBUSY and the sound card never appeared. Drop it once the stable tag
# fetched below contains the fix.
_intel_cvs_kernel_tag="v7.2.5"
_intel_cvs_url="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/drivers/media/i2c/cvs"
@@ -62,6 +68,7 @@ source=(
"0003-icvs-set-rgbcamera_pwrup_host-0-for-Panther-Lake.patch"
"0005-camhal-MediaControl-route-through-Intel-CVS-bridge.patch"
"0006-camhal-ipu75xa-ov08x40-Intel-CVS-formats.patch"
"0007-media-i2c-cvs-get-the-wake-irq-without-claiming-the-gpio.patch"
"dkms-ipu7-drivers.conf"
"dkms-vision-drivers.conf"
"dkms-intel-cvs.conf"
@@ -88,6 +95,7 @@ sha256sums=(
'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP'
'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP'
'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP'
'SKIP'
)
prepare() {
@@ -106,6 +114,15 @@ prepare() {
patch -Np1 -i "${srcdir}/0005-camhal-MediaControl-route-through-Intel-CVS-bridge.patch"
patch -Np1 -i "${srcdir}/0006-camhal-ipu75xa-ov08x40-Intel-CVS-formats.patch"
# Intel CVS: take the wake IRQ without claiming the GPIO (shared with the
# speaker-ID line on the XPS 14). makepkg symlinks plain downloads into
# srcdir and patch refuses to touch a symlink, so patch a real copy. The
# patch is against a/drivers/media/i2c/cvs/core.c, hence -p5.
cp --remove-destination "$(readlink -f "${srcdir}/intel-cvs-core.c")" \
"${srcdir}/intel-cvs-core.c"
patch -p5 -F0 --no-backup-if-mismatch "${srcdir}/intel-cvs-core.c" \
< "${srcdir}/0007-media-i2c-cvs-get-the-wake-irq-without-claiming-the-gpio.patch"
# Stage proprietary libs/headers for build-time use
local staging="${srcdir}/staging"
rm -rf "${staging}"
@@ -1,10 +1,11 @@
# Intel CVS (Computer Vision Sensing) CSI-2 bridge driver.
#
# Verbatim copy of the in-tree Linux 7.2 driver (drivers/media/i2c/cvs),
# built out of tree so it exists on every 7.2+ kernel regardless of the
# kernel's Kconfig. Arch-derived configs cannot enable VIDEO_INTEL_CVS at
# all: it lives under the "Miscellaneous helper chips" menu, which is
# hidden by MEDIA_HIDE_ANCILLARY_SUBDRV unless CONFIG_EXPERT is set.
# Copy of the in-tree Linux 7.2 driver (drivers/media/i2c/cvs) plus the
# upstream wake-IRQ fix carried by the PKGBUILD, built out of tree so it
# exists on every 7.2+ kernel regardless of the kernel's Kconfig.
# Arch-derived configs cannot enable VIDEO_INTEL_CVS at all: it lives under
# the "Miscellaneous helper chips" menu, which is hidden by
# MEDIA_HIDE_ANCILLARY_SUBDRV unless CONFIG_EXPERT is set.
#
# 7.2's ipu-bridge inserts the CVS device between the sensor and the IPU
# CSI2 receiver, so the IPU only sees the sensor once a driver registers
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
# Out-of-tree build of the in-tree Linux 7.2 Intel CVS driver
# (drivers/media/i2c/cvs). Sources are unmodified kernel files.
# (drivers/media/i2c/cvs). Sources are kernel files plus the upstream
# wake-IRQ fix carried by the PKGBUILD.
KERNELRELEASE ?= $(shell uname -r)
KERNEL_SRC ?= /lib/modules/$(KERNELRELEASE)/build