From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx1.redhat.com ([209.132.183.28]:40009 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933034Ab3CRVXA convert rfc822-to-8bit (ORCPT ); Mon, 18 Mar 2013 17:23:00 -0400 Date: Mon, 18 Mar 2013 18:22:55 -0300 From: Mauro Carvalho Chehab To: Frank =?UTF-8?B?U2Now6RmZXI=?= Cc: Linux Media Mailing List Subject: Re: [PATCH 2/3] em28xx: Add a separate config dir for secondary bus Message-ID: <20130318182255.3d7bd665@redhat.com> In-Reply-To: <5137718C.5010204@googlemail.com> References: <1362480928-20382-1-git-send-email-mchehab@redhat.com> <1362480928-20382-3-git-send-email-mchehab@redhat.com> <5137718C.5010204@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-media-owner@vger.kernel.org List-ID: Em Wed, 06 Mar 2013 17:40:44 +0100 Frank Schäfer escreveu: > 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). Feel free to add it when sending the patches for em2765. Regards, Mauro