4 * Copyright (C) 2008 Renesas Solutions Corp.
5 * Kuninori Morimoto <morimoto.kuninori@renesas.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
15 #include <media/soc_camera.h>
18 #define OV772X_FLAG_VFLIP (1 << 0) /* Vertical flip image */
19 #define OV772X_FLAG_HFLIP (1 << 1) /* Horizontal flip image */
20 #define OV772X_FLAG_8BIT (1 << 2) /* default 10 bit */
25 * strength also control Auto or Manual Edge Control Mode
26 * see also OV772X_MANUAL_EDGE_CTRL
28 struct ov772x_edge_ctrl
{
29 unsigned char strength
;
30 unsigned char threshold
;
35 #define OV772X_MANUAL_EDGE_CTRL 0x80 /* un-used bit of strength */
36 #define EDGE_STRENGTH_MASK 0x1F
37 #define EDGE_THRESHOLD_MASK 0x0F
38 #define EDGE_UPPER_MASK 0xFF
39 #define EDGE_LOWER_MASK 0xFF
41 #define OV772X_AUTO_EDGECTRL(u, l) \
43 .upper = (u & EDGE_UPPER_MASK), \
44 .lower = (l & EDGE_LOWER_MASK), \
47 #define OV772X_MANUAL_EDGECTRL(s, t) \
49 .strength = (s & EDGE_STRENGTH_MASK) | OV772X_MANUAL_EDGE_CTRL,\
50 .threshold = (t & EDGE_THRESHOLD_MASK), \
56 struct ov772x_camera_info
{
58 struct ov772x_edge_ctrl edgectrl
;
61 #endif /* __OV772X_H__ */