162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * GSPCA Endpoints (formerly known as AOX) se401 USB Camera sub Driver 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 2011 Hans de Goede <hdegoede@redhat.com> 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * Based on the v4l1 se401 driver which is: 862306a36Sopenharmony_ci * 962306a36Sopenharmony_ci * Copyright (c) 2000 Jeroen B. Vreeken (pe1rxq@amsat.org) 1062306a36Sopenharmony_ci */ 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#define SE401_REQ_GET_CAMERA_DESCRIPTOR 0x06 1362306a36Sopenharmony_ci#define SE401_REQ_START_CONTINUOUS_CAPTURE 0x41 1462306a36Sopenharmony_ci#define SE401_REQ_STOP_CONTINUOUS_CAPTURE 0x42 1562306a36Sopenharmony_ci#define SE401_REQ_CAPTURE_FRAME 0x43 1662306a36Sopenharmony_ci#define SE401_REQ_GET_BRT 0x44 1762306a36Sopenharmony_ci#define SE401_REQ_SET_BRT 0x45 1862306a36Sopenharmony_ci#define SE401_REQ_GET_WIDTH 0x4c 1962306a36Sopenharmony_ci#define SE401_REQ_SET_WIDTH 0x4d 2062306a36Sopenharmony_ci#define SE401_REQ_GET_HEIGHT 0x4e 2162306a36Sopenharmony_ci#define SE401_REQ_SET_HEIGHT 0x4f 2262306a36Sopenharmony_ci#define SE401_REQ_GET_OUTPUT_MODE 0x50 2362306a36Sopenharmony_ci#define SE401_REQ_SET_OUTPUT_MODE 0x51 2462306a36Sopenharmony_ci#define SE401_REQ_GET_EXT_FEATURE 0x52 2562306a36Sopenharmony_ci#define SE401_REQ_SET_EXT_FEATURE 0x53 2662306a36Sopenharmony_ci#define SE401_REQ_CAMERA_POWER 0x56 2762306a36Sopenharmony_ci#define SE401_REQ_LED_CONTROL 0x57 2862306a36Sopenharmony_ci#define SE401_REQ_BIOS 0xff 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci#define SE401_BIOS_READ 0x07 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci#define SE401_FORMAT_BAYER 0x40 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci/* Hyundai hv7131b registers 3562306a36Sopenharmony_ci 7121 and 7141 should be the same (haven't really checked...) */ 3662306a36Sopenharmony_ci/* Mode registers: */ 3762306a36Sopenharmony_ci#define HV7131_REG_MODE_A 0x00 3862306a36Sopenharmony_ci#define HV7131_REG_MODE_B 0x01 3962306a36Sopenharmony_ci#define HV7131_REG_MODE_C 0x02 4062306a36Sopenharmony_ci/* Frame registers: */ 4162306a36Sopenharmony_ci#define HV7131_REG_FRSU 0x10 4262306a36Sopenharmony_ci#define HV7131_REG_FRSL 0x11 4362306a36Sopenharmony_ci#define HV7131_REG_FCSU 0x12 4462306a36Sopenharmony_ci#define HV7131_REG_FCSL 0x13 4562306a36Sopenharmony_ci#define HV7131_REG_FWHU 0x14 4662306a36Sopenharmony_ci#define HV7131_REG_FWHL 0x15 4762306a36Sopenharmony_ci#define HV7131_REG_FWWU 0x16 4862306a36Sopenharmony_ci#define HV7131_REG_FWWL 0x17 4962306a36Sopenharmony_ci/* Timing registers: */ 5062306a36Sopenharmony_ci#define HV7131_REG_THBU 0x20 5162306a36Sopenharmony_ci#define HV7131_REG_THBL 0x21 5262306a36Sopenharmony_ci#define HV7131_REG_TVBU 0x22 5362306a36Sopenharmony_ci#define HV7131_REG_TVBL 0x23 5462306a36Sopenharmony_ci#define HV7131_REG_TITU 0x25 5562306a36Sopenharmony_ci#define HV7131_REG_TITM 0x26 5662306a36Sopenharmony_ci#define HV7131_REG_TITL 0x27 5762306a36Sopenharmony_ci#define HV7131_REG_TMCD 0x28 5862306a36Sopenharmony_ci/* Adjust Registers: */ 5962306a36Sopenharmony_ci#define HV7131_REG_ARLV 0x30 6062306a36Sopenharmony_ci#define HV7131_REG_ARCG 0x31 6162306a36Sopenharmony_ci#define HV7131_REG_AGCG 0x32 6262306a36Sopenharmony_ci#define HV7131_REG_ABCG 0x33 6362306a36Sopenharmony_ci#define HV7131_REG_APBV 0x34 6462306a36Sopenharmony_ci#define HV7131_REG_ASLP 0x54 6562306a36Sopenharmony_ci/* Offset Registers: */ 6662306a36Sopenharmony_ci#define HV7131_REG_OFSR 0x50 6762306a36Sopenharmony_ci#define HV7131_REG_OFSG 0x51 6862306a36Sopenharmony_ci#define HV7131_REG_OFSB 0x52 6962306a36Sopenharmony_ci/* REset level statistics registers: */ 7062306a36Sopenharmony_ci#define HV7131_REG_LOREFNOH 0x57 7162306a36Sopenharmony_ci#define HV7131_REG_LOREFNOL 0x58 7262306a36Sopenharmony_ci#define HV7131_REG_HIREFNOH 0x59 7362306a36Sopenharmony_ci#define HV7131_REG_HIREFNOL 0x5a 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci/* se401 registers */ 7662306a36Sopenharmony_ci#define SE401_OPERATINGMODE 0x2000 77