/*
* STV0680 USB Camera Driver, by Kevin Sisson (kjsisson@bellsouth.net)
*
* Thanks to STMicroelectronics for information on the usb commands, and
* to Steve Miller at STM for his help and encouragement while I was
* writing this driver.
*
* This driver is based heavily on the
* Endpoints (formerly known as AOX) se401 USB Camera Driver
* Copyright (c) 2000 Jeroen B. Vreeken (pe1rxq@amsat.org)
*
* Still somewhat based on the Linux ov511 driver.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* History:
* ver 0.1 October, 2001. Initial attempt.
*
* ver 0.2 November, 2001. Fixed asbility to resize, added brightness
* function, made more stable (?)
*
* ver 0.21 Nov, 2001. Added gamma correction and white balance,
* due to Alexander Schwartz. Still trying to
* improve stablility. Moved stuff into stv680.h
*
* ver 0.22 Nov, 2001. Added sharpen function (by Michael Sweet,
* mike@easysw.com) from GIMP, also used in pencam.
* Simple, fast, good integer math routine.
*
* ver 0.23 Dec, 2001 (gkh)
* Took out sharpen function, ran code through
* Lindent, and did other minor tweaks to get
* things to work properly with 2.5.1
*
* ver 0.24 Jan, 2002 (kjs)
* Fixed the problem with webcam crashing after
* two pictures. Changed the way pic is halved to
* improve quality. Got rid of green line around
* frame. Fix brightness reset when changing size
* bug. Adjusted gamma filters slightly.
*
* ver 0.25 Jan, 2002 (kjs)
* Fixed a bug in which the driver sometimes attempted
* to set to a non-supported size. This allowed
* gnomemeeting to work.
* Fixed proc entry removal bug.
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include