From patchwork Sat Jun 12 09:13:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 74999 X-Patchwork-Delegate: sean@mess.org Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1lrziN-00D64L-Tq; Sat, 12 Jun 2021 09:14:04 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230427AbhFLJQA (ORCPT + 1 other); Sat, 12 Jun 2021 05:16:00 -0400 Received: from antares.kleine-koenig.org ([94.130.110.236]:43880 "EHLO antares.kleine-koenig.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229819AbhFLJQA (ORCPT ); Sat, 12 Jun 2021 05:16:00 -0400 Received: by antares.kleine-koenig.org (Postfix, from userid 1000) id 77C09BC9B1A; Sat, 12 Jun 2021 11:13:59 +0200 (CEST) From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Antti Palosaari , Mauro Carvalho Chehab Cc: Tomasz Maciej Nowak , Sean Young , Gon Solo , Andreas Kemnade , linux-media@vger.kernel.org Subject: [PATCH 1/2] media: usb: dvb-usb-v2: af9035: report if i2c client isn't bound Date: Sat, 12 Jun 2021 11:13:50 +0200 Message-Id: <20210612091351.7169-1-uwe@kleine-koenig.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -3.1 (---) X-LSpam-Report: No, score=-3.1 required=5.0 tests=BAYES_00=-1.9,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_LOW=-0.7 autolearn=ham autolearn_force=no If a sub device doesn't immediately bind after it was added, emit an error indication to the kernel log to help debugging. This happens for example if the needed driver isn't available at all. Signed-off-by: Uwe Kleine-König --- drivers/media/usb/dvb-usb-v2/af9035.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index 22fda53e219a..6b7db903a365 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c @@ -210,6 +210,7 @@ static int af9035_add_i2c_dev(struct dvb_usb_device *d, const char *type, /* register I2C device */ client = i2c_new_client_device(adapter, &board_info); if (!i2c_client_has_driver(client)) { + dev_err(&intf->dev, "failed to bind i2c device to %s driver\n", type); ret = -ENODEV; goto err; } From patchwork Sat Jun 12 09:13:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 75000 X-Patchwork-Delegate: sean@mess.org Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1lrziV-00D64f-3k; Sat, 12 Jun 2021 09:14:11 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230470AbhFLJQI (ORCPT + 1 other); Sat, 12 Jun 2021 05:16:08 -0400 Received: from antares.kleine-koenig.org ([94.130.110.236]:43900 "EHLO antares.kleine-koenig.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229819AbhFLJQH (ORCPT ); Sat, 12 Jun 2021 05:16:07 -0400 Received: by antares.kleine-koenig.org (Postfix, from userid 1000) id 97BD0BC9B1D; Sat, 12 Jun 2021 11:14:03 +0200 (CEST) From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Antti Palosaari , Mauro Carvalho Chehab Cc: Tomasz Maciej Nowak , Sean Young , Gon Solo , Andreas Kemnade , linux-media@vger.kernel.org Subject: [PATCH 2/2] media: usb: dvb-usb-v2: af9035: let subdrv autoselect enable si2168 and si2157 Date: Sat, 12 Jun 2021 11:13:51 +0200 Message-Id: <20210612091351.7169-2-uwe@kleine-koenig.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210612091351.7169-1-uwe@kleine-koenig.org> References: <20210612091351.7169-1-uwe@kleine-koenig.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -3.1 (---) X-LSpam-Report: No, score=-3.1 required=5.0 tests=BAYES_00=-1.9,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_LOW=-0.7 autolearn=ham autolearn_force=no The Logilink VG0022A DVB-T2 stick has these three devices. So to enable support for this stick in the presence of MEDIA_SUBDRV_AUTOSELECT, let DVB_USB_AF9035 select the two other drivers. Signed-off-by: Uwe Kleine-König --- drivers/media/usb/dvb-usb-v2/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/usb/dvb-usb-v2/Kconfig b/drivers/media/usb/dvb-usb-v2/Kconfig index 5c75303fba9d..60ca8b9d070b 100644 --- a/drivers/media/usb/dvb-usb-v2/Kconfig +++ b/drivers/media/usb/dvb-usb-v2/Kconfig @@ -34,6 +34,8 @@ config DVB_USB_AF9035 tristate "Afatech AF9035 DVB-T USB2.0 support" depends on DVB_USB_V2 select DVB_AF9033 + select DVB_SI2168 if MEDIA_SUBDRV_AUTOSELECT + select MEDIA_TUNER_SI2157 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_TUA9001 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_FC0011 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_MXL5007T if MEDIA_SUBDRV_AUTOSELECT