From patchwork Sun Apr 9 19:38:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 9671721 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 460F5600CB for ; Sun, 9 Apr 2017 19:38:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 327ED26E8A for ; Sun, 9 Apr 2017 19:38:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2732827F10; Sun, 9 Apr 2017 19:38:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C754226E8A for ; Sun, 9 Apr 2017 19:38:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752573AbdDITil (ORCPT ); Sun, 9 Apr 2017 15:38:41 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34740 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752524AbdDITig (ORCPT ); Sun, 9 Apr 2017 15:38:36 -0400 Received: by mail-wm0-f66.google.com with SMTP id x75so6393334wma.1 for ; Sun, 09 Apr 2017 12:38:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=M/hKa7+D4RvDcG+irGd/XhGp5+fePPmrNCeg27mHL2M=; b=a6x/VcmEbWyzsbr1BVq+fhO8muW7ZYmgIrCv8aVjfwYfwyGFTj/Je5qwVH88+kSgg+ y1kCLBkydJ0aLZwpTlxEuTPM0jtzyePqzaUYW4SsaRlgTsmdjPnSZ54ijJfgk5OI2Qme oRnJrwdIwgC2YKl6bcLCpk3aD4ueQZHqgxxwApjDdlkgz8qpZFEdHi/R1KZw4+kv9w2+ bo305WZ+WEY3lBFVo+egeTDWIhvIj8Y11/of3cLYeHfeie45Ia1xgZXDMbLI3dNROke+ ocjW41wSZRYhp87ksrkro9Q3n6JW/L2T7ut6wx/g3NR0BhhEFQvPwJiRoQ78PBLDI/Z2 8XBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=M/hKa7+D4RvDcG+irGd/XhGp5+fePPmrNCeg27mHL2M=; b=npAhwOFKTnUWBUKVI9AtH9/fNvjHC1AZqWiuB8hSGnlIjIwml4/m/xFWgM8poeocG7 ttf6V3TYIjqEEfPAql/7A2D4LJPGdWUVOKLK4L4yIrsxJ4MW9n+7NqN5Y8QQ7S9SxDJB paQJYui9uKqreTFvCg61LLX1bV0EtACR9EVlpe8CcE8vyE/2G5tBTJmkymD1dJ+lNKbY VGfRJ0RU040OKcs9fNt1b3wjjRsPe52nAmrVi1qC1qXdb5Hh0GL1ZKQNmyZ5IGDh0/3W P+4LKAmsSUXIOg58RtUEbp9BE9gTv1DQh5sYaj1mUUo96TgAiMsfHRWH3smaAGehuKQw UsNQ== X-Gm-Message-State: AN3rC/6w6P04Q48Syhl4QzMpgtBk9aPnob8F9ZzE1DyNeXFjaajdXlSf TsOK29omnaNZuQ== X-Received: by 10.28.8.83 with SMTP id 80mr7109181wmi.23.1491766714790; Sun, 09 Apr 2017 12:38:34 -0700 (PDT) Received: from dvbdev.wuest.de (ip-37-24-178-151.hsi14.unitymediagroup.de. [37.24.178.151]) by smtp.gmail.com with ESMTPSA id f135sm7441407wmd.7.2017.04.09.12.38.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 09 Apr 2017 12:38:34 -0700 (PDT) From: Daniel Scheller To: aospan@netup.ru, serjk@netup.ru, mchehab@kernel.org, linux-media@vger.kernel.org Cc: rjkm@metzlerbros.de Subject: [PATCH 04/19] [media] dvb-frontends/cxd2841er: support CXD2837/38/43ER demods/Chip IDs Date: Sun, 9 Apr 2017 21:38:13 +0200 Message-Id: <20170409193828.18458-5-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170409193828.18458-1-d.scheller.oss@gmail.com> References: <20170409193828.18458-1-d.scheller.oss@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Daniel Scheller Those demods are programmed in the same way as the CXD2841ER/54ER and can be handled by this driver. Support added in a way matching the existing code, supported delivery systems are set according to what each demod supports. Updates the type string setting used for printing the "attaching..." log line aswell. Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan --- drivers/media/dvb-frontends/cxd2841er.c | 24 +++++++++++++++++++++++- drivers/media/dvb-frontends/cxd2841er_priv.h | 3 +++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/cxd2841er.c b/drivers/media/dvb-frontends/cxd2841er.c index 09c25d7..72a27cc 100644 --- a/drivers/media/dvb-frontends/cxd2841er.c +++ b/drivers/media/dvb-frontends/cxd2841er.c @@ -3733,16 +3733,39 @@ static struct dvb_frontend *cxd2841er_attach(struct cxd2841er_config *cfg, priv->i2c_addr_slvx, priv->i2c_addr_slvt); chip_id = cxd2841er_chip_id(priv); switch (chip_id) { + case CXD2837ER_CHIP_ID: + snprintf(cxd2841er_t_c_ops.info.name, 128, + "Sony CXD2837ER DVB-T/T2/C demodulator"); + name = "CXD2837ER"; + type = "C/T/T2"; + break; + case CXD2838ER_CHIP_ID: + snprintf(cxd2841er_t_c_ops.info.name, 128, + "Sony CXD2838ER ISDB-T demodulator"); + cxd2841er_t_c_ops.delsys[0] = SYS_ISDBT; + cxd2841er_t_c_ops.delsys[1] = SYS_UNDEFINED; + cxd2841er_t_c_ops.delsys[2] = SYS_UNDEFINED; + name = "CXD2838ER"; + type = "ISDB-T"; + break; case CXD2841ER_CHIP_ID: snprintf(cxd2841er_t_c_ops.info.name, 128, "Sony CXD2841ER DVB-T/T2/C demodulator"); name = "CXD2841ER"; + type = "T/T2/C/ISDB-T"; + break; + case CXD2843ER_CHIP_ID: + snprintf(cxd2841er_t_c_ops.info.name, 128, + "Sony CXD2843ER DVB-T/T2/C/C2 demodulator"); + name = "CXD2843ER"; + type = "C/C2/T/T2"; break; case CXD2854ER_CHIP_ID: snprintf(cxd2841er_t_c_ops.info.name, 128, "Sony CXD2854ER DVB-T/T2/C and ISDB-T demodulator"); cxd2841er_t_c_ops.delsys[3] = SYS_ISDBT; name = "CXD2854ER"; + type = "C/C2/T/T2/ISDB-T"; break; default: dev_err(&priv->i2c->dev, "%s(): invalid chip ID 0x%02x\n", @@ -3762,7 +3785,6 @@ static struct dvb_frontend *cxd2841er_attach(struct cxd2841er_config *cfg, memcpy(&priv->frontend.ops, &cxd2841er_t_c_ops, sizeof(struct dvb_frontend_ops)); - type = "T/T2/C/ISDB-T"; } dev_info(&priv->i2c->dev, diff --git a/drivers/media/dvb-frontends/cxd2841er_priv.h b/drivers/media/dvb-frontends/cxd2841er_priv.h index 0bbce45..6a71264 100644 --- a/drivers/media/dvb-frontends/cxd2841er_priv.h +++ b/drivers/media/dvb-frontends/cxd2841er_priv.h @@ -25,7 +25,10 @@ #define I2C_SLVX 0 #define I2C_SLVT 1 +#define CXD2837ER_CHIP_ID 0xb1 +#define CXD2838ER_CHIP_ID 0xb0 #define CXD2841ER_CHIP_ID 0xa7 +#define CXD2843ER_CHIP_ID 0xa4 #define CXD2854ER_CHIP_ID 0xc1 #define CXD2841ER_DVBS_POLLING_INVL 10