]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: em28xx: add special case for legacy gpiolib interface
authorArnd Bergmann <arnd@arndb.de>
Fri, 8 Aug 2025 15:17:55 +0000 (17:17 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Fri, 29 Aug 2025 09:04:02 +0000 (11:04 +0200)
The em28xx driver uses the old-style gpio_request_one() interface to
switch the lna on the PCTV 290E card.

This interface is becoming optional and should no longer be called by
portable drivers. As I could not figure out an obvious replacement,
select the new GPIOLIB_LEGACY symbol as a workaround.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/usb/em28xx/Kconfig
drivers/media/usb/em28xx/em28xx-dvb.c

index cb61fd6cc6c617dc36ed8f305b02a851ee8fa76f..3122d4bdfc596d8d5de6b5fb6391a2276b74c8b0 100644 (file)
@@ -68,6 +68,7 @@ config VIDEO_EM28XX_DVB
        select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT
        select MEDIA_TUNER_MT2060 if MEDIA_SUBDRV_AUTOSELECT
        select DVB_MXL692 if MEDIA_SUBDRV_AUTOSELECT
+       select GPIOLIB_LEGACY if GPIOLIB && DVB_CXD2820R
        help
          This adds support for DVB cards based on the
          Empiatech em28xx chips.
index 9fce59979e3bd9068c712c9b165f4609bbab91ec..b94f5c70ab750a4da58dc226f985ca6c8f888b41 100644 (file)
@@ -727,7 +727,7 @@ static int em28xx_pctv_290e_set_lna(struct dvb_frontend *fe)
        struct dtv_frontend_properties *c = &fe->dtv_property_cache;
        struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv;
        struct em28xx *dev = i2c_bus->dev;
-#ifdef CONFIG_GPIOLIB
+#ifdef CONFIG_GPIOLIB_LEGACY
        struct em28xx_dvb *dvb = dev->dvb;
        int ret;
        unsigned long flags;
@@ -1705,7 +1705,7 @@ static int em28xx_dvb_init(struct em28xx *dev)
                                goto out_free;
                        }
 
-#ifdef CONFIG_GPIOLIB
+#ifdef CONFIG_GPIOLIB_LEGACY
                        /* enable LNA for DVB-T, DVB-T2 and DVB-C */
                        result = gpio_request_one(dvb->lna_gpio,
                                                  GPIOF_OUT_INIT_LOW, NULL);