hdcs
struct hdcs *hdcs = sd->sensor_priv;
if (hdcs->state == state)
if (hdcs->state != HDCS_STATE_IDLE) {
hdcs->state = HDCS_STATE_IDLE;
hdcs->state = state;
struct hdcs *hdcs = sd->sensor_priv;
hdcs->state = HDCS_STATE_IDLE;
struct hdcs *hdcs = sd->sensor_priv;
ct = hdcs->exp.cto + hdcs->psmp + (HDCS_ADC_START_SIG_DUR + 2);
cp = hdcs->exp.cto + (hdcs->w * ct / 2);
rp = hdcs->exp.rs + cp;
srowexp = hdcs->w - (cycles + hdcs->exp.er + 13) / ct;
mnct = (hdcs->exp.er + 12 + ct - 1) / ct;
max_srowexp = hdcs->w - mnct;
srowexp = cp - hdcs->exp.er - 6 - cycles;
mnct = (hdcs->exp.er + 5 + ct - 1) / ct;
struct hdcs *hdcs = sd->sensor_priv;
if (width > hdcs->array.width)
width = hdcs->array.width;
if (height + 2 * hdcs->array.border + HDCS_1020_BOTTOM_Y_SKIP
> hdcs->array.height)
height = hdcs->array.height - 2 * hdcs->array.border -
y = (hdcs->array.height - HDCS_1020_BOTTOM_Y_SKIP - height) / 2
+ hdcs->array.top;
if (height > hdcs->array.height)
height = hdcs->array.height;
y = hdcs->array.top + (hdcs->array.height - height) / 2;
x = hdcs->array.left + (hdcs->array.width - width) / 2;
hdcs->w = width;
hdcs->h = height;
struct hdcs *hdcs;
hdcs = kmalloc_obj(struct hdcs);
if (!hdcs)
hdcs->array.left = 8;
hdcs->array.top = 8;
hdcs->array.width = HDCS_1X00_DEF_WIDTH;
hdcs->array.height = HDCS_1X00_DEF_HEIGHT;
hdcs->array.border = 4;
hdcs->exp.cto = 4;
hdcs->exp.cpo = 2;
hdcs->exp.rs = 186;
hdcs->exp.er = 100;
hdcs->psmp = (sd->bridge == BRIDGE_STV602) ? 20 : 5;
sd->sensor_priv = hdcs;
struct hdcs *hdcs;
hdcs = kmalloc_obj(struct hdcs);
if (!hdcs)
hdcs->array.left = 24;
hdcs->array.top = 4;
hdcs->array.width = HDCS_1020_DEF_WIDTH;
hdcs->array.height = 304;
hdcs->array.border = 4;
hdcs->psmp = 6;
hdcs->exp.cto = 3;
hdcs->exp.cpo = 3;
hdcs->exp.rs = 155;
hdcs->exp.er = 96;
sd->sensor_priv = hdcs;
struct hdcs *hdcs = sd->sensor_priv;
(HDCS_ADC_START_SIG_DUR << 6) | hdcs->psmp);
(HDCS_ADC_START_SIG_DUR << 5) | hdcs->psmp);
return hdcs_set_size(sd, hdcs->array.width, hdcs->array.height);