From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 16 23:31:22 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B98DD16A400 for ; Thu, 16 Mar 2006 23:31:22 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52B0843D48 for ; Thu, 16 Mar 2006 23:31:22 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (yk5w269b33g2j214@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.3/8.13.3) with ESMTP id k2GNVL72042058; Thu, 16 Mar 2006 15:31:21 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.3/8.13.3/Submit) id k2GNVJDf042054; Thu, 16 Mar 2006 15:31:19 -0800 (PST) (envelope-from jmg) Date: Thu, 16 Mar 2006 15:31:19 -0800 From: John-Mark Gurney To: "Artem 'ZaZooBred' Ignatiev" Message-ID: <20060316233119.GD35129@funkthat.com> Mail-Followup-To: Artem 'ZaZooBred' Ignatiev , freebsd-hackers@freebsd.org References: <1142506792.36931.25.camel@timon> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1142506792.36931.25.camel@timon> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-hackers@freebsd.org Subject: Re: newbus questions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2006 23:31:22 -0000 Artem 'ZaZooBred' Ignatiev wrote this message on Thu, Mar 16, 2006 at 13:59 +0300: > As far as I understand, all such cards have the same architecture: there > is bridge chip (Philips SAA7146) which interfaces with PC (using PCI) > and tuner on the card (using I2C), so in terms of newbus Properly > Written (tm) driver must be split in two parts: driver for the SAA7146 > itself (which will be a ``bus-device'') and drivers for specific tuners > (which will act as a child device on a SAA7146 "bus"). I'd suggest that we start adopting a method where we don't make device drivers in kernel land for the tuners, and instead make more use of iic device... That's what I did w/ bktrau that supports the DViCO FusionHDTV 5 Lite card... I just wrote a driver to handle DMA from the second function on Bt878 cards, and then compiled the bktr driver w/ SMBUS support, and loaded the iic driver.. Then w/ ioctl's, etc I am able to control the tuner, w/o a specific tuner driver.. Though not as "convient" as simple ioctl's, it means that this type of support can exist entirely in userland, and is less likely to have bugs, etc... This also means that we don't have to have code in the kernel to handle detection of the different tuner types, and it'll be easier to make fixes to the tuner drivers.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."