/* * Shared Code for OmniVision Camera Chip Drivers * * Copyright (c) 2002 Mark McClelland * http://alpha.dyndns.org/ov511/ * * 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. */ /* This file is not a module yet */ #define __NO_VERSION__ #if defined(OUTSIDE_KERNEL) #if !defined(EXPORT_SYMTAB) #define EXPORT_SYMTAB #endif #include #if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS) #define MODVERSIONS #endif #include #ifdef MODVERSIONS #include #endif #else #include #include #endif #include "ov511.h" int ovsensor_write_regvals(struct usb_ov511 *ov, struct ovsensor_regvals *rvals) { int rc; while (rvals->reg != 0xff) { rc = ov->i2c->w(ov, rvals->reg, rvals->val); if (rc < 0) return rc; rvals++; } return 0; }