Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp871243ybp; Fri, 4 Oct 2019 06:19:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXiTE46OzAYlq0g6EO9kxFz1yR/Bhw+qonz8rZgydOdFjLiruljSSm901NNSx9UvZ2I5Zi X-Received: by 2002:a17:906:3298:: with SMTP id 24mr12420263ejw.136.1570195174649; Fri, 04 Oct 2019 06:19:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570195174; cv=none; d=google.com; s=arc-20160816; b=uETvekdeRAMOd9kwC3of8Rgx5IJIAHyKXZgLHA4WG+M/sYUzKr9uTVxPhxcLw5SER7 DtTATV9EUCb+N/6DwspjGIqLjOgosVlo3WfolayRGAHXqFfZ75OcB/xz/J9mNQH+tpGJ Lo0nXR+UxJ7CxxC6nUfgHuHcEccMrp5hRjccraw5tKcYXsI2L/sckhMhiCYT2HgRuz63 Fb5/s8JjgUKX0Sr5QiYgZDAmPA1aHLJw6AqlJPVTgmt3qhep0kfLtVptgk2HZXftKPfa mu75c2h0JoemzFvlS1r2c231/hOfZoEV1Mg4UbN9KJsyKsGAbA+29qUPVFnHNBeYfLbB E2Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5Jk2FsConQzsRK+hX40Ij18Y47YadtEMXcbabS4xxtY=; b=UW0rTSNjFS9ShItcknpra3ELsMQ6phgsMtyCqkNx3INe0k1a+DYLCP0l4+vtp6XCYa 9G/ZmzlEkGsar68x3TZE3DxC41HbA8H8FfpPlPf9m5/fjtbJxa5Mncwi4DMuPbHpPQl0 3+xmoImuiboicM9c6533Nt52Sq0ZwUwZ4SiwmDLPNeGRkSGR32f8fUrEk36Dw1WyTcxt xelavWlp1wyChJtXMRRyFzuOWKml/nkye537YMOEzV8uunAQFs/k3osqLJqVwcWbcslA xlgYelbzVsP1BS6RZHozUUqUY0W5Gn1lkpY8GOrQviIN16hviLmfb3rHHf6gsPW24nQp 3mUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jXIrfHc8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 26si3165539ejl.292.2019.10.04.06.19.09; Fri, 04 Oct 2019 06:19:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jXIrfHc8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388446AbfJDNPg (ORCPT + 99 others); Fri, 4 Oct 2019 09:15:36 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:45552 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388362AbfJDNPd (ORCPT ); Fri, 4 Oct 2019 09:15:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5Jk2FsConQzsRK+hX40Ij18Y47YadtEMXcbabS4xxtY=; b=jXIrfHc8V9Vh47xoIPFMutpDf9 RL16l8pr5w31/0SRBIMtw+5g9PUj2bVglq4SWN4RyY6ZlDE4CwYAjkujYBAHnN9yiacvsDn3LdyhA aNUGOADYAzg6zLCfA1HID5O12KsDHq46t7G/063BWC/LYG7kijxCXQ/adGv+ip8ZktHDzqFhksEb/ GcXSWfrssd2bPFeit8r+7P07YzjwnlXolwy7hNjWR9tGDh20qExWz2RxT9pl43oblRAscvuuxbCBi kB3H4+flB+LMFsjzcQ4JlmQciCIRwo1FF0edQxdiAUloYljwgg6rXd6XBrvDlCJE2Go+Ra96Zo5Ba b5raJcrw==; Received: from 177.133.68.49.dynamic.adsl.gvt.net.br ([177.133.68.49] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92.2 #3 (Red Hat Linux)) id 1iGNQj-0007jG-5d; Fri, 04 Oct 2019 13:15:33 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92.2) (envelope-from ) id 1iGNQg-0002hw-8j; Fri, 04 Oct 2019 10:15:30 -0300 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , JP , Gonsolo , crope@iki.fi, Sean Young , Linux Kernel Subject: [PATCH 3/4] media: af9035: add support for Logilink VG0022A Date: Fri, 4 Oct 2019 10:15:24 -0300 Message-Id: <9618316567493f917c41109f7dba94e533fbfb4b.1570194906.git.mchehab+samsung@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <2942b7ca9ecf86b6bff75c10ccfca25c173c3f0d.1570194906.git.mchehab+samsung@kernel.org> References: <2942b7ca9ecf86b6bff75c10ccfca25c173c3f0d.1570194906.git.mchehab+samsung@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This it930x-based device has an issue with si2068. When the si2168 firmware that came with the device is replaced by a new one, any I2C data received from the tuner will be replaced by 0xff. Probably, the vendor firmware has some patch specifically designed for this device. So, we can't replace by the generic firmware. The right solution would be to extract the si2168 firmware from the original driver and ask the driver to load the specifically designed firmware, but, while we don't have that, the next best solution is to just keep the original firmware at the device. For more details, see the discussions at: https://lore.kernel.org/linux-media/20191002141359.30166-2-gonsolo@gmail.com/ Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb-v2/af9035.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index 3afd18733614..e555483c3077 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c @@ -1255,6 +1255,23 @@ static int it930x_frontend_attach(struct dvb_usb_adapter *adap) si2168_config.fe = &adap->fe[0]; si2168_config.ts_mode = SI2168_TS_SERIAL; + /* + * HACK: The Logilink VG0022A has a bug: when the si2168 + * firmware that came with the device is replaced by a new + * one, the I2C transfers to the tuner will return just 0xff. + * + * Probably, the vendor firmware has some patch specifically + * designed for this device. So, we can't replace by the + * generic firmware. The right solution would be to extract + * the si2168 firmware from the original driver and ask the + * driver to load the specifically designed firmware, but, + * while we don't have that, the next best solution is to just + * keep the original firmware at the device. + */ + if (le16_to_cpu(d->udev->descriptor.idVendor) == USB_VID_DEXATEK && + le16_to_cpu(d->udev->descriptor.idProduct) == 0x0100) + si2168_config.dont_load_firmware = true; + state->af9033_config[adap->id].fe = &adap->fe[0]; state->af9033_config[adap->id].ops = &state->ops; ret = af9035_add_i2c_dev(d, "si2168", @@ -2121,6 +2138,8 @@ static const struct usb_device_id af9035_id_table[] = { &it930x_props, "ITE 9303 Generic", NULL) }, { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_TD310, &it930x_props, "AVerMedia TD310 DVB-T2", NULL) }, + { DVB_USB_DEVICE(USB_VID_DEXATEK, 0x0100, + &it930x_props, "Logilink VG0022A", NULL) }, { } }; MODULE_DEVICE_TABLE(usb, af9035_id_table); -- 2.21.0