/*
* sonix sn9c102 (bayer) library
*
* Copyright (C) 2009-2011 Jean-François Moine <http://moinejf.free.fr>
* Copyright (C) 2003 2004 Michel Xhaard mxhaard@magic.fr
* Add Pas106 Stefano Mozzi (C) 2004
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* Some documentation on known sonixb registers:
Reg Use
sn9c101 / sn9c102:
0x10 high nibble red gain low nibble blue gain
0x11 low nibble green gain
sn9c103:
0x05 red gain 0-127
0x06 blue gain 0-127
0x07 green gain 0-127
all:
0x08-0x0f i2c / 3wire registers
0x12 hstart
0x13 vstart
0x15 hsize (hsize = register-value * 16)
0x16 vsize (vsize = register-value * 16)
0x17 bit 0 toggle compression quality (according to sn9c102 driver)
0x18 bit 7 enables compression, bit 4-5 set image down scaling:
00 scale 1, 01 scale 1/2, 10, scale 1/4
0x19 high-nibble is sensor clock divider, changes exposure on sensors which
use a clock generated by the bridge. Some sensors have their own clock.
0x1c auto_exposure area (for avg_lum) startx (startx = register-value * 32)
0x1d auto_exposure area (for avg_lum) starty (starty = register-value * 32)
0x1e auto_exposure area (for avg_lum) stopx (hsize = (0x1e