2008-10-24 18:43:07 +00:00
|
|
|
/* ov772x Camera
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008 Renesas Solutions Corp.
|
|
|
|
* Kuninori Morimoto <morimoto.kuninori@renesas.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __OV772X_H__
|
|
|
|
#define __OV772X_H__
|
|
|
|
|
|
|
|
#include <media/soc_camera.h>
|
|
|
|
|
2009-02-23 15:12:58 +00:00
|
|
|
/* for flags */
|
|
|
|
#define OV772X_FLAG_VFLIP 0x00000001 /* Vertical flip image */
|
|
|
|
#define OV772X_FLAG_HFLIP 0x00000002 /* Horizontal flip image */
|
|
|
|
|
2009-03-31 06:44:22 +00: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;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define OV772X_MANUAL_EDGE_CTRL 0x80 /* un-used bit of strength */
|
|
|
|
#define EDGE_STRENGTH_MASK 0x1F
|
|
|
|
#define EDGE_THRESHOLD_MASK 0x0F
|
|
|
|
#define EDGE_UPPER_MASK 0xFF
|
|
|
|
#define EDGE_LOWER_MASK 0xFF
|
|
|
|
|
|
|
|
#define OV772X_AUTO_EDGECTRL(u, l) \
|
|
|
|
{ \
|
|
|
|
.upper = (u & EDGE_UPPER_MASK), \
|
|
|
|
.lower = (l & EDGE_LOWER_MASK), \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define OV772X_MANUAL_EDGECTRL(s, t) \
|
|
|
|
{ \
|
|
|
|
.strength = (s & EDGE_STRENGTH_MASK) | OV772X_MANUAL_EDGE_CTRL,\
|
|
|
|
.threshold = (t & EDGE_THRESHOLD_MASK), \
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* ov772x camera info
|
|
|
|
*/
|
2008-10-24 18:43:07 +00:00
|
|
|
struct ov772x_camera_info {
|
|
|
|
unsigned long buswidth;
|
2009-02-23 15:12:58 +00:00
|
|
|
unsigned long flags;
|
2008-10-24 18:43:07 +00:00
|
|
|
struct soc_camera_link link;
|
2009-03-31 06:44:22 +00:00
|
|
|
struct ov772x_edge_ctrl edgectrl;
|
2008-10-24 18:43:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __OV772X_H__ */
|