The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/video/bktr/bktr_core.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* $FreeBSD: src/sys/dev/bktr/bktr_core.h,v 1.7 2005/01/06 01:42:31 imp Exp $ */
    2 /* $DragonFly: src/sys/dev/video/bktr/bktr_core.h,v 1.7 2007/10/03 19:27:08 swildner Exp $ */
    3 
    4 /*
    5  * This is part of the Driver for Video Capture Cards (Frame grabbers)
    6  * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879
    7  * chipset.
    8  * Copyright Roger Hardiman and Amancio Hasty.
    9  *
   10  * bktr_core : This deals with the Bt848/849/878/879 PCI Frame Grabber,
   11  *               Handles all the open, close, ioctl and read userland calls.
   12  *               Sets the Bt848 registers and generates RISC pograms.
   13  *               Controls the i2c bus and GPIO interface.
   14  *               Contains the interface to the kernel.
   15  *               (eg probe/attach and open/close/ioctl)
   16  *
   17  */
   18 
   19 /*-
   20  * 1. Redistributions of source code must retain the
   21  * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman
   22  * All rights reserved.
   23  *
   24  * Redistribution and use in source and binary forms, with or without
   25  * modification, are permitted provided that the following conditions
   26  * are met:
   27  * 1. Redistributions of source code must retain the above copyright
   28  *    notice, this list of conditions and the following disclaimer.
   29  * 2. Redistributions in binary form must reproduce the above copyright
   30  *    notice, this list of conditions and the following disclaimer in the
   31  *    documentation and/or other materials provided with the distribution.
   32  * 3. All advertising materials mentioning features or use of this software
   33  *    must display the following acknowledgement:
   34  *      This product includes software developed by Amancio Hasty and
   35  *      Roger Hardiman
   36  * 4. The name of the author may not be used to endorse or promote products
   37  *    derived from this software without specific prior written permission.
   38  *
   39  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   40  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   41  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   42  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
   43  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
   44  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   45  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   46  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   47  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
   48  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   49  * POSSIBILITY OF SUCH DAMAGE.
   50  */
   51 
   52 
   53 int             i2cWrite( bktr_ptr_t bktr, int addr, int byte1, int byte2 );
   54 int             i2cRead( bktr_ptr_t bktr, int addr );
   55 
   56 void            msp_dpl_reset( bktr_ptr_t bktr, int i2d_addr );
   57 unsigned int    msp_dpl_read( bktr_ptr_t bktr, int i2c_addr, unsigned char dev, unsigned int addr );
   58 void            msp_dpl_write( bktr_ptr_t bktr, int i2c_addr, unsigned char dev,
   59                                unsigned int addr, unsigned int data );
   60 
   61 
   62 /*
   63  * Defines for userland processes blocked in this driver
   64  *   For /dev/bktr[n] use memory address of bktr structure
   65  *   For /dev/vbi[n] use memory address of bktr structure + 1
   66  *                   this is ok as the bktr structure is > 1 byte
   67  */                 
   68 #define BKTR_SLEEP  ((caddr_t)bktr    )
   69 #define VBI_SLEEP   ((caddr_t)bktr + 1)
   70 
   71 
   72 /* device name for kprintf */
   73 const char *bktr_name(bktr_ptr_t bktr);
   74 
   75 /* Prototypes for attatch and interrupt functions */
   76 void    common_bktr_attach( bktr_ptr_t bktr, int unit,
   77                         u_long pci_id, u_int rev ); 
   78 int     common_bktr_intr( void *arg );
   79 
   80 
   81 /* Prototypes for open, close, read, mmap and ioctl calls */
   82 int     video_open( bktr_ptr_t bktr ); 
   83 int     video_close( bktr_ptr_t bktr );
   84 int     video_read( bktr_ptr_t bktr, int unit, cdev_t dev, struct uio *uio );
   85 int     video_ioctl( bktr_ptr_t bktr, int unit,
   86                         ioctl_cmd_t cmd, caddr_t arg, struct thread* pr );
   87 
   88 
   89 int     tuner_open( bktr_ptr_t bktr );
   90 int     tuner_close( bktr_ptr_t bktr );
   91 int     tuner_ioctl( bktr_ptr_t bktr, int unit,
   92                         ioctl_cmd_t cmd, caddr_t arg, struct thread* pr );
   93 
   94 int     vbi_open( bktr_ptr_t bktr );
   95 int     vbi_close( bktr_ptr_t bktr );
   96 int     vbi_read( bktr_ptr_t bktr, struct uio *uio, int ioflag );
   97 

Cache object: 0557a019005acbb63895965ec0720f57


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.