18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * DivIO nw80x subdriver
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2011 Jean-François Moine (http://moinejf.free.fr)
68c2ecf20Sopenharmony_ci * Copyright (C) 2003 Sylvain Munaut <tnt@246tNt.com>
78c2ecf20Sopenharmony_ci *			Kjell Claesson <keyson@users.sourceforge.net>
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#define MODULE_NAME "nw80x"
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci#include "gspca.h"
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciMODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>");
178c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("NW80x USB Camera Driver");
188c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL");
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_cistatic int webcam;
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci/* specific webcam descriptor */
238c2ecf20Sopenharmony_cistruct sd {
248c2ecf20Sopenharmony_ci	struct gspca_dev gspca_dev;	/* !! must be the first item */
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci	u32 ae_res;
278c2ecf20Sopenharmony_ci	s8 ag_cnt;
288c2ecf20Sopenharmony_ci#define AG_CNT_START 13
298c2ecf20Sopenharmony_ci	u8 exp_too_low_cnt;
308c2ecf20Sopenharmony_ci	u8 exp_too_high_cnt;
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci	u8 bridge;
338c2ecf20Sopenharmony_ci	u8 webcam;
348c2ecf20Sopenharmony_ci};
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_cienum bridges {
378c2ecf20Sopenharmony_ci	BRIDGE_NW800,	/* and et31x110 */
388c2ecf20Sopenharmony_ci	BRIDGE_NW801,
398c2ecf20Sopenharmony_ci	BRIDGE_NW802,
408c2ecf20Sopenharmony_ci};
418c2ecf20Sopenharmony_cienum webcams {
428c2ecf20Sopenharmony_ci	Generic800,
438c2ecf20Sopenharmony_ci	SpaceCam,	/* Trust 120 SpaceCam */
448c2ecf20Sopenharmony_ci	SpaceCam2,	/* other Trust 120 SpaceCam */
458c2ecf20Sopenharmony_ci	Cvideopro,	/* Conceptronic Video Pro */
468c2ecf20Sopenharmony_ci	Dlink350c,
478c2ecf20Sopenharmony_ci	DS3303u,
488c2ecf20Sopenharmony_ci	Kr651us,
498c2ecf20Sopenharmony_ci	Kritter,
508c2ecf20Sopenharmony_ci	Mustek300,
518c2ecf20Sopenharmony_ci	Proscope,
528c2ecf20Sopenharmony_ci	Twinkle,
538c2ecf20Sopenharmony_ci	DvcV6,
548c2ecf20Sopenharmony_ci	P35u,
558c2ecf20Sopenharmony_ci	Generic802,
568c2ecf20Sopenharmony_ci	NWEBCAMS	/* number of webcams */
578c2ecf20Sopenharmony_ci};
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_cistatic const u8 webcam_chip[NWEBCAMS] = {
608c2ecf20Sopenharmony_ci	[Generic800]	= BRIDGE_NW800,	/* 06a5:0000
618c2ecf20Sopenharmony_ci					 * Typhoon Webcam 100 USB */
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci	[SpaceCam]	= BRIDGE_NW800,	/* 06a5:d800
648c2ecf20Sopenharmony_ci				* Trust SpaceCam120 or SpaceCam100 PORTABLE */
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci	[SpaceCam2]	= BRIDGE_NW800,	/* 06a5:d800 - pas106
678c2ecf20Sopenharmony_ci			* other Trust SpaceCam120 or SpaceCam100 PORTABLE */
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci	[Cvideopro]	= BRIDGE_NW802,	/* 06a5:d001
708c2ecf20Sopenharmony_ci			* Conceptronic Video Pro 'CVIDEOPRO USB Webcam CCD' */
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci	[Dlink350c]	= BRIDGE_NW802,	/* 06a5:d001
738c2ecf20Sopenharmony_ci					 * D-Link NetQam Pro 250plus */
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci	[DS3303u]	= BRIDGE_NW801,	/* 06a5:d001
768c2ecf20Sopenharmony_ci				* Plustek Opticam 500U or ProLink DS3303u */
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci	[Kr651us]	= BRIDGE_NW802,	/* 06a5:d001
798c2ecf20Sopenharmony_ci					 * Panasonic GP-KR651US */
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci	[Kritter]	= BRIDGE_NW802,	/* 06a5:d001
828c2ecf20Sopenharmony_ci					 * iRez Kritter cam */
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_ci	[Mustek300]	= BRIDGE_NW802,	/* 055f:d001
858c2ecf20Sopenharmony_ci					 * Mustek Wcam 300 mini */
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ci	[Proscope]	= BRIDGE_NW802,	/* 06a5:d001
888c2ecf20Sopenharmony_ci					 * Scalar USB Microscope (ProScope) */
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ci	[Twinkle]	= BRIDGE_NW800,	/* 06a5:d800 - hv7121b? (seems pas106)
918c2ecf20Sopenharmony_ci					 * Divio Chicony TwinkleCam
928c2ecf20Sopenharmony_ci					 * DSB-C110 */
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_ci	[DvcV6]		= BRIDGE_NW802,	/* 0502:d001
958c2ecf20Sopenharmony_ci					 * DVC V6 */
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci	[P35u]		= BRIDGE_NW801,	/* 052b:d001, 06a5:d001 and 06be:d001
988c2ecf20Sopenharmony_ci					 * EZCam Pro p35u */
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_ci	[Generic802]	= BRIDGE_NW802,
1018c2ecf20Sopenharmony_ci};
1028c2ecf20Sopenharmony_ci/*
1038c2ecf20Sopenharmony_ci * other webcams:
1048c2ecf20Sopenharmony_ci *	- nw801 046d:d001
1058c2ecf20Sopenharmony_ci *		Logitech QuickCam Pro (dark focus ring)
1068c2ecf20Sopenharmony_ci *	- nw801 0728:d001
1078c2ecf20Sopenharmony_ci *		AVerMedia Camguard
1088c2ecf20Sopenharmony_ci *	- nw??? 06a5:d001
1098c2ecf20Sopenharmony_ci *		D-Link NetQam Pro 250plus
1108c2ecf20Sopenharmony_ci *	- nw800 065a:d800
1118c2ecf20Sopenharmony_ci *		Showcam NGS webcam
1128c2ecf20Sopenharmony_ci *	- nw??? ????:????
1138c2ecf20Sopenharmony_ci *		Sceptre svc300
1148c2ecf20Sopenharmony_ci */
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_ci/*
1178c2ecf20Sopenharmony_ci * registers
1188c2ecf20Sopenharmony_ci *    nw800/et31x110	  nw801		  nw802
1198c2ecf20Sopenharmony_ci *	0000..009e	0000..00a1	0000..009e
1208c2ecf20Sopenharmony_ci *	0200..0211	   id		   id
1218c2ecf20Sopenharmony_ci *	0300..0302	   id		   id
1228c2ecf20Sopenharmony_ci *	0400..0406	  (inex)	0400..0406
1238c2ecf20Sopenharmony_ci *	0500..0505	0500..0506	  (inex)
1248c2ecf20Sopenharmony_ci *	0600..061a	0600..0601	0600..0601
1258c2ecf20Sopenharmony_ci *	0800..0814	   id		   id
1268c2ecf20Sopenharmony_ci *	1000..109c	1000..10a1	1000..109a
1278c2ecf20Sopenharmony_ci */
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ci/* resolutions
1308c2ecf20Sopenharmony_ci *	nw800: 320x240, 352x288
1318c2ecf20Sopenharmony_ci *	nw801/802: 320x240, 640x480
1328c2ecf20Sopenharmony_ci */
1338c2ecf20Sopenharmony_cistatic const struct v4l2_pix_format cif_mode[] = {
1348c2ecf20Sopenharmony_ci	{320, 240, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE,
1358c2ecf20Sopenharmony_ci		.bytesperline = 320,
1368c2ecf20Sopenharmony_ci		.sizeimage = 320 * 240 * 4 / 8,
1378c2ecf20Sopenharmony_ci		.colorspace = V4L2_COLORSPACE_JPEG},
1388c2ecf20Sopenharmony_ci	{352, 288, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE,
1398c2ecf20Sopenharmony_ci		.bytesperline = 352,
1408c2ecf20Sopenharmony_ci		.sizeimage = 352 * 288 * 4 / 8,
1418c2ecf20Sopenharmony_ci		.colorspace = V4L2_COLORSPACE_JPEG}
1428c2ecf20Sopenharmony_ci};
1438c2ecf20Sopenharmony_cistatic const struct v4l2_pix_format vga_mode[] = {
1448c2ecf20Sopenharmony_ci	{320, 240, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE,
1458c2ecf20Sopenharmony_ci		.bytesperline = 320,
1468c2ecf20Sopenharmony_ci		.sizeimage = 320 * 240 * 4 / 8,
1478c2ecf20Sopenharmony_ci		.colorspace = V4L2_COLORSPACE_JPEG},
1488c2ecf20Sopenharmony_ci	{640, 480, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE,
1498c2ecf20Sopenharmony_ci		.bytesperline = 640,
1508c2ecf20Sopenharmony_ci		.sizeimage = 640 * 480 * 3 / 8,
1518c2ecf20Sopenharmony_ci		.colorspace = V4L2_COLORSPACE_JPEG},
1528c2ecf20Sopenharmony_ci};
1538c2ecf20Sopenharmony_ci
1548c2ecf20Sopenharmony_ci/*
1558c2ecf20Sopenharmony_ci * The sequences below contain:
1568c2ecf20Sopenharmony_ci *	- 1st and 2nd bytes: either
1578c2ecf20Sopenharmony_ci *		- register number (BE)
1588c2ecf20Sopenharmony_ci *		- I2C0 + i2c address
1598c2ecf20Sopenharmony_ci *	- 3rd byte: data length (=0 for end of sequence)
1608c2ecf20Sopenharmony_ci *	- n bytes: data
1618c2ecf20Sopenharmony_ci */
1628c2ecf20Sopenharmony_ci#define I2C0 0xff
1638c2ecf20Sopenharmony_ci
1648c2ecf20Sopenharmony_cistatic const u8 nw800_init[] = {
1658c2ecf20Sopenharmony_ci	0x04, 0x05, 0x01, 0x61,
1668c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x01,
1678c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x04,
1688c2ecf20Sopenharmony_ci	0x04, 0x04, 0x03, 0x00, 0x00, 0x00,
1698c2ecf20Sopenharmony_ci	0x05, 0x05, 0x01, 0x00,
1708c2ecf20Sopenharmony_ci	0, 0, 0
1718c2ecf20Sopenharmony_ci};
1728c2ecf20Sopenharmony_cistatic const u8 nw800_start[] = {
1738c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0xc0,
1748c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x10, 0x43, 0x00, 0xb4, 0x01, 0x10, 0x00, 0x4f,
1758c2ecf20Sopenharmony_ci			  0xef, 0x0e, 0x00, 0x74, 0x01, 0x01, 0x00, 0x19,
1768c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
1778c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x3e, 0x00, 0x24,
1788c2ecf20Sopenharmony_ci			  0x03, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
1798c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
1808c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
1818c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
1828c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
1838c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
1848c2ecf20Sopenharmony_ci			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
1858c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
1868c2ecf20Sopenharmony_ci			  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
1878c2ecf20Sopenharmony_ci			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
1888c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
1898c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
1908c2ecf20Sopenharmony_ci	0x00, 0x80, 0x1f, 0xa0, 0x48, 0xc3, 0x02, 0x88, 0x0c, 0x68, 0x00,
1918c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x08,
1928c2ecf20Sopenharmony_ci			  0x00, 0x32, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
1938c2ecf20Sopenharmony_ci			  0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00,
1948c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
1958c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
1968c2ecf20Sopenharmony_ci			  0x40, 0x20,
1978c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
1988c2ecf20Sopenharmony_ci	0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0xc0,
1998c2ecf20Sopenharmony_ci	0x05, 0x00, 0x06, 0xe8, 0x00, 0x00, 0x00, 0x20, 0x20,
2008c2ecf20Sopenharmony_ci	0x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2018c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2028c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2038c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00,
2048c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2058c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2068c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
2078c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0x83, 0x02, 0x20, 0x00, 0x13, 0x00, 0x00, 0x00,
2088c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
2098c2ecf20Sopenharmony_ci			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2108c2ecf20Sopenharmony_ci			  0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
2118c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
2128c2ecf20Sopenharmony_ci			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
2138c2ecf20Sopenharmony_ci			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
2148c2ecf20Sopenharmony_ci			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
2158c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
2168c2ecf20Sopenharmony_ci			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
2178c2ecf20Sopenharmony_ci			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
2188c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
2198c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
2208c2ecf20Sopenharmony_ci			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
2218c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
2228c2ecf20Sopenharmony_ci			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
2238c2ecf20Sopenharmony_ci	0x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
2248c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x62,
2258c2ecf20Sopenharmony_ci			  0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
2268c2ecf20Sopenharmony_ci			  0x01, 0x60, 0x01, 0x00, 0x00,
2278c2ecf20Sopenharmony_ci
2288c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0xff,
2298c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0xc4,
2308c2ecf20Sopenharmony_ci
2318c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0xc0,
2328c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x10, 0x43, 0x00, 0xb4, 0x01, 0x10, 0x00, 0x4f,
2338c2ecf20Sopenharmony_ci			  0xef, 0x0e, 0x00, 0x74, 0x01, 0x01, 0x00, 0x19,
2348c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
2358c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x3e, 0x00, 0x24,
2368c2ecf20Sopenharmony_ci			  0x03, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
2378c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
2388c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
2398c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
2408c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
2418c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
2428c2ecf20Sopenharmony_ci			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
2438c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
2448c2ecf20Sopenharmony_ci			  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
2458c2ecf20Sopenharmony_ci			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
2468c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
2478c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
2488c2ecf20Sopenharmony_ci	0x00, 0x80, 0x1f, 0xa0, 0x48, 0xc3, 0x02, 0x88, 0x0c, 0x68, 0x00,
2498c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x08,
2508c2ecf20Sopenharmony_ci			  0x00, 0x32, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
2518c2ecf20Sopenharmony_ci			  0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00,
2528c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
2538c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
2548c2ecf20Sopenharmony_ci			  0x40, 0x20,
2558c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
2568c2ecf20Sopenharmony_ci	0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0xc0,
2578c2ecf20Sopenharmony_ci	0x05, 0x00, 0x06, 0xe8, 0x00, 0x00, 0x00, 0x20, 0x20,
2588c2ecf20Sopenharmony_ci	0x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2598c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2608c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2618c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00,
2628c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2638c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2648c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
2658c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0x83, 0x02, 0x20, 0x00, 0x13, 0x00, 0x00, 0x00,
2668c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
2678c2ecf20Sopenharmony_ci			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2688c2ecf20Sopenharmony_ci			  0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
2698c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
2708c2ecf20Sopenharmony_ci			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
2718c2ecf20Sopenharmony_ci			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
2728c2ecf20Sopenharmony_ci			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
2738c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
2748c2ecf20Sopenharmony_ci			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
2758c2ecf20Sopenharmony_ci			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
2768c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
2778c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
2788c2ecf20Sopenharmony_ci			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
2798c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
2808c2ecf20Sopenharmony_ci			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
2818c2ecf20Sopenharmony_ci	0x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
2828c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x62,
2838c2ecf20Sopenharmony_ci			  0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
2848c2ecf20Sopenharmony_ci			  0x01, 0x60, 0x01, 0x00, 0x00,
2858c2ecf20Sopenharmony_ci
2868c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,
2878c2ecf20Sopenharmony_ci			  0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,
2888c2ecf20Sopenharmony_ci			  0x40,
2898c2ecf20Sopenharmony_ci	0x00, 0x80, 0x01, 0xa0,
2908c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x00,
2918c2ecf20Sopenharmony_ci	0x00, 0x91, 0x02, 0x6c, 0x01,
2928c2ecf20Sopenharmony_ci	0x00, 0x03, 0x02, 0xc8, 0x01,
2938c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x00,
2948c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0x83,
2958c2ecf20Sopenharmony_ci	0x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,
2968c2ecf20Sopenharmony_ci			  0x20, 0x01, 0x60, 0x01,
2978c2ecf20Sopenharmony_ci	0x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
2988c2ecf20Sopenharmony_ci	0x10, 0x1b, 0x02, 0x69, 0x00,
2998c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
3008c2ecf20Sopenharmony_ci	0x05, 0x02, 0x01, 0x02,
3018c2ecf20Sopenharmony_ci	0x06, 0x00, 0x02, 0x04, 0xd9,
3028c2ecf20Sopenharmony_ci	0x05, 0x05, 0x01, 0x20,
3038c2ecf20Sopenharmony_ci	0x05, 0x05, 0x01, 0x21,
3048c2ecf20Sopenharmony_ci	0x10, 0x0e, 0x01, 0x08,
3058c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x08, 0x21, 0x3d, 0x52, 0x63, 0x75, 0x83,
3068c2ecf20Sopenharmony_ci			  0x91, 0x9e, 0xaa, 0xb6, 0xc1, 0xcc, 0xd6, 0xe0,
3078c2ecf20Sopenharmony_ci			  0xea,
3088c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x00,
3098c2ecf20Sopenharmony_ci	0x10, 0x0f, 0x02, 0x13, 0x13,
3108c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x14,
3118c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x08, 0x21, 0x3d, 0x52, 0x63, 0x75, 0x83,
3128c2ecf20Sopenharmony_ci			  0x91, 0x9e, 0xaa, 0xb6, 0xc1, 0xcc, 0xd6, 0xe0,
3138c2ecf20Sopenharmony_ci			  0xea,
3148c2ecf20Sopenharmony_ci	0x10, 0x0b, 0x01, 0x14,
3158c2ecf20Sopenharmony_ci	0x10, 0x0d, 0x01, 0x20,
3168c2ecf20Sopenharmony_ci	0x10, 0x0c, 0x01, 0x34,
3178c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0xc3,
3188c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x00,
3198c2ecf20Sopenharmony_ci	0x05, 0x02, 0x01, 0x02,
3208c2ecf20Sopenharmony_ci	0x06, 0x00, 0x02, 0x00, 0x48,
3218c2ecf20Sopenharmony_ci	0x05, 0x05, 0x01, 0x20,
3228c2ecf20Sopenharmony_ci	0x05, 0x05, 0x01, 0x21,
3238c2ecf20Sopenharmony_ci	0, 0, 0
3248c2ecf20Sopenharmony_ci};
3258c2ecf20Sopenharmony_ci
3268c2ecf20Sopenharmony_ci/* 06a5:d001 - nw801 - Panasonic
3278c2ecf20Sopenharmony_ci *		P35u */
3288c2ecf20Sopenharmony_cistatic const u8 nw801_start_1[] = {
3298c2ecf20Sopenharmony_ci	0x05, 0x06, 0x01, 0x04,
3308c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x0e, 0x00, 0x00, 0xf9, 0x02, 0x11, 0x00, 0x0e,
3318c2ecf20Sopenharmony_ci			  0x01, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
3328c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
3338c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,
3348c2ecf20Sopenharmony_ci			  0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
3358c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
3368c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
3378c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
3388c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
3398c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
3408c2ecf20Sopenharmony_ci			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
3418c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
3428c2ecf20Sopenharmony_ci			  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
3438c2ecf20Sopenharmony_ci			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
3448c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
3458c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
3468c2ecf20Sopenharmony_ci	0x00, 0x80, 0x22, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x08, 0x00,
3478c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x69, 0xa8, 0x1f, 0x00,
3488c2ecf20Sopenharmony_ci			  0x0d, 0x02, 0x07, 0x00, 0x01, 0x00, 0x19, 0x00,
3498c2ecf20Sopenharmony_ci			  0xf2, 0x00, 0x18, 0x06, 0x10, 0x06, 0x10, 0x00,
3508c2ecf20Sopenharmony_ci			  0x36, 0x00,
3518c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
3528c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
3538c2ecf20Sopenharmony_ci			  0x40, 0x20,
3548c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x00, 0x00, 0x00,
3558c2ecf20Sopenharmony_ci	0x05, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
3568c2ecf20Sopenharmony_ci	0x06, 0x00, 0x02, 0x09, 0x99,
3578c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3588c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3598c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
3608c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0x22, 0x02, 0x80, 0x00, 0x1e, 0x00, 0x00, 0x00,
3618c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x0a, 0x15, 0x08, 0x08, 0x0a,
3628c2ecf20Sopenharmony_ci			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3638c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x35, 0xfd, 0x07, 0x3d, 0x00, 0x00,
3648c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x14, 0x02,
3658c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
3668c2ecf20Sopenharmony_ci			  0x40, 0x00, 0x00, 0x00, 0x40, 0x20, 0x10, 0x06,
3678c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06, 0xf7,
3688c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80, 0x80,
3698c2ecf20Sopenharmony_ci			  0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99, 0xa4,
3708c2ecf20Sopenharmony_ci			  0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc, 0xcf,
3718c2ecf20Sopenharmony_ci			  0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54, 0x64,
3728c2ecf20Sopenharmony_ci			  0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2, 0xe2,
3738c2ecf20Sopenharmony_ci			  0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
3748c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
3758c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
3768c2ecf20Sopenharmony_ci	0x10, 0x80, 0x22, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
3778c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00, 0x00,
3788c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x82, 0x02,
3798c2ecf20Sopenharmony_ci			  0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40, 0x01,
3808c2ecf20Sopenharmony_ci			  0xf0, 0x00,
3818c2ecf20Sopenharmony_ci	0, 0, 0,
3828c2ecf20Sopenharmony_ci};
3838c2ecf20Sopenharmony_cistatic const u8 nw801_start_qvga[] = {
3848c2ecf20Sopenharmony_ci	0x02, 0x00, 0x10, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
3858c2ecf20Sopenharmony_ci			  0x00, 0x78, 0x18, 0x0b, 0x06, 0xa2, 0x86, 0x78,
3868c2ecf20Sopenharmony_ci	0x02, 0x0f, 0x01, 0x6b,
3878c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x15,
3888c2ecf20Sopenharmony_ci	0x00, 0x00, 0x01, 0x1e,
3898c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0x2f,
3908c2ecf20Sopenharmony_ci	0x10, 0x8c, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
3918c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x29, 0x00, 0x18, 0x01, 0x1f, 0x00, 0xd2, 0x00,
3928c2ecf20Sopenharmony_ci							/* AE window */
3938c2ecf20Sopenharmony_ci	0, 0, 0,
3948c2ecf20Sopenharmony_ci};
3958c2ecf20Sopenharmony_cistatic const u8 nw801_start_vga[] = {
3968c2ecf20Sopenharmony_ci	0x02, 0x00, 0x10, 0x78, 0xa0, 0x97, 0x78, 0xa0, 0x00, 0x00, 0x00,
3978c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xf0,
3988c2ecf20Sopenharmony_ci	0x02, 0x0f, 0x01, 0xd5,
3998c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x15,
4008c2ecf20Sopenharmony_ci	0x00, 0x00, 0x01, 0x0e,
4018c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0x22,
4028c2ecf20Sopenharmony_ci	0x10, 0x8c, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01,
4038c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x51, 0x00, 0x30, 0x02, 0x3d, 0x00, 0xa4, 0x01,
4048c2ecf20Sopenharmony_ci	0, 0, 0,
4058c2ecf20Sopenharmony_ci};
4068c2ecf20Sopenharmony_cistatic const u8 nw801_start_2[] = {
4078c2ecf20Sopenharmony_ci	0x10, 0x04, 0x01, 0x1a,
4088c2ecf20Sopenharmony_ci	0x10, 0x19, 0x01, 0x09,				/* clock */
4098c2ecf20Sopenharmony_ci	0x10, 0x24, 0x06, 0xc0, 0x00, 0x3f, 0x02, 0x00, 0x01,
4108c2ecf20Sopenharmony_ci							 /* .. gain .. */
4118c2ecf20Sopenharmony_ci	0x00, 0x03, 0x02, 0x92, 0x03,
4128c2ecf20Sopenharmony_ci	0x00, 0x1d, 0x04, 0xf2, 0x00, 0x24, 0x07,
4138c2ecf20Sopenharmony_ci	0x00, 0x7b, 0x01, 0xcf,
4148c2ecf20Sopenharmony_ci	0x10, 0x94, 0x01, 0x07,
4158c2ecf20Sopenharmony_ci	0x05, 0x05, 0x01, 0x01,
4168c2ecf20Sopenharmony_ci	0x05, 0x04, 0x01, 0x01,
4178c2ecf20Sopenharmony_ci	0x10, 0x0e, 0x01, 0x08,
4188c2ecf20Sopenharmony_ci	0x10, 0x48, 0x11, 0x00, 0x37, 0x55, 0x6b, 0x7d, 0x8d, 0x9b, 0xa8,
4198c2ecf20Sopenharmony_ci			  0xb4, 0xbf, 0xca, 0xd4, 0xdd, 0xe6, 0xef, 0xf0,
4208c2ecf20Sopenharmony_ci			  0xf0,
4218c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x00,
4228c2ecf20Sopenharmony_ci	0x10, 0x0f, 0x02, 0x0c, 0x0c,
4238c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x08,
4248c2ecf20Sopenharmony_ci	0x10, 0x48, 0x11, 0x00, 0x37, 0x55, 0x6b, 0x7d, 0x8d, 0x9b, 0xa8,
4258c2ecf20Sopenharmony_ci			  0xb4, 0xbf, 0xca, 0xd4, 0xdd, 0xe6, 0xef, 0xf0,
4268c2ecf20Sopenharmony_ci			  0xf0,
4278c2ecf20Sopenharmony_ci	0x10, 0x0b, 0x01, 0x0b,
4288c2ecf20Sopenharmony_ci	0x10, 0x0d, 0x01, 0x0b,
4298c2ecf20Sopenharmony_ci	0x10, 0x0c, 0x01, 0x1f,
4308c2ecf20Sopenharmony_ci	0x05, 0x06, 0x01, 0x03,
4318c2ecf20Sopenharmony_ci	0, 0, 0
4328c2ecf20Sopenharmony_ci};
4338c2ecf20Sopenharmony_ci
4348c2ecf20Sopenharmony_ci/* nw802 (sharp IR3Y38M?) */
4358c2ecf20Sopenharmony_cistatic const u8 nw802_start[] = {
4368c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x04,
4378c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0xf9, 0x02, 0x10, 0x00, 0x4d,
4388c2ecf20Sopenharmony_ci			  0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
4398c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
4408c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,
4418c2ecf20Sopenharmony_ci			  0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
4428c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
4438c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
4448c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
4458c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
4468c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
4478c2ecf20Sopenharmony_ci			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
4488c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
4498c2ecf20Sopenharmony_ci			  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
4508c2ecf20Sopenharmony_ci			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
4518c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
4528c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
4538c2ecf20Sopenharmony_ci	0x00, 0x80, 0x1f, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x68, 0x00,
4548c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
4558c2ecf20Sopenharmony_ci			  0x00, 0x0c, 0x02, 0x01, 0x00, 0x16, 0x00, 0x94,
4568c2ecf20Sopenharmony_ci			  0x00, 0x10, 0x06, 0x08, 0x00, 0x18, 0x00,
4578c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
4588c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
4598c2ecf20Sopenharmony_ci			  0x40, 0x20,
4608c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
4618c2ecf20Sopenharmony_ci	0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,
4628c2ecf20Sopenharmony_ci	0x06, 0x00, 0x02, 0x09, 0x99,
4638c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4648c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4658c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
4668c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0xa1, 0x02, 0x80, 0x00, 0x1d, 0x00, 0x00, 0x00,
4678c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
4688c2ecf20Sopenharmony_ci			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4698c2ecf20Sopenharmony_ci			  0x00, 0x49, 0x13, 0xff, 0x01, 0xc0, 0x00, 0x14,
4708c2ecf20Sopenharmony_ci			  0x02, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00,
4718c2ecf20Sopenharmony_ci			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
4728c2ecf20Sopenharmony_ci			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
4738c2ecf20Sopenharmony_ci			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
4748c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
4758c2ecf20Sopenharmony_ci			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
4768c2ecf20Sopenharmony_ci			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
4778c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
4788c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
4798c2ecf20Sopenharmony_ci			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
4808c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
4818c2ecf20Sopenharmony_ci			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
4828c2ecf20Sopenharmony_ci	0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
4838c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x05, 0x82,
4848c2ecf20Sopenharmony_ci			  0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
4858c2ecf20Sopenharmony_ci			  0x01, 0xf0, 0x00,
4868c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
4878c2ecf20Sopenharmony_ci			  0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,
4888c2ecf20Sopenharmony_ci			  0x40,
4898c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x00,
4908c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0xad,
4918c2ecf20Sopenharmony_ci	0x00, 0x00, 0x01, 0x08,
4928c2ecf20Sopenharmony_ci	0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
4938c2ecf20Sopenharmony_ci	0x10, 0x1b, 0x02, 0x00, 0x00,
4948c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x51, 0x00, 0xf0, 0x00, 0x3d, 0x00, 0xb4, 0x00,
4958c2ecf20Sopenharmony_ci	0x10, 0x1d, 0x08, 0x00, 0xa0, 0x00, 0xa0, 0x00, 0xa0, 0x00, 0xa0,
4968c2ecf20Sopenharmony_ci	0x10, 0x0e, 0x01, 0x27,
4978c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x0e, 0x35, 0x4f, 0x62, 0x71, 0x7f, 0x8b,
4988c2ecf20Sopenharmony_ci			  0x96, 0xa0, 0xa9, 0xb2, 0xbb, 0xc3, 0xca, 0xd2,
4998c2ecf20Sopenharmony_ci			  0xd8,
5008c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x00,
5018c2ecf20Sopenharmony_ci	0x10, 0x0f, 0x02, 0x14, 0x14,
5028c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x0c,
5038c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54, 0x64, 0x74,
5048c2ecf20Sopenharmony_ci			  0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2, 0xe2, 0xf1,
5058c2ecf20Sopenharmony_ci			  0xff,
5068c2ecf20Sopenharmony_ci/*			  0x00, 0x0e, 0x35, 0x4f, 0x62, 0x71, 0x7f, 0x8b,
5078c2ecf20Sopenharmony_ci *			  0x96, 0xa0, 0xa9, 0xb2, 0xbb, 0xc3, 0xca, 0xd2,
5088c2ecf20Sopenharmony_ci *			  0xd8,	*/
5098c2ecf20Sopenharmony_ci	0x10, 0x0b, 0x01, 0x10,
5108c2ecf20Sopenharmony_ci	0x10, 0x0d, 0x01, 0x11,
5118c2ecf20Sopenharmony_ci	0x10, 0x0c, 0x01, 0x1c,
5128c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x03,
5138c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x00,
5148c2ecf20Sopenharmony_ci	0, 0, 0
5158c2ecf20Sopenharmony_ci};
5168c2ecf20Sopenharmony_ci/* et31x110 - Trust 120 SpaceCam */
5178c2ecf20Sopenharmony_cistatic const u8 spacecam_init[] = {
5188c2ecf20Sopenharmony_ci	0x04, 0x05, 0x01, 0x01,
5198c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x01,
5208c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x04,
5218c2ecf20Sopenharmony_ci	0x04, 0x04, 0x03, 0x00, 0x00, 0x00,
5228c2ecf20Sopenharmony_ci	0x05, 0x05, 0x01, 0x00,
5238c2ecf20Sopenharmony_ci	0, 0, 0
5248c2ecf20Sopenharmony_ci};
5258c2ecf20Sopenharmony_cistatic const u8 spacecam_start[] = {
5268c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x44,
5278c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x10, 0x43, 0x00, 0xb4, 0x01, 0x10, 0x00, 0x4f,
5288c2ecf20Sopenharmony_ci			  0xef, 0x0e, 0x00, 0x74, 0x01, 0x01, 0x00, 0x19,
5298c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
5308c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x3e, 0x00, 0x24,
5318c2ecf20Sopenharmony_ci			  0x03, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
5328c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
5338c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
5348c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
5358c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
5368c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
5378c2ecf20Sopenharmony_ci			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
5388c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
5398c2ecf20Sopenharmony_ci			  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
5408c2ecf20Sopenharmony_ci			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
5418c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
5428c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
5438c2ecf20Sopenharmony_ci	0x00, 0x80, 0x1f, 0xa0, 0x48, 0xc3, 0x02, 0x88, 0x0c, 0x68, 0x00,
5448c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x08,
5458c2ecf20Sopenharmony_ci			  0x00, 0x32, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
5468c2ecf20Sopenharmony_ci			  0x00, 0x4b, 0x00, 0x7c, 0x00, 0x80, 0x00,
5478c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
5488c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
5498c2ecf20Sopenharmony_ci			  0x40, 0x20,
5508c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
5518c2ecf20Sopenharmony_ci	0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
5528c2ecf20Sopenharmony_ci	0x05, 0x00, 0x06, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
5538c2ecf20Sopenharmony_ci	0x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5548c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5558c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5568c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00,
5578c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5588c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5598c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
5608c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0x83, 0x02, 0x20, 0x00, 0x11, 0x00, 0x00, 0x00,
5618c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
5628c2ecf20Sopenharmony_ci			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5638c2ecf20Sopenharmony_ci			  0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
5648c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
5658c2ecf20Sopenharmony_ci			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
5668c2ecf20Sopenharmony_ci			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
5678c2ecf20Sopenharmony_ci			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
5688c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
5698c2ecf20Sopenharmony_ci			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
5708c2ecf20Sopenharmony_ci			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
5718c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
5728c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
5738c2ecf20Sopenharmony_ci			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
5748c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
5758c2ecf20Sopenharmony_ci			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
5768c2ecf20Sopenharmony_ci	0x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
5778c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x62,
5788c2ecf20Sopenharmony_ci			  0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
5798c2ecf20Sopenharmony_ci			  0x01, 0x60, 0x01, 0x00, 0x00,
5808c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0xc0,
5818c2ecf20Sopenharmony_ci	0x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
5828c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,
5838c2ecf20Sopenharmony_ci			  0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,
5848c2ecf20Sopenharmony_ci			  0x40,
5858c2ecf20Sopenharmony_ci	0x00, 0x80, 0x01, 0xa0,
5868c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x00,
5878c2ecf20Sopenharmony_ci	0x00, 0x91, 0x02, 0x32, 0x01,
5888c2ecf20Sopenharmony_ci	0x00, 0x03, 0x02, 0x08, 0x02,
5898c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0x83,
5908c2ecf20Sopenharmony_ci	0x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,
5918c2ecf20Sopenharmony_ci			  0x20, 0x01, 0x60, 0x01,
5928c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
5938c2ecf20Sopenharmony_ci	0x10, 0x0e, 0x01, 0x08,
5948c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x64, 0x99, 0xc0, 0xe2, 0xf9, 0xf9, 0xf9,
5958c2ecf20Sopenharmony_ci			  0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
5968c2ecf20Sopenharmony_ci			  0xf9,
5978c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x00,
5988c2ecf20Sopenharmony_ci	0x10, 0x0f, 0x02, 0x13, 0x13,
5998c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x06,
6008c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x64, 0x99, 0xc0, 0xe2, 0xf9, 0xf9, 0xf9,
6018c2ecf20Sopenharmony_ci			  0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
6028c2ecf20Sopenharmony_ci			  0xf9,
6038c2ecf20Sopenharmony_ci	0x10, 0x0b, 0x01, 0x08,
6048c2ecf20Sopenharmony_ci	0x10, 0x0d, 0x01, 0x10,
6058c2ecf20Sopenharmony_ci	0x10, 0x0c, 0x01, 0x1f,
6068c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0xc3,
6078c2ecf20Sopenharmony_ci	0x04, 0x05, 0x01, 0x40,
6088c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x40,
6098c2ecf20Sopenharmony_ci	0, 0, 0
6108c2ecf20Sopenharmony_ci};
6118c2ecf20Sopenharmony_ci/* et31x110 - pas106 - other Trust SpaceCam120 */
6128c2ecf20Sopenharmony_cistatic const u8 spacecam2_start[] = {
6138c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x44,
6148c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x00,
6158c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x14, 0x83, 0x00, 0xba, 0x01, 0x10, 0x00, 0x4f,
6168c2ecf20Sopenharmony_ci			  0xef, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x19,
6178c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
6188c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x06, 0x00, 0xfc,
6198c2ecf20Sopenharmony_ci			  0x01, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
6208c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
6218c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
6228c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
6238c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
6248c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
6258c2ecf20Sopenharmony_ci			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
6268c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
6278c2ecf20Sopenharmony_ci			  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
6288c2ecf20Sopenharmony_ci			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
6298c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
6308c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
6318c2ecf20Sopenharmony_ci	0x00, 0x80, 0x1f, 0xb8, 0x48, 0x0f, 0x04, 0x88, 0x14, 0x68, 0x00,
6328c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x03,
6338c2ecf20Sopenharmony_ci			  0x00, 0x24, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
6348c2ecf20Sopenharmony_ci			  0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00,
6358c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
6368c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
6378c2ecf20Sopenharmony_ci			  0x40, 0x20,
6388c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
6398c2ecf20Sopenharmony_ci	0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0x00,
6408c2ecf20Sopenharmony_ci	0x05, 0x00, 0x06, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
6418c2ecf20Sopenharmony_ci	0x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6428c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6438c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6448c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00,
6458c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6468c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6478c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
6488c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0x80, 0x02, 0x20, 0x00, 0x13, 0x00, 0x00, 0x00,
6498c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
6508c2ecf20Sopenharmony_ci			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6518c2ecf20Sopenharmony_ci			  0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
6528c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
6538c2ecf20Sopenharmony_ci			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
6548c2ecf20Sopenharmony_ci			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
6558c2ecf20Sopenharmony_ci			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
6568c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
6578c2ecf20Sopenharmony_ci			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
6588c2ecf20Sopenharmony_ci			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
6598c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
6608c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
6618c2ecf20Sopenharmony_ci			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
6628c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
6638c2ecf20Sopenharmony_ci			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
6648c2ecf20Sopenharmony_ci	0x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
6658c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62,
6668c2ecf20Sopenharmony_ci			  0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
6678c2ecf20Sopenharmony_ci			  0x01, 0x60, 0x01, 0x00, 0x00,
6688c2ecf20Sopenharmony_ci	0x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
6698c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x40,
6708c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x00,
6718c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x05,
6728c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x05, 0x05,
6738c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x11, 0x06,
6748c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x14, 0x00,
6758c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x13, 0x01,		/* i2c end */
6768c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,
6778c2ecf20Sopenharmony_ci			  0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,
6788c2ecf20Sopenharmony_ci			  0x40,
6798c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x02, 0x0c,		/* pixel clock */
6808c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x0f, 0x00,
6818c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x13, 0x01,		/* i2c end */
6828c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0x01,
6838c2ecf20Sopenharmony_ci	0x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,
6848c2ecf20Sopenharmony_ci			  0x20, 0x01, 0x60, 0x01,
6858c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x05, 0x0f,		/* exposure */
6868c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x13, 0x01,		/* i2c end */
6878c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x07, 0x09, 0x0b, 0x0f, 0x05, 0x05, 0x0f, 0x00,
6888c2ecf20Sopenharmony_ci						/* gains */
6898c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x03, 0x12, 0x04, 0x01,
6908c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
6918c2ecf20Sopenharmony_ci	0x10, 0x0e, 0x01, 0x08,
6928c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,
6938c2ecf20Sopenharmony_ci			  0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,
6948c2ecf20Sopenharmony_ci			  0xf9,
6958c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x00,
6968c2ecf20Sopenharmony_ci	0x10, 0x0f, 0x02, 0x13, 0x13,
6978c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x06,
6988c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,
6998c2ecf20Sopenharmony_ci			  0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,
7008c2ecf20Sopenharmony_ci			  0xf9,
7018c2ecf20Sopenharmony_ci	0x10, 0x0b, 0x01, 0x11,
7028c2ecf20Sopenharmony_ci	0x10, 0x0d, 0x01, 0x10,
7038c2ecf20Sopenharmony_ci	0x10, 0x0c, 0x01, 0x14,
7048c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x03,
7058c2ecf20Sopenharmony_ci	0x04, 0x05, 0x01, 0x61,
7068c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x00,
7078c2ecf20Sopenharmony_ci	0, 0, 0
7088c2ecf20Sopenharmony_ci};
7098c2ecf20Sopenharmony_ci
7108c2ecf20Sopenharmony_ci/* nw802 - Conceptronic Video Pro */
7118c2ecf20Sopenharmony_cistatic const u8 cvideopro_start[] = {
7128c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x04,
7138c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x54, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x4c,
7148c2ecf20Sopenharmony_ci			  0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
7158c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
7168c2ecf20Sopenharmony_ci			  0x00, 0x0b, 0x00, 0x1b, 0x00, 0xc8, 0x00, 0xf4,
7178c2ecf20Sopenharmony_ci			  0x05, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,
7188c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
7198c2ecf20Sopenharmony_ci			  0x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,
7208c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
7218c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,
7228c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
7238c2ecf20Sopenharmony_ci			  0x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,
7248c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
7258c2ecf20Sopenharmony_ci			  0x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,
7268c2ecf20Sopenharmony_ci			  0x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
7278c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,
7288c2ecf20Sopenharmony_ci			  0x00, 0x5d, 0x00, 0xc7, 0x00, 0x7e, 0x00, 0x30,
7298c2ecf20Sopenharmony_ci	0x00, 0x80, 0x1f, 0x98, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,
7308c2ecf20Sopenharmony_ci			  0x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
7318c2ecf20Sopenharmony_ci			  0x00, 0x0c, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,
7328c2ecf20Sopenharmony_ci			  0x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00,
7338c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
7348c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
7358c2ecf20Sopenharmony_ci			  0x40, 0x20,
7368c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
7378c2ecf20Sopenharmony_ci	0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00,
7388c2ecf20Sopenharmony_ci	0x06, 0x00, 0x02, 0x09, 0x99,
7398c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7408c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7418c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
7428c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
7438c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
7448c2ecf20Sopenharmony_ci			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7458c2ecf20Sopenharmony_ci			  0x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,
7468c2ecf20Sopenharmony_ci			  0x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
7478c2ecf20Sopenharmony_ci			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
7488c2ecf20Sopenharmony_ci			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
7498c2ecf20Sopenharmony_ci			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
7508c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
7518c2ecf20Sopenharmony_ci			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
7528c2ecf20Sopenharmony_ci			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
7538c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
7548c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
7558c2ecf20Sopenharmony_ci			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
7568c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
7578c2ecf20Sopenharmony_ci			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
7588c2ecf20Sopenharmony_ci	0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
7598c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x05, 0x82,
7608c2ecf20Sopenharmony_ci			  0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
7618c2ecf20Sopenharmony_ci			  0x01, 0xf0, 0x00,
7628c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x3c, 0x50, 0x8c, 0x3c, 0x50, 0x00, 0x00, 0x00,
7638c2ecf20Sopenharmony_ci			  0x00, 0x78, 0x3f, 0x3f, 0x06, 0xf2, 0x8f, 0xf0,
7648c2ecf20Sopenharmony_ci			  0x40,
7658c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x03,
7668c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0xac,
7678c2ecf20Sopenharmony_ci	0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
7688c2ecf20Sopenharmony_ci	0x10, 0x1b, 0x02, 0x3b, 0x01,
7698c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00,
7708c2ecf20Sopenharmony_ci	0x10, 0x1f, 0x06, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,
7718c2ecf20Sopenharmony_ci	0x10, 0x1d, 0x02, 0x40, 0x06,
7728c2ecf20Sopenharmony_ci	0x10, 0x0e, 0x01, 0x08,
7738c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x0f, 0x46, 0x62, 0x76, 0x86, 0x94, 0xa0,
7748c2ecf20Sopenharmony_ci			  0xab, 0xb6, 0xbf, 0xc8, 0xcf, 0xd7, 0xdc, 0xdc,
7758c2ecf20Sopenharmony_ci			  0xdc,
7768c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x00,
7778c2ecf20Sopenharmony_ci	0x10, 0x0f, 0x02, 0x12, 0x12,
7788c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x0c,
7798c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x0f, 0x46, 0x62, 0x76, 0x86, 0x94, 0xa0,
7808c2ecf20Sopenharmony_ci			  0xab, 0xb6, 0xbf, 0xc8, 0xcf, 0xd7, 0xdc, 0xdc,
7818c2ecf20Sopenharmony_ci			  0xdc,
7828c2ecf20Sopenharmony_ci	0x10, 0x0b, 0x01, 0x09,
7838c2ecf20Sopenharmony_ci	0x10, 0x0d, 0x01, 0x10,
7848c2ecf20Sopenharmony_ci	0x10, 0x0c, 0x01, 0x2f,
7858c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x03,
7868c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x00,
7878c2ecf20Sopenharmony_ci	0, 0, 0
7888c2ecf20Sopenharmony_ci};
7898c2ecf20Sopenharmony_ci
7908c2ecf20Sopenharmony_ci/* nw802 - D-link dru-350c cam */
7918c2ecf20Sopenharmony_cistatic const u8 dlink_start[] = {
7928c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x04,
7938c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x92, 0x03, 0x10, 0x00, 0x4d,
7948c2ecf20Sopenharmony_ci			  0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
7958c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
7968c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,
7978c2ecf20Sopenharmony_ci			  0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
7988c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
7998c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
8008c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
8018c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
8028c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
8038c2ecf20Sopenharmony_ci			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
8048c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
8058c2ecf20Sopenharmony_ci			  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
8068c2ecf20Sopenharmony_ci			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
8078c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
8088c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
8098c2ecf20Sopenharmony_ci	0x00, 0x80, 0x1f, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x68, 0x00,
8108c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
8118c2ecf20Sopenharmony_ci			  0x00, 0x0c, 0x02, 0x01, 0x00, 0x16, 0x00, 0x94,
8128c2ecf20Sopenharmony_ci			  0x00, 0x10, 0x06, 0x10, 0x00, 0x36, 0x00,
8138c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
8148c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
8158c2ecf20Sopenharmony_ci			  0x40, 0x20,
8168c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
8178c2ecf20Sopenharmony_ci	0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,
8188c2ecf20Sopenharmony_ci	0x06, 0x00, 0x02, 0x09, 0x99,
8198c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8208c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8218c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
8228c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0xa1, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
8238c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
8248c2ecf20Sopenharmony_ci			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8258c2ecf20Sopenharmony_ci			  0x00, 0x49, 0x13, 0x00, 0x00, 0xc0, 0x00, 0x14,
8268c2ecf20Sopenharmony_ci			  0x02, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00,
8278c2ecf20Sopenharmony_ci			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
8288c2ecf20Sopenharmony_ci			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
8298c2ecf20Sopenharmony_ci			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
8308c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
8318c2ecf20Sopenharmony_ci			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
8328c2ecf20Sopenharmony_ci			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
8338c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
8348c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
8358c2ecf20Sopenharmony_ci			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
8368c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
8378c2ecf20Sopenharmony_ci			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
8388c2ecf20Sopenharmony_ci	0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
8398c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x82,
8408c2ecf20Sopenharmony_ci			  0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
8418c2ecf20Sopenharmony_ci			  0x01, 0xf0, 0x00,
8428c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
8438c2ecf20Sopenharmony_ci			  0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,
8448c2ecf20Sopenharmony_ci			  0x40,
8458c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x00,
8468c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0xad,
8478c2ecf20Sopenharmony_ci	0x00, 0x00, 0x01, 0x08,
8488c2ecf20Sopenharmony_ci	0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
8498c2ecf20Sopenharmony_ci	0x10, 0x1b, 0x02, 0x00, 0x00,
8508c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x51, 0x00, 0xf0, 0x00, 0x3d, 0x00, 0xb4, 0x00,
8518c2ecf20Sopenharmony_ci	0x10, 0x1d, 0x08, 0x40, 0x06, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,
8528c2ecf20Sopenharmony_ci	0x10, 0x0e, 0x01, 0x20,
8538c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x07, 0x1e, 0x38, 0x4d, 0x60, 0x70, 0x7f,
8548c2ecf20Sopenharmony_ci			  0x8e, 0x9b, 0xa8, 0xb4, 0xbf, 0xca, 0xd5, 0xdf,
8558c2ecf20Sopenharmony_ci			  0xea,
8568c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x00,
8578c2ecf20Sopenharmony_ci	0x10, 0x0f, 0x02, 0x11, 0x11,
8588c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x10,
8598c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x07, 0x1e, 0x38, 0x4d, 0x60, 0x70, 0x7f,
8608c2ecf20Sopenharmony_ci			  0x8e, 0x9b, 0xa8, 0xb4, 0xbf, 0xca, 0xd5, 0xdf,
8618c2ecf20Sopenharmony_ci			  0xea,
8628c2ecf20Sopenharmony_ci	0x10, 0x0b, 0x01, 0x19,
8638c2ecf20Sopenharmony_ci	0x10, 0x0d, 0x01, 0x10,
8648c2ecf20Sopenharmony_ci	0x10, 0x0c, 0x01, 0x1e,
8658c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x03,
8668c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x00,
8678c2ecf20Sopenharmony_ci	0, 0, 0
8688c2ecf20Sopenharmony_ci};
8698c2ecf20Sopenharmony_ci
8708c2ecf20Sopenharmony_ci/* 06a5:d001 - nw801 - Sony
8718c2ecf20Sopenharmony_ci *		Plustek Opticam 500U or ProLink DS3303u (Hitachi HD49322BF) */
8728c2ecf20Sopenharmony_ci/*fixme: 320x240 only*/
8738c2ecf20Sopenharmony_cistatic const u8 ds3303_start[] = {
8748c2ecf20Sopenharmony_ci	0x05, 0x06, 0x01, 0x04,
8758c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x16, 0x00, 0x00, 0xf9, 0x02, 0x11, 0x00, 0x0e,
8768c2ecf20Sopenharmony_ci			  0x01, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
8778c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
8788c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,
8798c2ecf20Sopenharmony_ci			  0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
8808c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
8818c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
8828c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
8838c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
8848c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
8858c2ecf20Sopenharmony_ci			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
8868c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
8878c2ecf20Sopenharmony_ci			  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
8888c2ecf20Sopenharmony_ci			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
8898c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
8908c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
8918c2ecf20Sopenharmony_ci	0x00, 0x80, 0x22, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x08, 0x00,
8928c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0xa9, 0xa8, 0x1f, 0x00,
8938c2ecf20Sopenharmony_ci			  0x0d, 0x02, 0x07, 0x00, 0x01, 0x00, 0x19, 0x00,
8948c2ecf20Sopenharmony_ci			  0xf2, 0x00, 0x18, 0x06, 0x10, 0x06, 0x10, 0x00,
8958c2ecf20Sopenharmony_ci			  0x36, 0x00,
8968c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x03, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
8978c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0x50,
8988c2ecf20Sopenharmony_ci			  0x40, 0x20,
8998c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
9008c2ecf20Sopenharmony_ci	0x05, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00,
9018c2ecf20Sopenharmony_ci	0x06, 0x00, 0x02, 0x09, 0x99,
9028c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9038c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9048c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
9058c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0x2f, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
9068c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x10, 0x1f, 0x10, 0x08, 0x0a,
9078c2ecf20Sopenharmony_ci			  0x0a, 0x51, 0x00, 0xf1, 0x00, 0x3c, 0x00, 0xb4,
9088c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x15, 0xfd, 0x07, 0x3d, 0x00, 0x00,
9098c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x8c, 0x04, 0x01, 0x20,
9108c2ecf20Sopenharmony_ci			  0x02, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00,
9118c2ecf20Sopenharmony_ci			  0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x03,
9128c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06, 0xf7,
9138c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80, 0x80,
9148c2ecf20Sopenharmony_ci			  0x00, 0x2d, 0x46, 0x58, 0x67, 0x74, 0x7f, 0x88,
9158c2ecf20Sopenharmony_ci			  0x94, 0x9d, 0xa6, 0xae, 0xb5, 0xbd, 0xc4, 0xcb,
9168c2ecf20Sopenharmony_ci			  0xd1, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54, 0x64,
9178c2ecf20Sopenharmony_ci			  0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2, 0xe2,
9188c2ecf20Sopenharmony_ci			  0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
9198c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
9208c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
9218c2ecf20Sopenharmony_ci	0x10, 0x80, 0x22, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
9228c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x3f, 0x01,
9238c2ecf20Sopenharmony_ci			  0x00, 0x00, 0xef, 0x00, 0x02, 0x0a, 0x82, 0x02,
9248c2ecf20Sopenharmony_ci			  0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40, 0x01,
9258c2ecf20Sopenharmony_ci			  0xf0, 0x00,
9268c2ecf20Sopenharmony_ci
9278c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
9288c2ecf20Sopenharmony_ci			  0x00, 0x78, 0x3f, 0x3f, 0x00, 0xf2, 0x8f, 0x81,
9298c2ecf20Sopenharmony_ci			  0x40,
9308c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x15,
9318c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0x2f,
9328c2ecf20Sopenharmony_ci	0x10, 0x8c, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
9338c2ecf20Sopenharmony_ci	0x10, 0x1b, 0x02, 0x00, 0x00,
9348c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00,
9358c2ecf20Sopenharmony_ci	0x10, 0x26, 0x06, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,
9368c2ecf20Sopenharmony_ci	0x10, 0x24, 0x02, 0x40, 0x06,
9378c2ecf20Sopenharmony_ci	0x10, 0x0e, 0x01, 0x08,
9388c2ecf20Sopenharmony_ci	0x10, 0x48, 0x11, 0x00, 0x15, 0x40, 0x67, 0x84, 0x9d, 0xb2, 0xc6,
9398c2ecf20Sopenharmony_ci			  0xd6, 0xe7, 0xf6, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
9408c2ecf20Sopenharmony_ci			  0xf9,
9418c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x00,
9428c2ecf20Sopenharmony_ci	0x10, 0x0f, 0x02, 0x16, 0x16,
9438c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x0c,
9448c2ecf20Sopenharmony_ci	0x10, 0x48, 0x11, 0x00, 0x15, 0x40, 0x67, 0x84, 0x9d, 0xb2, 0xc6,
9458c2ecf20Sopenharmony_ci			  0xd6, 0xe7, 0xf6, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
9468c2ecf20Sopenharmony_ci			  0xf9,
9478c2ecf20Sopenharmony_ci	0x10, 0x0b, 0x01, 0x26,
9488c2ecf20Sopenharmony_ci	0x10, 0x0d, 0x01, 0x10,
9498c2ecf20Sopenharmony_ci	0x10, 0x0c, 0x01, 0x1c,
9508c2ecf20Sopenharmony_ci	0x05, 0x06, 0x01, 0x03,
9518c2ecf20Sopenharmony_ci	0x05, 0x04, 0x01, 0x00,
9528c2ecf20Sopenharmony_ci	0, 0, 0
9538c2ecf20Sopenharmony_ci};
9548c2ecf20Sopenharmony_ci
9558c2ecf20Sopenharmony_ci/* 06a5:d001 - nw802 - Panasonic
9568c2ecf20Sopenharmony_ci *		GP-KR651US (Philips TDA8786) */
9578c2ecf20Sopenharmony_cistatic const u8 kr651_start_1[] = {
9588c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x04,
9598c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x44, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x48,
9608c2ecf20Sopenharmony_ci			  0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
9618c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
9628c2ecf20Sopenharmony_ci			  0x00, 0x0b, 0x00, 0x1b, 0x00, 0xc8, 0x00, 0xf4,
9638c2ecf20Sopenharmony_ci			  0x05, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,
9648c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
9658c2ecf20Sopenharmony_ci			  0x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,
9668c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
9678c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,
9688c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
9698c2ecf20Sopenharmony_ci			  0x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,
9708c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
9718c2ecf20Sopenharmony_ci			  0x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,
9728c2ecf20Sopenharmony_ci			  0x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
9738c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,
9748c2ecf20Sopenharmony_ci			  0x00, 0x5d, 0x00, 0xc7, 0x00, 0x7e, 0x00, 0x30,
9758c2ecf20Sopenharmony_ci	0x00, 0x80, 0x1f, 0x18, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,
9768c2ecf20Sopenharmony_ci			  0x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
9778c2ecf20Sopenharmony_ci			  0x00, 0x0c, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,
9788c2ecf20Sopenharmony_ci			  0x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00,
9798c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
9808c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
9818c2ecf20Sopenharmony_ci			  0x40, 0x20,
9828c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x02, 0x00, 0x00,
9838c2ecf20Sopenharmony_ci	0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,
9848c2ecf20Sopenharmony_ci	0x06, 0x00, 0x02, 0x09, 0x99,
9858c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9868c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9878c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
9888c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
9898c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
9908c2ecf20Sopenharmony_ci			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9918c2ecf20Sopenharmony_ci			  0x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,
9928c2ecf20Sopenharmony_ci			  0x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
9938c2ecf20Sopenharmony_ci			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
9948c2ecf20Sopenharmony_ci			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
9958c2ecf20Sopenharmony_ci			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
9968c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
9978c2ecf20Sopenharmony_ci			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
9988c2ecf20Sopenharmony_ci			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
9998c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
10008c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
10018c2ecf20Sopenharmony_ci			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
10028c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
10038c2ecf20Sopenharmony_ci			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
10048c2ecf20Sopenharmony_ci	0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
10058c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x05, 0x82,
10068c2ecf20Sopenharmony_ci			  0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
10078c2ecf20Sopenharmony_ci			  0x01, 0xf0, 0x00,
10088c2ecf20Sopenharmony_ci	0, 0, 0
10098c2ecf20Sopenharmony_ci};
10108c2ecf20Sopenharmony_cistatic const u8 kr651_start_qvga[] = {
10118c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
10128c2ecf20Sopenharmony_ci			  0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,
10138c2ecf20Sopenharmony_ci			  0x40,
10148c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x03,
10158c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0xac,
10168c2ecf20Sopenharmony_ci	0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
10178c2ecf20Sopenharmony_ci	0x10, 0x1b, 0x02, 0x00, 0x00,
10188c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x29, 0x00, 0x18, 0x01, 0x1f, 0x00, 0xd2, 0x00,
10198c2ecf20Sopenharmony_ci	0x10, 0x1d, 0x06, 0xe0, 0x00, 0x0c, 0x00, 0x52, 0x00,
10208c2ecf20Sopenharmony_ci	0x10, 0x1d, 0x02, 0x28, 0x01,
10218c2ecf20Sopenharmony_ci	0, 0, 0
10228c2ecf20Sopenharmony_ci};
10238c2ecf20Sopenharmony_cistatic const u8 kr651_start_vga[] = {
10248c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x78, 0xa0, 0x8c, 0x78, 0xa0, 0x00, 0x00, 0x00,
10258c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x30, 0x03, 0x01, 0x82, 0x82, 0x98,
10268c2ecf20Sopenharmony_ci			  0x80,
10278c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x03,
10288c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0xa0,
10298c2ecf20Sopenharmony_ci	0x10, 0x85, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01,
10308c2ecf20Sopenharmony_ci	0x10, 0x1b, 0x02, 0x00, 0x00,
10318c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x51, 0x00, 0x30, 0x02, 0x3d, 0x00, 0xa4, 0x01,
10328c2ecf20Sopenharmony_ci	0x10, 0x1d, 0x06, 0xe0, 0x00, 0x0c, 0x00, 0x52, 0x00,
10338c2ecf20Sopenharmony_ci	0x10, 0x1d, 0x02, 0x68, 0x00,
10348c2ecf20Sopenharmony_ci};
10358c2ecf20Sopenharmony_cistatic const u8 kr651_start_2[] = {
10368c2ecf20Sopenharmony_ci	0x10, 0x0e, 0x01, 0x08,
10378c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x11, 0x3c, 0x5c, 0x74, 0x88, 0x99, 0xa8,
10388c2ecf20Sopenharmony_ci			  0xb7, 0xc4, 0xd0, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc,
10398c2ecf20Sopenharmony_ci			  0xdc,
10408c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x00,
10418c2ecf20Sopenharmony_ci	0x10, 0x0f, 0x02, 0x0c, 0x0c,
10428c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x0c,
10438c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x11, 0x3c, 0x5c, 0x74, 0x88, 0x99, 0xa8,
10448c2ecf20Sopenharmony_ci			  0xb7, 0xc4, 0xd0, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc,
10458c2ecf20Sopenharmony_ci			  0xdc,
10468c2ecf20Sopenharmony_ci	0x10, 0x0b, 0x01, 0x10,
10478c2ecf20Sopenharmony_ci	0x10, 0x0d, 0x01, 0x10,
10488c2ecf20Sopenharmony_ci	0x10, 0x0c, 0x01, 0x2d,
10498c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x03,
10508c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x00,
10518c2ecf20Sopenharmony_ci	0, 0, 0
10528c2ecf20Sopenharmony_ci};
10538c2ecf20Sopenharmony_ci
10548c2ecf20Sopenharmony_ci/* nw802 - iRez Kritter cam */
10558c2ecf20Sopenharmony_cistatic const u8 kritter_start[] = {
10568c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x06,
10578c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x44, 0x96, 0x98, 0x94, 0x03, 0x18, 0x00, 0x48,
10588c2ecf20Sopenharmony_ci			  0x0f, 0x1e, 0x00, 0x0c, 0x02, 0x01, 0x00, 0x19,
10598c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
10608c2ecf20Sopenharmony_ci			  0x00, 0x0b, 0x00, 0x1b, 0x00, 0x0a, 0x01, 0x28,
10618c2ecf20Sopenharmony_ci			  0x07, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,
10628c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
10638c2ecf20Sopenharmony_ci			  0x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,
10648c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
10658c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,
10668c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
10678c2ecf20Sopenharmony_ci			  0x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,
10688c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
10698c2ecf20Sopenharmony_ci			  0x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,
10708c2ecf20Sopenharmony_ci			  0x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
10718c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,
10728c2ecf20Sopenharmony_ci			  0x00, 0x5d, 0x00, 0x0e, 0x00, 0x7e, 0x00, 0x30,
10738c2ecf20Sopenharmony_ci	0x00, 0x80, 0x1f, 0x18, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,
10748c2ecf20Sopenharmony_ci			  0x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
10758c2ecf20Sopenharmony_ci			  0x00, 0x0b, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,
10768c2ecf20Sopenharmony_ci			  0x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00,
10778c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
10788c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
10798c2ecf20Sopenharmony_ci			  0x40, 0x20,
10808c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x02, 0x00, 0x00,
10818c2ecf20Sopenharmony_ci	0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00,
10828c2ecf20Sopenharmony_ci	0x06, 0x00, 0x02, 0x09, 0x99,
10838c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10848c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10858c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
10868c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
10878c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
10888c2ecf20Sopenharmony_ci			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10898c2ecf20Sopenharmony_ci			  0x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,
10908c2ecf20Sopenharmony_ci			  0x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
10918c2ecf20Sopenharmony_ci			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
10928c2ecf20Sopenharmony_ci			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
10938c2ecf20Sopenharmony_ci			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
10948c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
10958c2ecf20Sopenharmony_ci			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
10968c2ecf20Sopenharmony_ci			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
10978c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
10988c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
10998c2ecf20Sopenharmony_ci			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
11008c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
11018c2ecf20Sopenharmony_ci			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
11028c2ecf20Sopenharmony_ci	0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
11038c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x82,
11048c2ecf20Sopenharmony_ci			  0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
11058c2ecf20Sopenharmony_ci			  0x01, 0xf0, 0x00,
11068c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x3c, 0x50, 0x8c, 0x3c, 0x50, 0x00, 0x00, 0x00,
11078c2ecf20Sopenharmony_ci			  0x00, 0x78, 0x3f, 0x3f, 0x06, 0xf2, 0x8f, 0xf0,
11088c2ecf20Sopenharmony_ci			  0x40,
11098c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x03,
11108c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0xaf,
11118c2ecf20Sopenharmony_ci	0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
11128c2ecf20Sopenharmony_ci	0x10, 0x1b, 0x02, 0x3b, 0x01,
11138c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00,
11148c2ecf20Sopenharmony_ci	0x10, 0x1d, 0x06, 0xe0, 0x00, 0x0c, 0x00, 0x52, 0x00,
11158c2ecf20Sopenharmony_ci	0x10, 0x1d, 0x02, 0x00, 0x00,
11168c2ecf20Sopenharmony_ci	0x10, 0x0e, 0x01, 0x08,
11178c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x0d, 0x36, 0x4e, 0x60, 0x6f, 0x7b, 0x86,
11188c2ecf20Sopenharmony_ci			  0x90, 0x98, 0xa1, 0xa9, 0xb1, 0xb7, 0xbe, 0xc4,
11198c2ecf20Sopenharmony_ci			  0xcb,
11208c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x00,
11218c2ecf20Sopenharmony_ci	0x10, 0x0f, 0x02, 0x0d, 0x0d,
11228c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x02,
11238c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x0d, 0x36, 0x4e, 0x60, 0x6f, 0x7b, 0x86,
11248c2ecf20Sopenharmony_ci			  0x90, 0x98, 0xa1, 0xa9, 0xb1, 0xb7, 0xbe, 0xc4,
11258c2ecf20Sopenharmony_ci			  0xcb,
11268c2ecf20Sopenharmony_ci	0x10, 0x0b, 0x01, 0x17,
11278c2ecf20Sopenharmony_ci	0x10, 0x0d, 0x01, 0x10,
11288c2ecf20Sopenharmony_ci	0x10, 0x0c, 0x01, 0x1e,
11298c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x03,
11308c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x00,
11318c2ecf20Sopenharmony_ci	0, 0, 0
11328c2ecf20Sopenharmony_ci};
11338c2ecf20Sopenharmony_ci
11348c2ecf20Sopenharmony_ci/* nw802 - Mustek Wcam 300 mini */
11358c2ecf20Sopenharmony_cistatic const u8 mustek_start[] = {
11368c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x04,
11378c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x92, 0x03, 0x10, 0x00, 0x4d,
11388c2ecf20Sopenharmony_ci			  0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
11398c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
11408c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,
11418c2ecf20Sopenharmony_ci			  0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
11428c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
11438c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
11448c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
11458c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
11468c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
11478c2ecf20Sopenharmony_ci			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
11488c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
11498c2ecf20Sopenharmony_ci			  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
11508c2ecf20Sopenharmony_ci			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
11518c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
11528c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
11538c2ecf20Sopenharmony_ci	0x00, 0x80, 0x1f, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x68, 0x00,
11548c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
11558c2ecf20Sopenharmony_ci			  0x00, 0x0c, 0x02, 0x01, 0x00, 0x16, 0x00, 0x94,
11568c2ecf20Sopenharmony_ci			  0x00, 0x10, 0x06, 0xfc, 0x05, 0x0c, 0x06,
11578c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
11588c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
11598c2ecf20Sopenharmony_ci			  0x40, 0x20,
11608c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
11618c2ecf20Sopenharmony_ci	0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,
11628c2ecf20Sopenharmony_ci	0x06, 0x00, 0x02, 0x09, 0x99,
11638c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
11648c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
11658c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
11668c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0xa1, 0x02, 0x80, 0x00, 0x13, 0x00, 0x00, 0x00,
11678c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
11688c2ecf20Sopenharmony_ci			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
11698c2ecf20Sopenharmony_ci			  0x00, 0x49, 0x13, 0x00, 0x00, 0xc0, 0x00, 0x14,
11708c2ecf20Sopenharmony_ci			  0x02, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00,
11718c2ecf20Sopenharmony_ci			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
11728c2ecf20Sopenharmony_ci			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
11738c2ecf20Sopenharmony_ci			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
11748c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
11758c2ecf20Sopenharmony_ci			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
11768c2ecf20Sopenharmony_ci			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
11778c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
11788c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
11798c2ecf20Sopenharmony_ci			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
11808c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
11818c2ecf20Sopenharmony_ci			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
11828c2ecf20Sopenharmony_ci	0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
11838c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x01, 0x82,
11848c2ecf20Sopenharmony_ci			  0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
11858c2ecf20Sopenharmony_ci			  0x01, 0xf0, 0x00,
11868c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
11878c2ecf20Sopenharmony_ci			  0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,
11888c2ecf20Sopenharmony_ci			  0x40,
11898c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x00,
11908c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0xad,
11918c2ecf20Sopenharmony_ci	0x00, 0x00, 0x01, 0x08,
11928c2ecf20Sopenharmony_ci	0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
11938c2ecf20Sopenharmony_ci	0x10, 0x1b, 0x02, 0x00, 0x00,
11948c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
11958c2ecf20Sopenharmony_ci	0x10, 0x1d, 0x08, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20,
11968c2ecf20Sopenharmony_ci	0x10, 0x0e, 0x01, 0x0f,
11978c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x0f, 0x29, 0x4a, 0x64, 0x7a, 0x8c, 0x9e,
11988c2ecf20Sopenharmony_ci			  0xad, 0xba, 0xc7, 0xd3, 0xde, 0xe8, 0xf1, 0xf9,
11998c2ecf20Sopenharmony_ci			  0xff,
12008c2ecf20Sopenharmony_ci	0x10, 0x0f, 0x02, 0x11, 0x11,
12018c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x0c,
12028c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x0f, 0x29, 0x4a, 0x64, 0x7a, 0x8c, 0x9e,
12038c2ecf20Sopenharmony_ci			  0xad, 0xba, 0xc7, 0xd3, 0xde, 0xe8, 0xf1, 0xf9,
12048c2ecf20Sopenharmony_ci			  0xff,
12058c2ecf20Sopenharmony_ci	0x10, 0x0b, 0x01, 0x1c,
12068c2ecf20Sopenharmony_ci	0x10, 0x0d, 0x01, 0x1a,
12078c2ecf20Sopenharmony_ci	0x10, 0x0c, 0x01, 0x34,
12088c2ecf20Sopenharmony_ci	0x04, 0x05, 0x01, 0x61,
12098c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x40,
12108c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x03,
12118c2ecf20Sopenharmony_ci	0, 0, 0
12128c2ecf20Sopenharmony_ci};
12138c2ecf20Sopenharmony_ci
12148c2ecf20Sopenharmony_ci/* nw802 - Scope USB Microscope M2 (ProScope) (Hitachi HD49322BF) */
12158c2ecf20Sopenharmony_cistatic const u8 proscope_init[] = {
12168c2ecf20Sopenharmony_ci	0x04, 0x05, 0x01, 0x21,
12178c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x01,
12188c2ecf20Sopenharmony_ci	0, 0, 0
12198c2ecf20Sopenharmony_ci};
12208c2ecf20Sopenharmony_cistatic const u8 proscope_start_1[] = {
12218c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x04,
12228c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x10, 0x01, 0x00, 0xf9, 0x02, 0x10, 0x00, 0x04,
12238c2ecf20Sopenharmony_ci			  0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
12248c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
12258c2ecf20Sopenharmony_ci			  0x00, 0x08, 0x00, 0x17, 0x00, 0xce, 0x00, 0xf4,
12268c2ecf20Sopenharmony_ci			  0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
12278c2ecf20Sopenharmony_ci			  0x00, 0xce, 0x00, 0xf8, 0x03, 0x3e, 0x00, 0x86,
12288c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
12298c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
12308c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0xb6,
12318c2ecf20Sopenharmony_ci			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
12328c2ecf20Sopenharmony_ci			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
12338c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
12348c2ecf20Sopenharmony_ci			  0x00, 0xf6, 0x03, 0x34, 0x04, 0xf6, 0x03, 0x34,
12358c2ecf20Sopenharmony_ci			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
12368c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xe8,
12378c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
12388c2ecf20Sopenharmony_ci	0x00, 0x80, 0x1f, 0xb4, 0x6f, 0x1f, 0x0f, 0x08, 0x20, 0xa8, 0x00,
12398c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
12408c2ecf20Sopenharmony_ci			  0x00, 0x0c, 0x02, 0x01, 0x00, 0x19, 0x00, 0x94,
12418c2ecf20Sopenharmony_ci			  0x00, 0x10, 0x06, 0x10, 0x00, 0x36, 0x00,
12428c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
12438c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
12448c2ecf20Sopenharmony_ci			  0x40, 0x20,
12458c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
12468c2ecf20Sopenharmony_ci	0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,
12478c2ecf20Sopenharmony_ci	0x06, 0x00, 0x02, 0x09, 0x99,
12488c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
12498c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
12508c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
12518c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0xad, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
12528c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x10, 0x1f, 0x10, 0x08, 0x0a,
12538c2ecf20Sopenharmony_ci			  0x0a, 0x51, 0x00, 0xf1, 0x00, 0x3c, 0x00, 0xb4,
12548c2ecf20Sopenharmony_ci			  0x00, 0x49, 0x13, 0x00, 0x00, 0x8c, 0x04, 0x01,
12558c2ecf20Sopenharmony_ci			  0x20, 0x02, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00,
12568c2ecf20Sopenharmony_ci			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
12578c2ecf20Sopenharmony_ci			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
12588c2ecf20Sopenharmony_ci			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
12598c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0x80, 0x00, 0x2d, 0x46, 0x58, 0x67, 0x74, 0x7f,
12608c2ecf20Sopenharmony_ci			  0x88, 0x94, 0x9d, 0xa6, 0xae, 0xb5, 0xbd, 0xc4,
12618c2ecf20Sopenharmony_ci			  0xcb, 0xd1, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
12628c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
12638c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
12648c2ecf20Sopenharmony_ci			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
12658c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
12668c2ecf20Sopenharmony_ci			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
12678c2ecf20Sopenharmony_ci	0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x3f,
12688c2ecf20Sopenharmony_ci			  0x01, 0x00, 0x00, 0xef, 0x00, 0x09, 0x05, 0x82,
12698c2ecf20Sopenharmony_ci			  0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
12708c2ecf20Sopenharmony_ci			  0x01, 0xf0, 0x00,
12718c2ecf20Sopenharmony_ci	0, 0, 0
12728c2ecf20Sopenharmony_ci};
12738c2ecf20Sopenharmony_cistatic const u8 proscope_start_qvga[] = {
12748c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
12758c2ecf20Sopenharmony_ci			  0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,
12768c2ecf20Sopenharmony_ci			  0x40,
12778c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x06,
12788c2ecf20Sopenharmony_ci	0x00, 0x03, 0x02, 0xf9, 0x02,
12798c2ecf20Sopenharmony_ci	0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
12808c2ecf20Sopenharmony_ci	0x10, 0x1b, 0x02, 0x00, 0x00,
12818c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
12828c2ecf20Sopenharmony_ci	0x10, 0x1d, 0x08, 0xc0, 0x0d, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,
12838c2ecf20Sopenharmony_ci	0x10, 0x0e, 0x01, 0x10,
12848c2ecf20Sopenharmony_ci	0, 0, 0
12858c2ecf20Sopenharmony_ci};
12868c2ecf20Sopenharmony_cistatic const u8 proscope_start_vga[] = {
12878c2ecf20Sopenharmony_ci	0x00, 0x03, 0x02, 0xf9, 0x02,
12888c2ecf20Sopenharmony_ci	0x10, 0x85, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01,
12898c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x78, 0xa0, 0x8c, 0x78, 0xa0, 0x00, 0x00, 0x00,
12908c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x16, 0x00, 0x00, 0x82, 0x84, 0x00,
12918c2ecf20Sopenharmony_ci			  0x80,
12928c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x06,
12938c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0xa1,
12948c2ecf20Sopenharmony_ci	0x10, 0x1b, 0x02, 0x00, 0x00,
12958c2ecf20Sopenharmony_ci	0x10, 0x1d, 0x08, 0xc0, 0x0d, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,
12968c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01,
12978c2ecf20Sopenharmony_ci	0x10, 0x0e, 0x01, 0x10,
12988c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x10, 0x51, 0x6e, 0x83, 0x93, 0xa1, 0xae,
12998c2ecf20Sopenharmony_ci			  0xb9, 0xc3, 0xcc, 0xd4, 0xdd, 0xe4, 0xeb, 0xf2,
13008c2ecf20Sopenharmony_ci			  0xf9,
13018c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x00,
13028c2ecf20Sopenharmony_ci	0, 0, 0
13038c2ecf20Sopenharmony_ci};
13048c2ecf20Sopenharmony_cistatic const u8 proscope_start_2[] = {
13058c2ecf20Sopenharmony_ci	0x10, 0x0f, 0x02, 0x0c, 0x0c,
13068c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x0c,
13078c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x10, 0x51, 0x6e, 0x83, 0x93, 0xa1, 0xae,
13088c2ecf20Sopenharmony_ci			  0xb9, 0xc3, 0xcc, 0xd4, 0xdd, 0xe4, 0xeb, 0xf2,
13098c2ecf20Sopenharmony_ci			  0xf9,
13108c2ecf20Sopenharmony_ci	0x10, 0x0b, 0x01, 0x0b,
13118c2ecf20Sopenharmony_ci	0x10, 0x0d, 0x01, 0x10,
13128c2ecf20Sopenharmony_ci	0x10, 0x0c, 0x01, 0x1b,
13138c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x03,
13148c2ecf20Sopenharmony_ci	0x04, 0x05, 0x01, 0x21,
13158c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x00,
13168c2ecf20Sopenharmony_ci	0, 0, 0
13178c2ecf20Sopenharmony_ci};
13188c2ecf20Sopenharmony_ci
13198c2ecf20Sopenharmony_ci/* nw800 - hv7121b? (seems pas106) - Divio Chicony TwinkleCam */
13208c2ecf20Sopenharmony_cistatic const u8 twinkle_start[] = {
13218c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x44,
13228c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x00,
13238c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x14, 0x83, 0x00, 0xba, 0x01, 0x10, 0x00, 0x4f,
13248c2ecf20Sopenharmony_ci			  0xef, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x19,
13258c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
13268c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x06, 0x00, 0xfc,
13278c2ecf20Sopenharmony_ci			  0x01, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
13288c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
13298c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
13308c2ecf20Sopenharmony_ci			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
13318c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
13328c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
13338c2ecf20Sopenharmony_ci			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
13348c2ecf20Sopenharmony_ci			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
13358c2ecf20Sopenharmony_ci			  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
13368c2ecf20Sopenharmony_ci			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
13378c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
13388c2ecf20Sopenharmony_ci			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
13398c2ecf20Sopenharmony_ci	0x00, 0x80, 0x1f, 0xb8, 0x48, 0x0f, 0x04, 0x88, 0x14, 0x68, 0x00,
13408c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x03,
13418c2ecf20Sopenharmony_ci			  0x00, 0x24, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
13428c2ecf20Sopenharmony_ci			  0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00,
13438c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
13448c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
13458c2ecf20Sopenharmony_ci			  0x40, 0x20,
13468c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
13478c2ecf20Sopenharmony_ci	0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0x00,
13488c2ecf20Sopenharmony_ci	0x05, 0x00, 0x06, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
13498c2ecf20Sopenharmony_ci	0x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
13508c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
13518c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
13528c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00,
13538c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
13548c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
13558c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
13568c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0x80, 0x02, 0x20, 0x00, 0x11, 0x00, 0x00, 0x00,
13578c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x08,
13588c2ecf20Sopenharmony_ci			  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
13598c2ecf20Sopenharmony_ci			  0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
13608c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
13618c2ecf20Sopenharmony_ci			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
13628c2ecf20Sopenharmony_ci			  0x03, 0x00, 0x00, 0x10, 0x00, 0x20, 0x10, 0x06,
13638c2ecf20Sopenharmony_ci			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x00, 0x80,
13648c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
13658c2ecf20Sopenharmony_ci			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
13668c2ecf20Sopenharmony_ci			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
13678c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
13688c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
13698c2ecf20Sopenharmony_ci			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
13708c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
13718c2ecf20Sopenharmony_ci			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
13728c2ecf20Sopenharmony_ci	0x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
13738c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62,
13748c2ecf20Sopenharmony_ci			  0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
13758c2ecf20Sopenharmony_ci			  0x01, 0x60, 0x01, 0x00, 0x00,
13768c2ecf20Sopenharmony_ci
13778c2ecf20Sopenharmony_ci	0x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
13788c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x10,
13798c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x00,
13808c2ecf20Sopenharmony_ci	0x04, 0x05, 0x01, 0x61,
13818c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x01,
13828c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x00,
13838c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x0a,
13848c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x11, 0x06,
13858c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x14, 0x00,
13868c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x13, 0x01,		/* i2c end */
13878c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x07, 0x01,
13888c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,
13898c2ecf20Sopenharmony_ci			  0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,
13908c2ecf20Sopenharmony_ci			  0x40,
13918c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x02, 0x0c,
13928c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x13, 0x01,
13938c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0x01,
13948c2ecf20Sopenharmony_ci	0x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,
13958c2ecf20Sopenharmony_ci			  0x20, 0x01, 0x60, 0x01,
13968c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x05, 0x0f,
13978c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x13, 0x01,
13988c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x08, 0x08, 0x04, 0x0b, 0x01, 0x01, 0x02, 0x00, 0x17,
13998c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x03, 0x12, 0x00, 0x01,
14008c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
14018c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x12, 0x00,
14028c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x0e, 0x00,
14038c2ecf20Sopenharmony_ci	I2C0, 0x40, 0x02, 0x11, 0x06,
14048c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,
14058c2ecf20Sopenharmony_ci			  0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,
14068c2ecf20Sopenharmony_ci			  0xf9,
14078c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x00,
14088c2ecf20Sopenharmony_ci	0x10, 0x0f, 0x02, 0x0c, 0x0c,
14098c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x06,
14108c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,
14118c2ecf20Sopenharmony_ci			  0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,
14128c2ecf20Sopenharmony_ci			  0xf9,
14138c2ecf20Sopenharmony_ci	0x10, 0x0b, 0x01, 0x19,
14148c2ecf20Sopenharmony_ci	0x10, 0x0d, 0x01, 0x10,
14158c2ecf20Sopenharmony_ci	0x10, 0x0c, 0x01, 0x0d,
14168c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x03,
14178c2ecf20Sopenharmony_ci	0x04, 0x05, 0x01, 0x61,
14188c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x41,
14198c2ecf20Sopenharmony_ci	0, 0, 0
14208c2ecf20Sopenharmony_ci};
14218c2ecf20Sopenharmony_ci
14228c2ecf20Sopenharmony_ci/* nw802 dvc-v6 */
14238c2ecf20Sopenharmony_cistatic const u8 dvcv6_start[] = {
14248c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x06,
14258c2ecf20Sopenharmony_ci	0x00, 0x00, 0x40, 0x54, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x4c,
14268c2ecf20Sopenharmony_ci			  0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
14278c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
14288c2ecf20Sopenharmony_ci			  0x00, 0x0b, 0x00, 0x1b, 0x00, 0xc8, 0x00, 0xf4,
14298c2ecf20Sopenharmony_ci			  0x05, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,
14308c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
14318c2ecf20Sopenharmony_ci			  0x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,
14328c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
14338c2ecf20Sopenharmony_ci	0x00, 0x40, 0x40, 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,
14348c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
14358c2ecf20Sopenharmony_ci			  0x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,
14368c2ecf20Sopenharmony_ci			  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
14378c2ecf20Sopenharmony_ci			  0x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,
14388c2ecf20Sopenharmony_ci			  0x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
14398c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,
14408c2ecf20Sopenharmony_ci			  0x00, 0x5d, 0x00, 0xc7, 0x00, 0x7e, 0x00, 0x30,
14418c2ecf20Sopenharmony_ci	0x00, 0x80, 0x1f, 0x98, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,
14428c2ecf20Sopenharmony_ci			  0x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
14438c2ecf20Sopenharmony_ci			  0x00, 0x0c, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,
14448c2ecf20Sopenharmony_ci			  0x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00,
14458c2ecf20Sopenharmony_ci	0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
14468c2ecf20Sopenharmony_ci			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
14478c2ecf20Sopenharmony_ci			  0x40, 0x20,
14488c2ecf20Sopenharmony_ci	0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
14498c2ecf20Sopenharmony_ci	0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00,
14508c2ecf20Sopenharmony_ci	0x06, 0x00, 0x02, 0x09, 0x99,
14518c2ecf20Sopenharmony_ci	0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
14528c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
14538c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00,
14548c2ecf20Sopenharmony_ci	0x10, 0x00, 0x40, 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
14558c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
14568c2ecf20Sopenharmony_ci			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
14578c2ecf20Sopenharmony_ci			  0x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,
14588c2ecf20Sopenharmony_ci			  0x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
14598c2ecf20Sopenharmony_ci			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
14608c2ecf20Sopenharmony_ci			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
14618c2ecf20Sopenharmony_ci			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
14628c2ecf20Sopenharmony_ci	0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
14638c2ecf20Sopenharmony_ci			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
14648c2ecf20Sopenharmony_ci			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
14658c2ecf20Sopenharmony_ci			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
14668c2ecf20Sopenharmony_ci			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
14678c2ecf20Sopenharmony_ci			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
14688c2ecf20Sopenharmony_ci			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
14698c2ecf20Sopenharmony_ci			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
14708c2ecf20Sopenharmony_ci	0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
14718c2ecf20Sopenharmony_ci			  0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x05, 0x82,
14728c2ecf20Sopenharmony_ci			  0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
14738c2ecf20Sopenharmony_ci			  0x01, 0xf0, 0x00,
14748c2ecf20Sopenharmony_ci	0x00, 0x03, 0x02, 0x94, 0x03,
14758c2ecf20Sopenharmony_ci	0x00, 0x1d, 0x04, 0x0a, 0x01, 0x28, 0x07,
14768c2ecf20Sopenharmony_ci	0x00, 0x7b, 0x02, 0xe0, 0x00,
14778c2ecf20Sopenharmony_ci	0x10, 0x8d, 0x01, 0x00,
14788c2ecf20Sopenharmony_ci	0x00, 0x09, 0x04, 0x1e, 0x00, 0x0c, 0x02,
14798c2ecf20Sopenharmony_ci	0x00, 0x91, 0x02, 0x0b, 0x02,
14808c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0xaf,
14818c2ecf20Sopenharmony_ci	0x02, 0x00, 0x11, 0x3c, 0x50, 0x8f, 0x3c, 0x50, 0x00, 0x00, 0x00,
14828c2ecf20Sopenharmony_ci			  0x00, 0x78, 0x3f, 0x3f, 0x06, 0xf2, 0x8f, 0xf0,
14838c2ecf20Sopenharmony_ci			  0x40,
14848c2ecf20Sopenharmony_ci	0x10, 0x1a, 0x01, 0x02,
14858c2ecf20Sopenharmony_ci	0x10, 0x00, 0x01, 0xaf,
14868c2ecf20Sopenharmony_ci	0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
14878c2ecf20Sopenharmony_ci	0x10, 0x1b, 0x02, 0x07, 0x01,
14888c2ecf20Sopenharmony_ci	0x10, 0x11, 0x08, 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00,
14898c2ecf20Sopenharmony_ci	0x10, 0x1f, 0x06, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,
14908c2ecf20Sopenharmony_ci	0x10, 0x1d, 0x02, 0x40, 0x06,
14918c2ecf20Sopenharmony_ci	0x10, 0x0e, 0x01, 0x08,
14928c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x0f, 0x54, 0x6f, 0x82, 0x91, 0x9f, 0xaa,
14938c2ecf20Sopenharmony_ci			  0xb4, 0xbd, 0xc5, 0xcd, 0xd5, 0xdb, 0xdc, 0xdc,
14948c2ecf20Sopenharmony_ci			  0xdc,
14958c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x00,
14968c2ecf20Sopenharmony_ci	0x10, 0x0f, 0x02, 0x12, 0x12,
14978c2ecf20Sopenharmony_ci	0x10, 0x03, 0x01, 0x11,
14988c2ecf20Sopenharmony_ci	0x10, 0x41, 0x11, 0x00, 0x0f, 0x54, 0x6f, 0x82, 0x91, 0x9f, 0xaa,
14998c2ecf20Sopenharmony_ci			  0xb4, 0xbd, 0xc5, 0xcd, 0xd5, 0xdb, 0xdc, 0xdc,
15008c2ecf20Sopenharmony_ci			  0xdc,
15018c2ecf20Sopenharmony_ci	0x10, 0x0b, 0x01, 0x16,
15028c2ecf20Sopenharmony_ci	0x10, 0x0d, 0x01, 0x10,
15038c2ecf20Sopenharmony_ci	0x10, 0x0c, 0x01, 0x1a,
15048c2ecf20Sopenharmony_ci	0x04, 0x06, 0x01, 0x03,
15058c2ecf20Sopenharmony_ci	0x04, 0x04, 0x01, 0x00,
15068c2ecf20Sopenharmony_ci};
15078c2ecf20Sopenharmony_ci
15088c2ecf20Sopenharmony_cistatic const u8 *webcam_start[] = {
15098c2ecf20Sopenharmony_ci	[Generic800] = nw800_start,
15108c2ecf20Sopenharmony_ci	[SpaceCam] = spacecam_start,
15118c2ecf20Sopenharmony_ci	[SpaceCam2] = spacecam2_start,
15128c2ecf20Sopenharmony_ci	[Cvideopro] = cvideopro_start,
15138c2ecf20Sopenharmony_ci	[Dlink350c] = dlink_start,
15148c2ecf20Sopenharmony_ci	[DS3303u] = ds3303_start,
15158c2ecf20Sopenharmony_ci	[Kr651us] = kr651_start_1,
15168c2ecf20Sopenharmony_ci	[Kritter] = kritter_start,
15178c2ecf20Sopenharmony_ci	[Mustek300] = mustek_start,
15188c2ecf20Sopenharmony_ci	[Proscope] = proscope_start_1,
15198c2ecf20Sopenharmony_ci	[Twinkle] = twinkle_start,
15208c2ecf20Sopenharmony_ci	[DvcV6] = dvcv6_start,
15218c2ecf20Sopenharmony_ci	[P35u] = nw801_start_1,
15228c2ecf20Sopenharmony_ci	[Generic802] = nw802_start,
15238c2ecf20Sopenharmony_ci};
15248c2ecf20Sopenharmony_ci
15258c2ecf20Sopenharmony_ci/* -- write a register -- */
15268c2ecf20Sopenharmony_cistatic void reg_w(struct gspca_dev *gspca_dev,
15278c2ecf20Sopenharmony_ci			u16 index,
15288c2ecf20Sopenharmony_ci			const u8 *data,
15298c2ecf20Sopenharmony_ci			int len)
15308c2ecf20Sopenharmony_ci{
15318c2ecf20Sopenharmony_ci	struct usb_device *dev = gspca_dev->dev;
15328c2ecf20Sopenharmony_ci	int ret;
15338c2ecf20Sopenharmony_ci
15348c2ecf20Sopenharmony_ci	if (gspca_dev->usb_err < 0)
15358c2ecf20Sopenharmony_ci		return;
15368c2ecf20Sopenharmony_ci	if (len == 1)
15378c2ecf20Sopenharmony_ci		gspca_dbg(gspca_dev, D_USBO, "SET 00 0000 %04x %02x\n",
15388c2ecf20Sopenharmony_ci			  index, *data);
15398c2ecf20Sopenharmony_ci	else
15408c2ecf20Sopenharmony_ci		gspca_dbg(gspca_dev, D_USBO, "SET 00 0000 %04x %02x %02x ...\n",
15418c2ecf20Sopenharmony_ci			  index, *data, data[1]);
15428c2ecf20Sopenharmony_ci	memcpy(gspca_dev->usb_buf, data, len);
15438c2ecf20Sopenharmony_ci	ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
15448c2ecf20Sopenharmony_ci			0x00,
15458c2ecf20Sopenharmony_ci			USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
15468c2ecf20Sopenharmony_ci			0x00,		/* value */
15478c2ecf20Sopenharmony_ci			index,
15488c2ecf20Sopenharmony_ci			gspca_dev->usb_buf,
15498c2ecf20Sopenharmony_ci			len,
15508c2ecf20Sopenharmony_ci			500);
15518c2ecf20Sopenharmony_ci	if (ret < 0) {
15528c2ecf20Sopenharmony_ci		pr_err("reg_w err %d\n", ret);
15538c2ecf20Sopenharmony_ci		gspca_dev->usb_err = ret;
15548c2ecf20Sopenharmony_ci	}
15558c2ecf20Sopenharmony_ci}
15568c2ecf20Sopenharmony_ci
15578c2ecf20Sopenharmony_ci/* -- read registers in usb_buf -- */
15588c2ecf20Sopenharmony_cistatic void reg_r(struct gspca_dev *gspca_dev,
15598c2ecf20Sopenharmony_ci			u16 index,
15608c2ecf20Sopenharmony_ci			int len)
15618c2ecf20Sopenharmony_ci{
15628c2ecf20Sopenharmony_ci	struct usb_device *dev = gspca_dev->dev;
15638c2ecf20Sopenharmony_ci	int ret;
15648c2ecf20Sopenharmony_ci
15658c2ecf20Sopenharmony_ci	if (gspca_dev->usb_err < 0)
15668c2ecf20Sopenharmony_ci		return;
15678c2ecf20Sopenharmony_ci	ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
15688c2ecf20Sopenharmony_ci			0x00,
15698c2ecf20Sopenharmony_ci			USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
15708c2ecf20Sopenharmony_ci			0x00, index,
15718c2ecf20Sopenharmony_ci			gspca_dev->usb_buf, len, 500);
15728c2ecf20Sopenharmony_ci	if (ret < 0) {
15738c2ecf20Sopenharmony_ci		pr_err("reg_r err %d\n", ret);
15748c2ecf20Sopenharmony_ci		gspca_dev->usb_err = ret;
15758c2ecf20Sopenharmony_ci		/*
15768c2ecf20Sopenharmony_ci		 * Make sure the buffer is zeroed to avoid uninitialized
15778c2ecf20Sopenharmony_ci		 * values.
15788c2ecf20Sopenharmony_ci		 */
15798c2ecf20Sopenharmony_ci		memset(gspca_dev->usb_buf, 0, USB_BUF_SZ);
15808c2ecf20Sopenharmony_ci		return;
15818c2ecf20Sopenharmony_ci	}
15828c2ecf20Sopenharmony_ci	if (len == 1)
15838c2ecf20Sopenharmony_ci		gspca_dbg(gspca_dev, D_USBI, "GET 00 0000 %04x %02x\n",
15848c2ecf20Sopenharmony_ci			  index, gspca_dev->usb_buf[0]);
15858c2ecf20Sopenharmony_ci	else
15868c2ecf20Sopenharmony_ci		gspca_dbg(gspca_dev, D_USBI, "GET 00 0000 %04x %02x %02x ..\n",
15878c2ecf20Sopenharmony_ci			  index, gspca_dev->usb_buf[0],
15888c2ecf20Sopenharmony_ci			  gspca_dev->usb_buf[1]);
15898c2ecf20Sopenharmony_ci}
15908c2ecf20Sopenharmony_ci
15918c2ecf20Sopenharmony_cistatic void i2c_w(struct gspca_dev *gspca_dev,
15928c2ecf20Sopenharmony_ci			u8 i2c_addr,
15938c2ecf20Sopenharmony_ci			const u8 *data,
15948c2ecf20Sopenharmony_ci			int len)
15958c2ecf20Sopenharmony_ci{
15968c2ecf20Sopenharmony_ci	u8 val[2];
15978c2ecf20Sopenharmony_ci	int i;
15988c2ecf20Sopenharmony_ci
15998c2ecf20Sopenharmony_ci	reg_w(gspca_dev, 0x0600, data + 1, len - 1);
16008c2ecf20Sopenharmony_ci	reg_w(gspca_dev, 0x0600, data, len);
16018c2ecf20Sopenharmony_ci	val[0] = len;
16028c2ecf20Sopenharmony_ci	val[1] = i2c_addr;
16038c2ecf20Sopenharmony_ci	reg_w(gspca_dev, 0x0502, val, 2);
16048c2ecf20Sopenharmony_ci	val[0] = 0x01;
16058c2ecf20Sopenharmony_ci	reg_w(gspca_dev, 0x0501, val, 1);
16068c2ecf20Sopenharmony_ci	for (i = 5; --i >= 0; ) {
16078c2ecf20Sopenharmony_ci		msleep(4);
16088c2ecf20Sopenharmony_ci		reg_r(gspca_dev, 0x0505, 1);
16098c2ecf20Sopenharmony_ci		if (gspca_dev->usb_err < 0)
16108c2ecf20Sopenharmony_ci			return;
16118c2ecf20Sopenharmony_ci		if (gspca_dev->usb_buf[0] == 0)
16128c2ecf20Sopenharmony_ci			return;
16138c2ecf20Sopenharmony_ci	}
16148c2ecf20Sopenharmony_ci	gspca_dev->usb_err = -ETIME;
16158c2ecf20Sopenharmony_ci}
16168c2ecf20Sopenharmony_ci
16178c2ecf20Sopenharmony_cistatic void reg_w_buf(struct gspca_dev *gspca_dev,
16188c2ecf20Sopenharmony_ci			const u8 *cmd)
16198c2ecf20Sopenharmony_ci{
16208c2ecf20Sopenharmony_ci	u16 reg;
16218c2ecf20Sopenharmony_ci	int len;
16228c2ecf20Sopenharmony_ci
16238c2ecf20Sopenharmony_ci	for (;;) {
16248c2ecf20Sopenharmony_ci		reg = *cmd++ << 8;
16258c2ecf20Sopenharmony_ci		reg += *cmd++;
16268c2ecf20Sopenharmony_ci		len = *cmd++;
16278c2ecf20Sopenharmony_ci		if (len == 0)
16288c2ecf20Sopenharmony_ci			break;
16298c2ecf20Sopenharmony_ci		if (cmd[-3] != I2C0)
16308c2ecf20Sopenharmony_ci			reg_w(gspca_dev, reg, cmd, len);
16318c2ecf20Sopenharmony_ci		else
16328c2ecf20Sopenharmony_ci			i2c_w(gspca_dev, reg, cmd, len);
16338c2ecf20Sopenharmony_ci		cmd += len;
16348c2ecf20Sopenharmony_ci	}
16358c2ecf20Sopenharmony_ci}
16368c2ecf20Sopenharmony_ci
16378c2ecf20Sopenharmony_cistatic int swap_bits(int v)
16388c2ecf20Sopenharmony_ci{
16398c2ecf20Sopenharmony_ci	int r, i;
16408c2ecf20Sopenharmony_ci
16418c2ecf20Sopenharmony_ci	r = 0;
16428c2ecf20Sopenharmony_ci	for (i = 0; i < 8; i++) {
16438c2ecf20Sopenharmony_ci		r <<= 1;
16448c2ecf20Sopenharmony_ci		if (v & 1)
16458c2ecf20Sopenharmony_ci			r++;
16468c2ecf20Sopenharmony_ci		v >>= 1;
16478c2ecf20Sopenharmony_ci	}
16488c2ecf20Sopenharmony_ci	return r;
16498c2ecf20Sopenharmony_ci}
16508c2ecf20Sopenharmony_ci
16518c2ecf20Sopenharmony_cistatic void setgain(struct gspca_dev *gspca_dev, u8 val)
16528c2ecf20Sopenharmony_ci{
16538c2ecf20Sopenharmony_ci	struct sd *sd = (struct sd *) gspca_dev;
16548c2ecf20Sopenharmony_ci	u8 v[2];
16558c2ecf20Sopenharmony_ci
16568c2ecf20Sopenharmony_ci	switch (sd->webcam) {
16578c2ecf20Sopenharmony_ci	case P35u:
16588c2ecf20Sopenharmony_ci		reg_w(gspca_dev, 0x1026, &val, 1);
16598c2ecf20Sopenharmony_ci		break;
16608c2ecf20Sopenharmony_ci	case Kr651us:
16618c2ecf20Sopenharmony_ci		/* 0 - 253 */
16628c2ecf20Sopenharmony_ci		val = swap_bits(val);
16638c2ecf20Sopenharmony_ci		v[0] = val << 3;
16648c2ecf20Sopenharmony_ci		v[1] = val >> 5;
16658c2ecf20Sopenharmony_ci		reg_w(gspca_dev, 0x101d, v, 2);	/* SIF reg0/1 (AGC) */
16668c2ecf20Sopenharmony_ci		break;
16678c2ecf20Sopenharmony_ci	}
16688c2ecf20Sopenharmony_ci}
16698c2ecf20Sopenharmony_ci
16708c2ecf20Sopenharmony_cistatic void setexposure(struct gspca_dev *gspca_dev, s32 val)
16718c2ecf20Sopenharmony_ci{
16728c2ecf20Sopenharmony_ci	struct sd *sd = (struct sd *) gspca_dev;
16738c2ecf20Sopenharmony_ci	u8 v[2];
16748c2ecf20Sopenharmony_ci
16758c2ecf20Sopenharmony_ci	switch (sd->webcam) {
16768c2ecf20Sopenharmony_ci	case P35u:
16778c2ecf20Sopenharmony_ci		v[0] = ((9 - val) << 3) | 0x01;
16788c2ecf20Sopenharmony_ci		reg_w(gspca_dev, 0x1019, v, 1);
16798c2ecf20Sopenharmony_ci		break;
16808c2ecf20Sopenharmony_ci	case Cvideopro:
16818c2ecf20Sopenharmony_ci	case DvcV6:
16828c2ecf20Sopenharmony_ci	case Kritter:
16838c2ecf20Sopenharmony_ci	case Kr651us:
16848c2ecf20Sopenharmony_ci		v[0] = val;
16858c2ecf20Sopenharmony_ci		v[1] = val >> 8;
16868c2ecf20Sopenharmony_ci		reg_w(gspca_dev, 0x101b, v, 2);
16878c2ecf20Sopenharmony_ci		break;
16888c2ecf20Sopenharmony_ci	}
16898c2ecf20Sopenharmony_ci}
16908c2ecf20Sopenharmony_ci
16918c2ecf20Sopenharmony_cistatic void setautogain(struct gspca_dev *gspca_dev, s32 val)
16928c2ecf20Sopenharmony_ci{
16938c2ecf20Sopenharmony_ci	struct sd *sd = (struct sd *) gspca_dev;
16948c2ecf20Sopenharmony_ci	int w, h;
16958c2ecf20Sopenharmony_ci
16968c2ecf20Sopenharmony_ci	if (!val) {
16978c2ecf20Sopenharmony_ci		sd->ag_cnt = -1;
16988c2ecf20Sopenharmony_ci		return;
16998c2ecf20Sopenharmony_ci	}
17008c2ecf20Sopenharmony_ci	sd->ag_cnt = AG_CNT_START;
17018c2ecf20Sopenharmony_ci
17028c2ecf20Sopenharmony_ci	reg_r(gspca_dev, 0x1004, 1);
17038c2ecf20Sopenharmony_ci	if (gspca_dev->usb_buf[0] & 0x04) {	/* if AE_FULL_FRM */
17048c2ecf20Sopenharmony_ci		sd->ae_res = gspca_dev->pixfmt.width * gspca_dev->pixfmt.height;
17058c2ecf20Sopenharmony_ci	} else {				/* get the AE window size */
17068c2ecf20Sopenharmony_ci		reg_r(gspca_dev, 0x1011, 8);
17078c2ecf20Sopenharmony_ci		w = (gspca_dev->usb_buf[1] << 8) + gspca_dev->usb_buf[0]
17088c2ecf20Sopenharmony_ci		  - (gspca_dev->usb_buf[3] << 8) - gspca_dev->usb_buf[2];
17098c2ecf20Sopenharmony_ci		h = (gspca_dev->usb_buf[5] << 8) + gspca_dev->usb_buf[4]
17108c2ecf20Sopenharmony_ci		  - (gspca_dev->usb_buf[7] << 8) - gspca_dev->usb_buf[6];
17118c2ecf20Sopenharmony_ci		sd->ae_res = h * w;
17128c2ecf20Sopenharmony_ci		if (sd->ae_res == 0)
17138c2ecf20Sopenharmony_ci			sd->ae_res = gspca_dev->pixfmt.width *
17148c2ecf20Sopenharmony_ci					gspca_dev->pixfmt.height;
17158c2ecf20Sopenharmony_ci	}
17168c2ecf20Sopenharmony_ci}
17178c2ecf20Sopenharmony_ci
17188c2ecf20Sopenharmony_cistatic int nw802_test_reg(struct gspca_dev *gspca_dev,
17198c2ecf20Sopenharmony_ci			u16 index,
17208c2ecf20Sopenharmony_ci			u8 value)
17218c2ecf20Sopenharmony_ci{
17228c2ecf20Sopenharmony_ci	/* write the value */
17238c2ecf20Sopenharmony_ci	reg_w(gspca_dev, index, &value, 1);
17248c2ecf20Sopenharmony_ci
17258c2ecf20Sopenharmony_ci	/* read it */
17268c2ecf20Sopenharmony_ci	reg_r(gspca_dev, index, 1);
17278c2ecf20Sopenharmony_ci
17288c2ecf20Sopenharmony_ci	return gspca_dev->usb_buf[0] == value;
17298c2ecf20Sopenharmony_ci}
17308c2ecf20Sopenharmony_ci
17318c2ecf20Sopenharmony_ci/* this function is called at probe time */
17328c2ecf20Sopenharmony_cistatic int sd_config(struct gspca_dev *gspca_dev,
17338c2ecf20Sopenharmony_ci			const struct usb_device_id *id)
17348c2ecf20Sopenharmony_ci{
17358c2ecf20Sopenharmony_ci	struct sd *sd = (struct sd *) gspca_dev;
17368c2ecf20Sopenharmony_ci
17378c2ecf20Sopenharmony_ci	if ((unsigned) webcam >= NWEBCAMS)
17388c2ecf20Sopenharmony_ci		webcam = 0;
17398c2ecf20Sopenharmony_ci	sd->webcam = webcam;
17408c2ecf20Sopenharmony_ci	gspca_dev->cam.needs_full_bandwidth = 1;
17418c2ecf20Sopenharmony_ci	sd->ag_cnt = -1;
17428c2ecf20Sopenharmony_ci
17438c2ecf20Sopenharmony_ci	/*
17448c2ecf20Sopenharmony_ci	 * Autodetect sequence inspired from some log.
17458c2ecf20Sopenharmony_ci	 * We try to detect what registers exist or not.
17468c2ecf20Sopenharmony_ci	 * If 0x0500 does not exist => NW802
17478c2ecf20Sopenharmony_ci	 * If it does, test 0x109b. If it doesn't exist,
17488c2ecf20Sopenharmony_ci	 * then it's a NW801. Else, a NW800
17498c2ecf20Sopenharmony_ci	 * If a et31x110 (nw800 and 06a5:d800)
17508c2ecf20Sopenharmony_ci	 *	get the sensor ID
17518c2ecf20Sopenharmony_ci	 */
17528c2ecf20Sopenharmony_ci	if (!nw802_test_reg(gspca_dev, 0x0500, 0x55)) {
17538c2ecf20Sopenharmony_ci		sd->bridge = BRIDGE_NW802;
17548c2ecf20Sopenharmony_ci		if (sd->webcam == Generic800)
17558c2ecf20Sopenharmony_ci			sd->webcam = Generic802;
17568c2ecf20Sopenharmony_ci	} else if (!nw802_test_reg(gspca_dev, 0x109b, 0xaa)) {
17578c2ecf20Sopenharmony_ci		sd->bridge = BRIDGE_NW801;
17588c2ecf20Sopenharmony_ci		if (sd->webcam == Generic800)
17598c2ecf20Sopenharmony_ci			sd->webcam = P35u;
17608c2ecf20Sopenharmony_ci	} else if (id->idVendor == 0x06a5 && id->idProduct == 0xd800) {
17618c2ecf20Sopenharmony_ci		reg_r(gspca_dev, 0x0403, 1);		/* GPIO */
17628c2ecf20Sopenharmony_ci		gspca_dbg(gspca_dev, D_PROBE, "et31x110 sensor type %02x\n",
17638c2ecf20Sopenharmony_ci			  gspca_dev->usb_buf[0]);
17648c2ecf20Sopenharmony_ci		switch (gspca_dev->usb_buf[0] >> 1) {
17658c2ecf20Sopenharmony_ci		case 0x00:				/* ?? */
17668c2ecf20Sopenharmony_ci			if (sd->webcam == Generic800)
17678c2ecf20Sopenharmony_ci				sd->webcam = SpaceCam;
17688c2ecf20Sopenharmony_ci			break;
17698c2ecf20Sopenharmony_ci		case 0x01:				/* Hynix? */
17708c2ecf20Sopenharmony_ci			if (sd->webcam == Generic800)
17718c2ecf20Sopenharmony_ci				sd->webcam = Twinkle;
17728c2ecf20Sopenharmony_ci			break;
17738c2ecf20Sopenharmony_ci		case 0x0a:				/* Pixart */
17748c2ecf20Sopenharmony_ci			if (sd->webcam == Generic800)
17758c2ecf20Sopenharmony_ci				sd->webcam = SpaceCam2;
17768c2ecf20Sopenharmony_ci			break;
17778c2ecf20Sopenharmony_ci		}
17788c2ecf20Sopenharmony_ci	}
17798c2ecf20Sopenharmony_ci	if (webcam_chip[sd->webcam] != sd->bridge) {
17808c2ecf20Sopenharmony_ci		pr_err("Bad webcam type %d for NW80%d\n",
17818c2ecf20Sopenharmony_ci		       sd->webcam, sd->bridge);
17828c2ecf20Sopenharmony_ci		gspca_dev->usb_err = -ENODEV;
17838c2ecf20Sopenharmony_ci		return gspca_dev->usb_err;
17848c2ecf20Sopenharmony_ci	}
17858c2ecf20Sopenharmony_ci	gspca_dbg(gspca_dev, D_PROBE, "Bridge nw80%d - type: %d\n",
17868c2ecf20Sopenharmony_ci		  sd->bridge, sd->webcam);
17878c2ecf20Sopenharmony_ci
17888c2ecf20Sopenharmony_ci	if (sd->bridge == BRIDGE_NW800) {
17898c2ecf20Sopenharmony_ci		switch (sd->webcam) {
17908c2ecf20Sopenharmony_ci		case DS3303u:
17918c2ecf20Sopenharmony_ci			gspca_dev->cam.cam_mode = cif_mode;	/* qvga */
17928c2ecf20Sopenharmony_ci			break;
17938c2ecf20Sopenharmony_ci		default:
17948c2ecf20Sopenharmony_ci			gspca_dev->cam.cam_mode = &cif_mode[1];	/* cif */
17958c2ecf20Sopenharmony_ci			break;
17968c2ecf20Sopenharmony_ci		}
17978c2ecf20Sopenharmony_ci		gspca_dev->cam.nmodes = 1;
17988c2ecf20Sopenharmony_ci	} else {
17998c2ecf20Sopenharmony_ci		gspca_dev->cam.cam_mode = vga_mode;
18008c2ecf20Sopenharmony_ci		switch (sd->webcam) {
18018c2ecf20Sopenharmony_ci		case Kr651us:
18028c2ecf20Sopenharmony_ci		case Proscope:
18038c2ecf20Sopenharmony_ci		case P35u:
18048c2ecf20Sopenharmony_ci			gspca_dev->cam.nmodes = ARRAY_SIZE(vga_mode);
18058c2ecf20Sopenharmony_ci			break;
18068c2ecf20Sopenharmony_ci		default:
18078c2ecf20Sopenharmony_ci			gspca_dev->cam.nmodes = 1;	/* qvga only */
18088c2ecf20Sopenharmony_ci			break;
18098c2ecf20Sopenharmony_ci		}
18108c2ecf20Sopenharmony_ci	}
18118c2ecf20Sopenharmony_ci
18128c2ecf20Sopenharmony_ci	return gspca_dev->usb_err;
18138c2ecf20Sopenharmony_ci}
18148c2ecf20Sopenharmony_ci
18158c2ecf20Sopenharmony_ci/* this function is called at probe and resume time */
18168c2ecf20Sopenharmony_cistatic int sd_init(struct gspca_dev *gspca_dev)
18178c2ecf20Sopenharmony_ci{
18188c2ecf20Sopenharmony_ci	struct sd *sd = (struct sd *) gspca_dev;
18198c2ecf20Sopenharmony_ci
18208c2ecf20Sopenharmony_ci	switch (sd->bridge) {
18218c2ecf20Sopenharmony_ci	case BRIDGE_NW800:
18228c2ecf20Sopenharmony_ci		switch (sd->webcam) {
18238c2ecf20Sopenharmony_ci		case SpaceCam:
18248c2ecf20Sopenharmony_ci			reg_w_buf(gspca_dev, spacecam_init);
18258c2ecf20Sopenharmony_ci			break;
18268c2ecf20Sopenharmony_ci		default:
18278c2ecf20Sopenharmony_ci			reg_w_buf(gspca_dev, nw800_init);
18288c2ecf20Sopenharmony_ci			break;
18298c2ecf20Sopenharmony_ci		}
18308c2ecf20Sopenharmony_ci		break;
18318c2ecf20Sopenharmony_ci	default:
18328c2ecf20Sopenharmony_ci		switch (sd->webcam) {
18338c2ecf20Sopenharmony_ci		case Mustek300:
18348c2ecf20Sopenharmony_ci		case P35u:
18358c2ecf20Sopenharmony_ci		case Proscope:
18368c2ecf20Sopenharmony_ci			reg_w_buf(gspca_dev, proscope_init);
18378c2ecf20Sopenharmony_ci			break;
18388c2ecf20Sopenharmony_ci		}
18398c2ecf20Sopenharmony_ci		break;
18408c2ecf20Sopenharmony_ci	}
18418c2ecf20Sopenharmony_ci	return gspca_dev->usb_err;
18428c2ecf20Sopenharmony_ci}
18438c2ecf20Sopenharmony_ci
18448c2ecf20Sopenharmony_ci/* -- start the camera -- */
18458c2ecf20Sopenharmony_cistatic int sd_start(struct gspca_dev *gspca_dev)
18468c2ecf20Sopenharmony_ci{
18478c2ecf20Sopenharmony_ci	struct sd *sd = (struct sd *) gspca_dev;
18488c2ecf20Sopenharmony_ci	const u8 *cmd;
18498c2ecf20Sopenharmony_ci
18508c2ecf20Sopenharmony_ci	cmd = webcam_start[sd->webcam];
18518c2ecf20Sopenharmony_ci	reg_w_buf(gspca_dev, cmd);
18528c2ecf20Sopenharmony_ci	switch (sd->webcam) {
18538c2ecf20Sopenharmony_ci	case P35u:
18548c2ecf20Sopenharmony_ci		if (gspca_dev->pixfmt.width == 320)
18558c2ecf20Sopenharmony_ci			reg_w_buf(gspca_dev, nw801_start_qvga);
18568c2ecf20Sopenharmony_ci		else
18578c2ecf20Sopenharmony_ci			reg_w_buf(gspca_dev, nw801_start_vga);
18588c2ecf20Sopenharmony_ci		reg_w_buf(gspca_dev, nw801_start_2);
18598c2ecf20Sopenharmony_ci		break;
18608c2ecf20Sopenharmony_ci	case Kr651us:
18618c2ecf20Sopenharmony_ci		if (gspca_dev->pixfmt.width == 320)
18628c2ecf20Sopenharmony_ci			reg_w_buf(gspca_dev, kr651_start_qvga);
18638c2ecf20Sopenharmony_ci		else
18648c2ecf20Sopenharmony_ci			reg_w_buf(gspca_dev, kr651_start_vga);
18658c2ecf20Sopenharmony_ci		reg_w_buf(gspca_dev, kr651_start_2);
18668c2ecf20Sopenharmony_ci		break;
18678c2ecf20Sopenharmony_ci	case Proscope:
18688c2ecf20Sopenharmony_ci		if (gspca_dev->pixfmt.width == 320)
18698c2ecf20Sopenharmony_ci			reg_w_buf(gspca_dev, proscope_start_qvga);
18708c2ecf20Sopenharmony_ci		else
18718c2ecf20Sopenharmony_ci			reg_w_buf(gspca_dev, proscope_start_vga);
18728c2ecf20Sopenharmony_ci		reg_w_buf(gspca_dev, proscope_start_2);
18738c2ecf20Sopenharmony_ci		break;
18748c2ecf20Sopenharmony_ci	}
18758c2ecf20Sopenharmony_ci
18768c2ecf20Sopenharmony_ci	sd->exp_too_high_cnt = 0;
18778c2ecf20Sopenharmony_ci	sd->exp_too_low_cnt = 0;
18788c2ecf20Sopenharmony_ci	return gspca_dev->usb_err;
18798c2ecf20Sopenharmony_ci}
18808c2ecf20Sopenharmony_ci
18818c2ecf20Sopenharmony_cistatic void sd_stopN(struct gspca_dev *gspca_dev)
18828c2ecf20Sopenharmony_ci{
18838c2ecf20Sopenharmony_ci	struct sd *sd = (struct sd *) gspca_dev;
18848c2ecf20Sopenharmony_ci	u8 value;
18858c2ecf20Sopenharmony_ci
18868c2ecf20Sopenharmony_ci	/* 'go' off */
18878c2ecf20Sopenharmony_ci	if (sd->bridge != BRIDGE_NW801) {
18888c2ecf20Sopenharmony_ci		value = 0x02;
18898c2ecf20Sopenharmony_ci		reg_w(gspca_dev, 0x0406, &value, 1);
18908c2ecf20Sopenharmony_ci	}
18918c2ecf20Sopenharmony_ci
18928c2ecf20Sopenharmony_ci	/* LED off */
18938c2ecf20Sopenharmony_ci	switch (sd->webcam) {
18948c2ecf20Sopenharmony_ci	case Cvideopro:
18958c2ecf20Sopenharmony_ci	case Kr651us:
18968c2ecf20Sopenharmony_ci	case DvcV6:
18978c2ecf20Sopenharmony_ci	case Kritter:
18988c2ecf20Sopenharmony_ci		value = 0xff;
18998c2ecf20Sopenharmony_ci		break;
19008c2ecf20Sopenharmony_ci	case Dlink350c:
19018c2ecf20Sopenharmony_ci		value = 0x21;
19028c2ecf20Sopenharmony_ci		break;
19038c2ecf20Sopenharmony_ci	case SpaceCam:
19048c2ecf20Sopenharmony_ci	case SpaceCam2:
19058c2ecf20Sopenharmony_ci	case Proscope:
19068c2ecf20Sopenharmony_ci	case Twinkle:
19078c2ecf20Sopenharmony_ci		value = 0x01;
19088c2ecf20Sopenharmony_ci		break;
19098c2ecf20Sopenharmony_ci	default:
19108c2ecf20Sopenharmony_ci		return;
19118c2ecf20Sopenharmony_ci	}
19128c2ecf20Sopenharmony_ci	reg_w(gspca_dev, 0x0404, &value, 1);
19138c2ecf20Sopenharmony_ci}
19148c2ecf20Sopenharmony_ci
19158c2ecf20Sopenharmony_cistatic void sd_pkt_scan(struct gspca_dev *gspca_dev,
19168c2ecf20Sopenharmony_ci			u8 *data,			/* isoc packet */
19178c2ecf20Sopenharmony_ci			int len)			/* iso packet length */
19188c2ecf20Sopenharmony_ci{
19198c2ecf20Sopenharmony_ci	/*
19208c2ecf20Sopenharmony_ci	 * frame header = '00 00 hh ww ss xx ff ff'
19218c2ecf20Sopenharmony_ci	 * with:
19228c2ecf20Sopenharmony_ci	 *	- 'hh': height / 4
19238c2ecf20Sopenharmony_ci	 *	- 'ww': width / 4
19248c2ecf20Sopenharmony_ci	 *	- 'ss': frame sequence number c0..dd
19258c2ecf20Sopenharmony_ci	 */
19268c2ecf20Sopenharmony_ci	if (data[0] == 0x00 && data[1] == 0x00
19278c2ecf20Sopenharmony_ci	 && data[6] == 0xff && data[7] == 0xff) {
19288c2ecf20Sopenharmony_ci		gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0);
19298c2ecf20Sopenharmony_ci		gspca_frame_add(gspca_dev, FIRST_PACKET, data + 8, len - 8);
19308c2ecf20Sopenharmony_ci	} else {
19318c2ecf20Sopenharmony_ci		gspca_frame_add(gspca_dev, INTER_PACKET, data, len);
19328c2ecf20Sopenharmony_ci	}
19338c2ecf20Sopenharmony_ci}
19348c2ecf20Sopenharmony_ci
19358c2ecf20Sopenharmony_cistatic void do_autogain(struct gspca_dev *gspca_dev)
19368c2ecf20Sopenharmony_ci{
19378c2ecf20Sopenharmony_ci	struct sd *sd = (struct sd *) gspca_dev;
19388c2ecf20Sopenharmony_ci	int luma;
19398c2ecf20Sopenharmony_ci
19408c2ecf20Sopenharmony_ci	if (sd->ag_cnt < 0)
19418c2ecf20Sopenharmony_ci		return;
19428c2ecf20Sopenharmony_ci	if (--sd->ag_cnt >= 0)
19438c2ecf20Sopenharmony_ci		return;
19448c2ecf20Sopenharmony_ci	sd->ag_cnt = AG_CNT_START;
19458c2ecf20Sopenharmony_ci
19468c2ecf20Sopenharmony_ci	/* get the average luma */
19478c2ecf20Sopenharmony_ci	reg_r(gspca_dev, sd->bridge == BRIDGE_NW801 ? 0x080d : 0x080c, 4);
19488c2ecf20Sopenharmony_ci	luma = (gspca_dev->usb_buf[3] << 24) + (gspca_dev->usb_buf[2] << 16)
19498c2ecf20Sopenharmony_ci		+ (gspca_dev->usb_buf[1] << 8) + gspca_dev->usb_buf[0];
19508c2ecf20Sopenharmony_ci	luma /= sd->ae_res;
19518c2ecf20Sopenharmony_ci
19528c2ecf20Sopenharmony_ci	switch (sd->webcam) {
19538c2ecf20Sopenharmony_ci	case P35u:
19548c2ecf20Sopenharmony_ci		gspca_coarse_grained_expo_autogain(gspca_dev, luma, 100, 5);
19558c2ecf20Sopenharmony_ci		break;
19568c2ecf20Sopenharmony_ci	default:
19578c2ecf20Sopenharmony_ci		gspca_expo_autogain(gspca_dev, luma, 100, 5, 230, 0);
19588c2ecf20Sopenharmony_ci		break;
19598c2ecf20Sopenharmony_ci	}
19608c2ecf20Sopenharmony_ci}
19618c2ecf20Sopenharmony_ci
19628c2ecf20Sopenharmony_ci
19638c2ecf20Sopenharmony_cistatic int sd_s_ctrl(struct v4l2_ctrl *ctrl)
19648c2ecf20Sopenharmony_ci{
19658c2ecf20Sopenharmony_ci	struct gspca_dev *gspca_dev =
19668c2ecf20Sopenharmony_ci		container_of(ctrl->handler, struct gspca_dev, ctrl_handler);
19678c2ecf20Sopenharmony_ci
19688c2ecf20Sopenharmony_ci	gspca_dev->usb_err = 0;
19698c2ecf20Sopenharmony_ci
19708c2ecf20Sopenharmony_ci	if (!gspca_dev->streaming)
19718c2ecf20Sopenharmony_ci		return 0;
19728c2ecf20Sopenharmony_ci
19738c2ecf20Sopenharmony_ci	switch (ctrl->id) {
19748c2ecf20Sopenharmony_ci	/* autogain/gain/exposure control cluster */
19758c2ecf20Sopenharmony_ci	case V4L2_CID_AUTOGAIN:
19768c2ecf20Sopenharmony_ci		if (ctrl->is_new)
19778c2ecf20Sopenharmony_ci			setautogain(gspca_dev, ctrl->val);
19788c2ecf20Sopenharmony_ci		if (!ctrl->val) {
19798c2ecf20Sopenharmony_ci			if (gspca_dev->gain->is_new)
19808c2ecf20Sopenharmony_ci				setgain(gspca_dev, gspca_dev->gain->val);
19818c2ecf20Sopenharmony_ci			if (gspca_dev->exposure->is_new)
19828c2ecf20Sopenharmony_ci				setexposure(gspca_dev,
19838c2ecf20Sopenharmony_ci					    gspca_dev->exposure->val);
19848c2ecf20Sopenharmony_ci		}
19858c2ecf20Sopenharmony_ci		break;
19868c2ecf20Sopenharmony_ci	/* Some webcams only have exposure, so handle that separately from the
19878c2ecf20Sopenharmony_ci	   autogain/gain/exposure cluster in the previous case. */
19888c2ecf20Sopenharmony_ci	case V4L2_CID_EXPOSURE:
19898c2ecf20Sopenharmony_ci		setexposure(gspca_dev, gspca_dev->exposure->val);
19908c2ecf20Sopenharmony_ci		break;
19918c2ecf20Sopenharmony_ci	}
19928c2ecf20Sopenharmony_ci	return gspca_dev->usb_err;
19938c2ecf20Sopenharmony_ci}
19948c2ecf20Sopenharmony_ci
19958c2ecf20Sopenharmony_cistatic const struct v4l2_ctrl_ops sd_ctrl_ops = {
19968c2ecf20Sopenharmony_ci	.s_ctrl = sd_s_ctrl,
19978c2ecf20Sopenharmony_ci};
19988c2ecf20Sopenharmony_ci
19998c2ecf20Sopenharmony_cistatic int sd_init_controls(struct gspca_dev *gspca_dev)
20008c2ecf20Sopenharmony_ci{
20018c2ecf20Sopenharmony_ci	struct sd *sd = (struct sd *)gspca_dev;
20028c2ecf20Sopenharmony_ci	struct v4l2_ctrl_handler *hdl = &gspca_dev->ctrl_handler;
20038c2ecf20Sopenharmony_ci
20048c2ecf20Sopenharmony_ci	gspca_dev->vdev.ctrl_handler = hdl;
20058c2ecf20Sopenharmony_ci	v4l2_ctrl_handler_init(hdl, 3);
20068c2ecf20Sopenharmony_ci	switch (sd->webcam) {
20078c2ecf20Sopenharmony_ci	case P35u:
20088c2ecf20Sopenharmony_ci		gspca_dev->autogain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
20098c2ecf20Sopenharmony_ci			V4L2_CID_AUTOGAIN, 0, 1, 1, 1);
20108c2ecf20Sopenharmony_ci		/* For P35u choose coarse expo auto gain function gain minimum,
20118c2ecf20Sopenharmony_ci		 * to avoid a large settings jump the first auto adjustment */
20128c2ecf20Sopenharmony_ci		gspca_dev->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
20138c2ecf20Sopenharmony_ci			V4L2_CID_GAIN, 0, 127, 1, 127 / 5 * 2);
20148c2ecf20Sopenharmony_ci		gspca_dev->exposure = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
20158c2ecf20Sopenharmony_ci			V4L2_CID_EXPOSURE, 0, 9, 1, 9);
20168c2ecf20Sopenharmony_ci		break;
20178c2ecf20Sopenharmony_ci	case Kr651us:
20188c2ecf20Sopenharmony_ci		gspca_dev->autogain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
20198c2ecf20Sopenharmony_ci			V4L2_CID_AUTOGAIN, 0, 1, 1, 1);
20208c2ecf20Sopenharmony_ci		gspca_dev->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
20218c2ecf20Sopenharmony_ci			V4L2_CID_GAIN, 0, 253, 1, 128);
20228c2ecf20Sopenharmony_ci		fallthrough;
20238c2ecf20Sopenharmony_ci	case Cvideopro:
20248c2ecf20Sopenharmony_ci	case DvcV6:
20258c2ecf20Sopenharmony_ci	case Kritter:
20268c2ecf20Sopenharmony_ci		gspca_dev->exposure = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
20278c2ecf20Sopenharmony_ci			V4L2_CID_EXPOSURE, 0, 315, 1, 150);
20288c2ecf20Sopenharmony_ci		break;
20298c2ecf20Sopenharmony_ci	default:
20308c2ecf20Sopenharmony_ci		break;
20318c2ecf20Sopenharmony_ci	}
20328c2ecf20Sopenharmony_ci
20338c2ecf20Sopenharmony_ci	if (hdl->error) {
20348c2ecf20Sopenharmony_ci		pr_err("Could not initialize controls\n");
20358c2ecf20Sopenharmony_ci		return hdl->error;
20368c2ecf20Sopenharmony_ci	}
20378c2ecf20Sopenharmony_ci	if (gspca_dev->autogain)
20388c2ecf20Sopenharmony_ci		v4l2_ctrl_auto_cluster(3, &gspca_dev->autogain, 0, false);
20398c2ecf20Sopenharmony_ci	return 0;
20408c2ecf20Sopenharmony_ci}
20418c2ecf20Sopenharmony_ci
20428c2ecf20Sopenharmony_ci/* sub-driver description */
20438c2ecf20Sopenharmony_cistatic const struct sd_desc sd_desc = {
20448c2ecf20Sopenharmony_ci	.name = MODULE_NAME,
20458c2ecf20Sopenharmony_ci	.config = sd_config,
20468c2ecf20Sopenharmony_ci	.init = sd_init,
20478c2ecf20Sopenharmony_ci	.init_controls = sd_init_controls,
20488c2ecf20Sopenharmony_ci	.start = sd_start,
20498c2ecf20Sopenharmony_ci	.stopN = sd_stopN,
20508c2ecf20Sopenharmony_ci	.pkt_scan = sd_pkt_scan,
20518c2ecf20Sopenharmony_ci	.dq_callback = do_autogain,
20528c2ecf20Sopenharmony_ci};
20538c2ecf20Sopenharmony_ci
20548c2ecf20Sopenharmony_ci/* -- module initialisation -- */
20558c2ecf20Sopenharmony_cistatic const struct usb_device_id device_table[] = {
20568c2ecf20Sopenharmony_ci	{USB_DEVICE(0x046d, 0xd001)},
20578c2ecf20Sopenharmony_ci	{USB_DEVICE(0x0502, 0xd001)},
20588c2ecf20Sopenharmony_ci	{USB_DEVICE(0x052b, 0xd001)},
20598c2ecf20Sopenharmony_ci	{USB_DEVICE(0x055f, 0xd001)},
20608c2ecf20Sopenharmony_ci	{USB_DEVICE(0x06a5, 0x0000)},
20618c2ecf20Sopenharmony_ci	{USB_DEVICE(0x06a5, 0xd001)},
20628c2ecf20Sopenharmony_ci	{USB_DEVICE(0x06a5, 0xd800)},
20638c2ecf20Sopenharmony_ci	{USB_DEVICE(0x06be, 0xd001)},
20648c2ecf20Sopenharmony_ci	{USB_DEVICE(0x0728, 0xd001)},
20658c2ecf20Sopenharmony_ci	{}
20668c2ecf20Sopenharmony_ci};
20678c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(usb, device_table);
20688c2ecf20Sopenharmony_ci
20698c2ecf20Sopenharmony_ci/* -- device connect -- */
20708c2ecf20Sopenharmony_cistatic int sd_probe(struct usb_interface *intf,
20718c2ecf20Sopenharmony_ci			const struct usb_device_id *id)
20728c2ecf20Sopenharmony_ci{
20738c2ecf20Sopenharmony_ci	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
20748c2ecf20Sopenharmony_ci				THIS_MODULE);
20758c2ecf20Sopenharmony_ci}
20768c2ecf20Sopenharmony_ci
20778c2ecf20Sopenharmony_cistatic struct usb_driver sd_driver = {
20788c2ecf20Sopenharmony_ci	.name = MODULE_NAME,
20798c2ecf20Sopenharmony_ci	.id_table = device_table,
20808c2ecf20Sopenharmony_ci	.probe = sd_probe,
20818c2ecf20Sopenharmony_ci	.disconnect = gspca_disconnect,
20828c2ecf20Sopenharmony_ci#ifdef CONFIG_PM
20838c2ecf20Sopenharmony_ci	.suspend = gspca_suspend,
20848c2ecf20Sopenharmony_ci	.resume = gspca_resume,
20858c2ecf20Sopenharmony_ci	.reset_resume = gspca_resume,
20868c2ecf20Sopenharmony_ci#endif
20878c2ecf20Sopenharmony_ci};
20888c2ecf20Sopenharmony_ci
20898c2ecf20Sopenharmony_cimodule_usb_driver(sd_driver);
20908c2ecf20Sopenharmony_ci
20918c2ecf20Sopenharmony_cimodule_param(webcam, int, 0644);
20928c2ecf20Sopenharmony_ciMODULE_PARM_DESC(webcam,
20938c2ecf20Sopenharmony_ci	"Webcam type\n"
20948c2ecf20Sopenharmony_ci	"0: generic\n"
20958c2ecf20Sopenharmony_ci	"1: Trust 120 SpaceCam\n"
20968c2ecf20Sopenharmony_ci	"2: other Trust 120 SpaceCam\n"
20978c2ecf20Sopenharmony_ci	"3: Conceptronic Video Pro\n"
20988c2ecf20Sopenharmony_ci	"4: D-link dru-350c\n"
20998c2ecf20Sopenharmony_ci	"5: Plustek Opticam 500U\n"
21008c2ecf20Sopenharmony_ci	"6: Panasonic GP-KR651US\n"
21018c2ecf20Sopenharmony_ci	"7: iRez Kritter\n"
21028c2ecf20Sopenharmony_ci	"8: Mustek Wcam 300 mini\n"
21038c2ecf20Sopenharmony_ci	"9: Scalar USB Microscope M2 (Proscope)\n"
21048c2ecf20Sopenharmony_ci	"10: Divio Chicony TwinkleCam\n"
21058c2ecf20Sopenharmony_ci	"11: DVC-V6\n");
2106