1/* 2 * Driver for the s5k83a sensor 3 * 4 * Copyright (C) 2008 Erik Andrén 5 * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project. 6 * Copyright (C) 2005 m5603x Linux Driver Project <m5602@x3ng.com.br> 7 * 8 * Portions of code to USB interface and ALi driver software, 9 * Copyright (c) 2006 Willem Duinker 10 * v4l2 interface modeled after the V4L2 driver 11 * for SN9C10x PC Camera Controllers 12 * 13 * This program is free software; you can redistribute it and/or 14 * modify it under the terms of the GNU General Public License as 15 * published by the Free Software Foundation, version 2. 16 * 17 */ 18 19#ifndef M5602_S5K83A_H_ 20#define M5602_S5K83A_H_ 21 22#include "m5602_sensor.h" 23 24#define S5K83A_FLIP 0x01 25#define S5K83A_HFLIP_TUNE 0x03 26#define S5K83A_VFLIP_TUNE 0x05 27#define S5K83A_BRIGHTNESS 0x0a 28#define S5K83A_EXPOSURE 0x18 29#define S5K83A_GAIN 0x1b 30#define S5K83A_PAGE_MAP 0xec 31 32#define S5K83A_DEFAULT_GAIN 0x71 33#define S5K83A_DEFAULT_BRIGHTNESS 0x7e 34#define S5K83A_DEFAULT_EXPOSURE 0x00 35#define S5K83A_MAXIMUM_EXPOSURE 0x3c 36#define S5K83A_FLIP_MASK 0x10 37#define S5K83A_GPIO_LED_MASK 0x10 38#define S5K83A_GPIO_ROTATION_MASK 0x40 39 40/*****************************************************************************/ 41 42/* Kernel module parameters */ 43extern int force_sensor; 44extern bool dump_sensor; 45 46int s5k83a_probe(struct sd *sd); 47int s5k83a_init(struct sd *sd); 48int s5k83a_init_controls(struct sd *sd); 49int s5k83a_start(struct sd *sd); 50int s5k83a_stop(struct sd *sd); 51void s5k83a_disconnect(struct sd *sd); 52 53static const struct m5602_sensor s5k83a = { 54 .name = "S5K83A", 55 .probe = s5k83a_probe, 56 .init = s5k83a_init, 57 .init_controls = s5k83a_init_controls, 58 .start = s5k83a_start, 59 .stop = s5k83a_stop, 60 .disconnect = s5k83a_disconnect, 61 .i2c_slave_id = 0x5a, 62 .i2c_regW = 2, 63}; 64#endif 65