tda10071: make sure both tuner and demod i2c addresses are specified
Message ID | CAOcJUbwQEmSJbivtb5ieVGNPJP64+UErqOgieX+5KJRs8yeEjQ@mail.gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1Tm2t8-0002i0-9B; Fri, 21 Dec 2012 14:43:46 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-4) with esmtp id 1Tm2t6-0002dW-CH; Fri, 21 Dec 2012 14:43:45 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751193Ab2LUNnm (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Fri, 21 Dec 2012 08:43:42 -0500 Received: from mail-la0-f48.google.com ([209.85.215.48]:51568 "EHLO mail-la0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751105Ab2LUNnm (ORCPT <rfc822;linux-media@vger.kernel.org>); Fri, 21 Dec 2012 08:43:42 -0500 Received: by mail-la0-f48.google.com with SMTP id m13so5001992lah.21 for <linux-media@vger.kernel.org>; Fri, 21 Dec 2012 05:43:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=UEdZeAWI/Gm5BbII3dazsZTzHQMnU2j8Utyu/9Mj2ao=; b=tn0HmckHQBta4WnXhSf5ZsethuS0yC5bKTA2fSvqFEKIXa9z0MWQtHUNCGnvTiE0P4 Mf+mvVnLVLUCrz6axuH0JOCLcIvVlokt1YuW+EB2gman+MRT5Z9c/BAoDoz/ca9Qwku7 MOXXhD0WRq1OlhNLYNQqM4Xj/9wVBg2fmWZfGcWey0XqjPc4v69xon2u277aKYNCBDYW YO2tvN8p9Y7XPlUwO6aysbo9RGEiET71ls833QiRxAWHdJjkOSuVV7RLu+IWSVwvT2QJ hX0xwDddjd6xIIGOb4LD3M2QBoUB3GzPtyV2bKXr/jgpvttGUqrNjj2hrcPgWVAgfjSV LYCg== MIME-Version: 1.0 Received: by 10.112.45.232 with SMTP id q8mr5422490lbm.23.1356097420086; Fri, 21 Dec 2012 05:43:40 -0800 (PST) Received: by 10.114.64.74 with HTTP; Fri, 21 Dec 2012 05:43:40 -0800 (PST) In-Reply-To: <CAHAyoxw34qjQ72+xvOs+5RmLCeLpX2JWsgJg=115kzqkup5vrA@mail.gmail.com> References: <1355706724-25663-1-git-send-email-mkrufky@linuxtv.org> <CAOcJUbxdvHZFqtvv5CEcgrWqof1425O+9Bp=GgE41kDm-QMrKg@mail.gmail.com> <CAOcJUbwqihx8NydLR9jqOXCn3Sd8aF7XND+jeGG9mxUHOwfrNw@mail.gmail.com> <CAHAyoxw34qjQ72+xvOs+5RmLCeLpX2JWsgJg=115kzqkup5vrA@mail.gmail.com> Date: Fri, 21 Dec 2012 08:43:40 -0500 X-Google-Sender-Auth: mBLugBR7Q-rIgDgJmjJ_lxiytJw Message-ID: <CAOcJUbwQEmSJbivtb5ieVGNPJP64+UErqOgieX+5KJRs8yeEjQ@mail.gmail.com> Subject: Re: [PATCH] tda10071: make sure both tuner and demod i2c addresses are specified From: Michael Krufky <mkrufky@linuxtv.org> To: linux-media <linux-media@vger.kernel.org> Cc: mchehab@redhat.com Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.12.21.133024 X-PMX-Spam: Gauge=X, Probability=10%, Report=' HASHBUSTER_BLOCK_V2 0.5, HTML_00_01 0.05, HTML_00_10 0.05, DATE_TZ_NA 0, DKIM_SIGNATURE 0, URI_ENDS_IN_HTML 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __HASHBUSTER_BLOCK_V2_1 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __PHISH_SPEAR_HTTP_RECEIVED 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' |
Pull-request
git://git.linuxtv.org/mkrufky/tuners tda10071Message
Michael Ira Krufky
Dec. 21, 2012, 1:43 p.m. UTC
rebased against today's tip, as per your request :-) pwclient update -s 'superseded' 15923 pwclient update -s 'superseded' 15930 The following changes since commit 1b5901331ff3af4bdc1b998a056a248c9924e2d1: [media] exynos-gsc: modify number of output/capture buffers (2012-12-21 10:26:44 -0200) are available in the git repository at: git://git.linuxtv.org/mkrufky/tuners tda10071 for you to fetch changes up to d562d77132333f0a7b1d704edc992a092d6d6bbe: tda10071: make sure both tuner and demod i2c addresses are specified (2012-12-21 08:29:49 -0500) Cheers, Mike On Fri, Dec 21, 2012 at 8:32 AM, Michael Krufky <mkrufky@kernellabs.com> wrote: > rebased against today's tip, as per your request :-) > > > pwclient update -s 'superseded' 15923 > pwclient update -s 'superseded' 15930 > > > The following changes since commit 1b5901331ff3af4bdc1b998a056a248c9924e2d1: > > [media] exynos-gsc: modify number of output/capture buffers > (2012-12-21 10:26:44 -0200) > > are available in the git repository at: > > git://git.linuxtv.org/mkrufky/tuners tda10071 > > for you to fetch changes up to d562d77132333f0a7b1d704edc992a092d6d6bbe: > > tda10071: make sure both tuner and demod i2c addresses are specified > (2012-12-21 08:29:49 -0500) > > ---------------------------------------------------------------- > Michael Krufky (1): > tda10071: make sure both tuner and demod i2c addresses are specified > > drivers/media/dvb-frontends/tda10071.c | 18 +++++++++++++++--- > drivers/media/dvb-frontends/tda10071.h | 4 ++-- > drivers/media/pci/cx23885/cx23885-dvb.c | 2 +- > drivers/media/usb/em28xx/em28xx-dvb.c | 3 ++- > 4 files changed, 20 insertions(+), 7 deletions(-) > > Cheers, > > Mike > > On Mon, Dec 17, 2012 at 10:10 AM, Michael Krufky <mkrufky@linuxtv.org> wrote: >> As discussed on irc, the following pwclient commands should update the >> status of the patches in patchwork to correspond with this merge >> request: >> >> pwclient update -s 'superseded' 15923 >> pwclient update -s 'accepted' 15930 >> >> >> Cheers, >> >> Mike >> >> On Mon, Dec 17, 2012 at 10:09 AM, Michael Krufky <mkrufky@linuxtv.org> wrote: >>> Mauro, >>> >>> Please merge: >>> >>> The following changes since commit 4c8e64232d4a71e68d68b9093506966c0244a526: >>> >>> cx23885: add basic DVB-S2 support for Hauppauge HVR-4400 (2012-12-16 >>> 12:27:25 -0500) >>> >>> are available in the git repository at: >>> >>> git://linuxtv.org/mkrufky/tuners tda10071 >>> >>> for you to fetch changes up to 326e65af0104faf8a243e534eb8bfdb35b73f4ed: >>> >>> tda10071: make sure both tuner and demod i2c addresses are specified >>> (2012-12-16 18:05:02 -0500) >>> >>> ---------------------------------------------------------------- >>> Michael Krufky (1): >>> tda10071: make sure both tuner and demod i2c addresses are specified >>> >>> drivers/media/dvb-frontends/tda10071.c | 18 +++++++++++++++--- >>> drivers/media/dvb-frontends/tda10071.h | 4 ++-- >>> drivers/media/pci/cx23885/cx23885-dvb.c | 2 +- >>> drivers/media/usb/em28xx/em28xx-dvb.c | 3 ++- >>> 4 files changed, 20 insertions(+), 7 deletions(-) >>> >>> Cheers, >>> >>> Mike >>> >>> On Sun, Dec 16, 2012 at 8:12 PM, Michael Krufky <mkrufky@linuxtv.org> wrote: >>>> display an error message if either tuner_i2c_addr or demod_i2c_addr >>>> are not specified in the tda10071_config structure >>>> >>>> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> >>>> --- >>>> drivers/media/dvb-frontends/tda10071.c | 18 +++++++++++++++--- >>>> drivers/media/dvb-frontends/tda10071.h | 4 ++-- >>>> drivers/media/pci/cx23885/cx23885-dvb.c | 2 +- >>>> drivers/media/usb/em28xx/em28xx-dvb.c | 3 ++- >>>> 4 files changed, 20 insertions(+), 7 deletions(-) >>>> >>>> diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c >>>> index 7103629..02f9234 100644 >>>> --- a/drivers/media/dvb-frontends/tda10071.c >>>> +++ b/drivers/media/dvb-frontends/tda10071.c >>>> @@ -30,7 +30,7 @@ static int tda10071_wr_regs(struct tda10071_priv *priv, u8 reg, u8 *val, >>>> u8 buf[len+1]; >>>> struct i2c_msg msg[1] = { >>>> { >>>> - .addr = priv->cfg.i2c_address, >>>> + .addr = priv->cfg.demod_i2c_addr, >>>> .flags = 0, >>>> .len = sizeof(buf), >>>> .buf = buf, >>>> @@ -59,12 +59,12 @@ static int tda10071_rd_regs(struct tda10071_priv *priv, u8 reg, u8 *val, >>>> u8 buf[len]; >>>> struct i2c_msg msg[2] = { >>>> { >>>> - .addr = priv->cfg.i2c_address, >>>> + .addr = priv->cfg.demod_i2c_addr, >>>> .flags = 0, >>>> .len = 1, >>>> .buf = ®, >>>> }, { >>>> - .addr = priv->cfg.i2c_address, >>>> + .addr = priv->cfg.demod_i2c_addr, >>>> .flags = I2C_M_RD, >>>> .len = sizeof(buf), >>>> .buf = buf, >>>> @@ -1202,6 +1202,18 @@ struct dvb_frontend *tda10071_attach(const struct tda10071_config *config, >>>> goto error; >>>> } >>>> >>>> + /* make sure demod i2c address is specified */ >>>> + if (!config->demod_i2c_addr) { >>>> + dev_dbg(&i2c->dev, "%s: invalid demod i2c address!\n", __func__); >>>> + goto error; >>>> + } >>>> + >>>> + /* make sure tuner i2c address is specified */ >>>> + if (!config->tuner_i2c_addr) { >>>> + dev_dbg(&i2c->dev, "%s: invalid tuner i2c address!\n", __func__); >>>> + goto error; >>>> + } >>>> + >>>> /* setup the priv */ >>>> priv->i2c = i2c; >>>> memcpy(&priv->cfg, config, sizeof(struct tda10071_config)); >>>> diff --git a/drivers/media/dvb-frontends/tda10071.h b/drivers/media/dvb-frontends/tda10071.h >>>> index a20d5c4..bff1c38 100644 >>>> --- a/drivers/media/dvb-frontends/tda10071.h >>>> +++ b/drivers/media/dvb-frontends/tda10071.h >>>> @@ -28,10 +28,10 @@ struct tda10071_config { >>>> * Default: none, must set >>>> * Values: 0x55, >>>> */ >>>> - u8 i2c_address; >>>> + u8 demod_i2c_addr; >>>> >>>> /* Tuner I2C address. >>>> - * Default: 0x14 >>>> + * Default: none, must set >>>> * Values: 0x14, 0x54, ... >>>> */ >>>> u8 tuner_i2c_addr; >>>> diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c >>>> index cf84c53..a1aae56 100644 >>>> --- a/drivers/media/pci/cx23885/cx23885-dvb.c >>>> +++ b/drivers/media/pci/cx23885/cx23885-dvb.c >>>> @@ -662,7 +662,7 @@ static struct mt2063_config terratec_mt2063_config[] = { >>>> }; >>>> >>>> static const struct tda10071_config hauppauge_tda10071_config = { >>>> - .i2c_address = 0x05, >>>> + .demod_i2c_addr = 0x05, >>>> .tuner_i2c_addr = 0x54, >>>> .i2c_wr_max = 64, >>>> .ts_mode = TDA10071_TS_SERIAL, >>>> diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c >>>> index 63f2e70..e800881 100644 >>>> --- a/drivers/media/usb/em28xx/em28xx-dvb.c >>>> +++ b/drivers/media/usb/em28xx/em28xx-dvb.c >>>> @@ -714,7 +714,8 @@ static struct tda18271_config em28xx_cxd2820r_tda18271_config = { >>>> }; >>>> >>>> static const struct tda10071_config em28xx_tda10071_config = { >>>> - .i2c_address = 0x55, /* (0xaa >> 1) */ >>>> + .demod_i2c_addr = 0x55, /* (0xaa >> 1) */ >>>> + .tuner_i2c_addr = 0x14, >>>> .i2c_wr_max = 64, >>>> .ts_mode = TDA10071_TS_SERIAL, >>>> .spec_inv = 0, >>>> -- >>>> 1.7.10.4 >>>> -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html