2019-06-04 11:11:33 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2009-12-11 17:15:05 +03:00
|
|
|
/*
|
|
|
|
* ov772x Camera
|
2008-10-24 22:43:07 +04:00
|
|
|
*
|
|
|
|
* Copyright (C) 2008 Renesas Solutions Corp.
|
|
|
|
* Kuninori Morimoto <morimoto.kuninori@renesas.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __OV772X_H__
|
|
|
|
#define __OV772X_H__
|
|
|
|
|
2009-02-23 18:12:58 +03:00
|
|
|
/* for flags */
|
2010-01-06 12:42:16 +03:00
|
|
|
#define OV772X_FLAG_VFLIP (1 << 0) /* Vertical flip image */
|
|
|
|
#define OV772X_FLAG_HFLIP (1 << 1) /* Horizontal flip image */
|
2009-02-23 18:12:58 +03:00
|
|
|
|
2009-03-31 10:44:22 +04:00
|
|
|
/*
|
|
|
|
* for Edge ctrl
|
|
|
|
*
|
|
|
|
* strength also control Auto or Manual Edge Control Mode
|
|
|
|
* see also OV772X_MANUAL_EDGE_CTRL
|
|
|
|
*/
|
|
|
|
struct ov772x_edge_ctrl {
|
|
|
|
unsigned char strength;
|
|
|
|
unsigned char threshold;
|
|
|
|
unsigned char upper;
|
|
|
|
unsigned char lower;
|
|
|
|
};
|
|
|
|
|
2011-07-26 19:20:42 +04:00
|
|
|
#define OV772X_MANUAL_EDGE_CTRL 0x80 /* un-used bit of strength */
|
|
|
|
#define OV772X_EDGE_STRENGTH_MASK 0x1F
|
|
|
|
#define OV772X_EDGE_THRESHOLD_MASK 0x0F
|
|
|
|
#define OV772X_EDGE_UPPER_MASK 0xFF
|
|
|
|
#define OV772X_EDGE_LOWER_MASK 0xFF
|
2009-03-31 10:44:22 +04:00
|
|
|
|
|
|
|
#define OV772X_AUTO_EDGECTRL(u, l) \
|
|
|
|
{ \
|
2011-07-26 19:20:42 +04:00
|
|
|
.upper = (u & OV772X_EDGE_UPPER_MASK), \
|
|
|
|
.lower = (l & OV772X_EDGE_LOWER_MASK), \
|
2009-03-31 10:44:22 +04:00
|
|
|
}
|
|
|
|
|
2011-07-26 19:20:42 +04:00
|
|
|
#define OV772X_MANUAL_EDGECTRL(s, t) \
|
|
|
|
{ \
|
|
|
|
.strength = (s & OV772X_EDGE_STRENGTH_MASK) | \
|
|
|
|
OV772X_MANUAL_EDGE_CTRL, \
|
|
|
|
.threshold = (t & OV772X_EDGE_THRESHOLD_MASK), \
|
2009-03-31 10:44:22 +04:00
|
|
|
}
|
|
|
|
|
2018-02-21 20:48:00 +03:00
|
|
|
/**
|
|
|
|
* ov772x_camera_info - ov772x driver interface structure
|
|
|
|
* @flags: Sensor configuration flags
|
|
|
|
* @edgectrl: Sensor edge control
|
2009-03-31 10:44:22 +04:00
|
|
|
*/
|
2008-10-24 22:43:07 +04:00
|
|
|
struct ov772x_camera_info {
|
2010-01-06 12:42:16 +03:00
|
|
|
unsigned long flags;
|
|
|
|
struct ov772x_edge_ctrl edgectrl;
|
2008-10-24 22:43:07 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __OV772X_H__ */
|