From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-ee0-f48.google.com ([74.125.83.48]:43783 "EHLO mail-ee0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716Ab3CFQj5 (ORCPT ); Wed, 6 Mar 2013 11:39:57 -0500 Received: by mail-ee0-f48.google.com with SMTP id t10so5991469eei.35 for ; Wed, 06 Mar 2013 08:39:56 -0800 (PST) Message-ID: <5137718C.5010204@googlemail.com> Date: Wed, 06 Mar 2013 17:40:44 +0100 From: =?ISO-8859-15?Q?Frank_Sch=E4fer?= MIME-Version: 1.0 To: Mauro Carvalho Chehab CC: Linux Media Mailing List Subject: Re: [PATCH 2/3] em28xx: Add a separate config dir for secondary bus References: <1362480928-20382-1-git-send-email-mchehab@redhat.com> <1362480928-20382-3-git-send-email-mchehab@redhat.com> In-Reply-To: <1362480928-20382-3-git-send-email-mchehab@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: Am 05.03.2013 11:55, schrieb Mauro Carvalho Chehab: > Prepare to register a separate bus for the second bus. > > For now, just add a new field. A latter patch will add the > bits to make it work. > > This patch was generated by this script: > > perl -e 'while (<>) { if (s/EM2874_I2C_SECONDARY_BUS_SELECT.*\n//) { > printf "\t\t.def_i2c_bus = 1,\n"; $found = 1; print $_ } else { if ($found) { s/^\s+// }; $found = 0; print $_; } }' \ > drivers/media/usb/em28xx/em28xx-cards.c >a && mv a drivers/media/usb/em28xx/em28xx-cards.c > > Signed-off-by: Mauro Carvalho Chehab > --- > drivers/media/usb/em28xx/em28xx-cards.c | 43 ++++++++++++++++++--------------- > drivers/media/usb/em28xx/em28xx.h | 1 + > 2 files changed, 24 insertions(+), 20 deletions(-) > > diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c > index d81f7ee..16ab4d7 100644 > --- a/drivers/media/usb/em28xx/em28xx-cards.c > +++ b/drivers/media/usb/em28xx/em28xx-cards.c > @@ -958,8 +958,8 @@ struct em28xx_board em28xx_boards[] = { > #else > .tuner_type = TUNER_ABSENT, > #endif > - .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | > - EM28XX_I2C_CLK_WAIT_ENABLE | > + .def_i2c_bus = 1, > + .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | > EM28XX_I2C_FREQ_400_KHZ, ... Looks good, we need a separate field like this for em2765 and Co., too (which don't use reg 0x06 for bus switching). Regards, Frank