18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Driver for the s5k83a sensor 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2008 Erik Andrén 68c2ecf20Sopenharmony_ci * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project. 78c2ecf20Sopenharmony_ci * Copyright (C) 2005 m5603x Linux Driver Project <m5602@x3ng.com.br> 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * Portions of code to USB interface and ALi driver software, 108c2ecf20Sopenharmony_ci * Copyright (c) 2006 Willem Duinker 118c2ecf20Sopenharmony_ci * v4l2 interface modeled after the V4L2 driver 128c2ecf20Sopenharmony_ci * for SN9C10x PC Camera Controllers 138c2ecf20Sopenharmony_ci */ 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#ifndef M5602_S5K83A_H_ 168c2ecf20Sopenharmony_ci#define M5602_S5K83A_H_ 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#include "m5602_sensor.h" 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#define S5K83A_FLIP 0x01 218c2ecf20Sopenharmony_ci#define S5K83A_HFLIP_TUNE 0x03 228c2ecf20Sopenharmony_ci#define S5K83A_VFLIP_TUNE 0x05 238c2ecf20Sopenharmony_ci#define S5K83A_BRIGHTNESS 0x0a 248c2ecf20Sopenharmony_ci#define S5K83A_EXPOSURE 0x18 258c2ecf20Sopenharmony_ci#define S5K83A_GAIN 0x1b 268c2ecf20Sopenharmony_ci#define S5K83A_PAGE_MAP 0xec 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci#define S5K83A_DEFAULT_GAIN 0x71 298c2ecf20Sopenharmony_ci#define S5K83A_DEFAULT_BRIGHTNESS 0x7e 308c2ecf20Sopenharmony_ci#define S5K83A_DEFAULT_EXPOSURE 0x00 318c2ecf20Sopenharmony_ci#define S5K83A_MAXIMUM_EXPOSURE 0x3c 328c2ecf20Sopenharmony_ci#define S5K83A_FLIP_MASK 0x10 338c2ecf20Sopenharmony_ci#define S5K83A_GPIO_LED_MASK 0x10 348c2ecf20Sopenharmony_ci#define S5K83A_GPIO_ROTATION_MASK 0x40 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci/*****************************************************************************/ 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci/* Kernel module parameters */ 398c2ecf20Sopenharmony_ciextern int force_sensor; 408c2ecf20Sopenharmony_ciextern bool dump_sensor; 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ciint s5k83a_probe(struct sd *sd); 438c2ecf20Sopenharmony_ciint s5k83a_init(struct sd *sd); 448c2ecf20Sopenharmony_ciint s5k83a_init_controls(struct sd *sd); 458c2ecf20Sopenharmony_ciint s5k83a_start(struct sd *sd); 468c2ecf20Sopenharmony_ciint s5k83a_stop(struct sd *sd); 478c2ecf20Sopenharmony_civoid s5k83a_disconnect(struct sd *sd); 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_cistatic const struct m5602_sensor s5k83a = { 508c2ecf20Sopenharmony_ci .name = "S5K83A", 518c2ecf20Sopenharmony_ci .probe = s5k83a_probe, 528c2ecf20Sopenharmony_ci .init = s5k83a_init, 538c2ecf20Sopenharmony_ci .init_controls = s5k83a_init_controls, 548c2ecf20Sopenharmony_ci .start = s5k83a_start, 558c2ecf20Sopenharmony_ci .stop = s5k83a_stop, 568c2ecf20Sopenharmony_ci .disconnect = s5k83a_disconnect, 578c2ecf20Sopenharmony_ci .i2c_slave_id = 0x5a, 588c2ecf20Sopenharmony_ci .i2c_regW = 2, 598c2ecf20Sopenharmony_ci}; 608c2ecf20Sopenharmony_ci#endif 61