1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * Copyright (C) 2008 Nokia Corporation
7 * Contact: Sakari Ailus <sakari.ailus@iki.fi>
8 * Tuukka Toivonen <tuukkat76@gmail.com>
14 #include <linux/i2c.h>
15 #include <linux/types.h>
16 #include <linux/videodev2.h>
17 #include <linux/v4l2-subdev.h>
19 struct v4l2_mbus_framefmt
;
20 struct v4l2_subdev_pad_mbus_code_enum
;
23 /* Physical sensor resolution and current image window */
26 u16 sensor_window_origin_x
;
27 u16 sensor_window_origin_y
;
28 u16 sensor_window_width
;
29 u16 sensor_window_height
;
31 /* Image data coming from sensor (after scaling) */
39 u32 pixel_clock
; /* in Hz */
40 u32 ext_clock
; /* in Hz */
41 struct v4l2_fract timeperframe
;
42 u32 max_exp
; /* Maximum exposure value */
43 u32 bus_format
; /* MEDIA_BUS_FMT_ */
44 u32 sensitivity
; /* 16.16 fixed point */
47 #define ET8EK8_REG_8BIT 1
48 #define ET8EK8_REG_16BIT 2
49 #define ET8EK8_REG_DELAY 100
50 #define ET8EK8_REG_TERM 0xff
53 u16 reg
; /* 16-bit offset */
54 u32 val
; /* 8/16/32-bit value */
57 /* Possible struct smia_reglist types. */
58 #define ET8EK8_REGLIST_STANDBY 0
59 #define ET8EK8_REGLIST_POWERON 1
60 #define ET8EK8_REGLIST_RESUME 2
61 #define ET8EK8_REGLIST_STREAMON 3
62 #define ET8EK8_REGLIST_STREAMOFF 4
63 #define ET8EK8_REGLIST_DISABLED 5
65 #define ET8EK8_REGLIST_MODE 10
67 #define ET8EK8_REGLIST_LSC_ENABLE 100
68 #define ET8EK8_REGLIST_LSC_DISABLE 101
69 #define ET8EK8_REGLIST_ANR_ENABLE 102
70 #define ET8EK8_REGLIST_ANR_DISABLE 103
72 struct et8ek8_reglist
{
74 struct et8ek8_mode mode
;
75 struct et8ek8_reg regs
[];
78 #define ET8EK8_MAX_LEN 32
79 struct et8ek8_meta_reglist
{
80 char version
[ET8EK8_MAX_LEN
];
82 struct et8ek8_reglist
*ptr
;
86 extern struct et8ek8_meta_reglist meta_reglist
;
88 #endif /* ET8EK8REGS */