Lines Matching refs:hdcs

57 struct hdcs {  struct
104 struct hdcs *hdcs = sd->sensor_priv; in hdcs_set_state() local
108 if (hdcs->state == state) in hdcs_set_state()
112 if (hdcs->state != HDCS_STATE_IDLE) { in hdcs_set_state()
118 hdcs->state = HDCS_STATE_IDLE; in hdcs_set_state()
140 hdcs->state = state; in hdcs_set_state()
147 struct hdcs *hdcs = sd->sensor_priv; in hdcs_reset() local
156 hdcs->state = HDCS_STATE_IDLE; in hdcs_reset()
164 struct hdcs *hdcs = sd->sensor_priv; in hdcs_set_exposure() local
181 ct = hdcs->exp.cto + hdcs->psmp + (HDCS_ADC_START_SIG_DUR + 2); in hdcs_set_exposure()
182 cp = hdcs->exp.cto + (hdcs->w * ct / 2); in hdcs_set_exposure()
185 rp = hdcs->exp.rs + cp; in hdcs_set_exposure()
195 srowexp = hdcs->w - (cycles + hdcs->exp.er + 13) / ct; in hdcs_set_exposure()
197 mnct = (hdcs->exp.er + 12 + ct - 1) / ct; in hdcs_set_exposure()
198 max_srowexp = hdcs->w - mnct; in hdcs_set_exposure()
201 srowexp = cp - hdcs->exp.er - 6 - cycles; in hdcs_set_exposure()
203 mnct = (hdcs->exp.er + 5 + ct - 1) / ct; in hdcs_set_exposure()
278 struct hdcs *hdcs = sd->sensor_priv; in hdcs_set_size() local
287 if (width > hdcs->array.width) in hdcs_set_size()
288 width = hdcs->array.width; in hdcs_set_size()
292 if (height + 2 * hdcs->array.border + HDCS_1020_BOTTOM_Y_SKIP in hdcs_set_size()
293 > hdcs->array.height) in hdcs_set_size()
294 height = hdcs->array.height - 2 * hdcs->array.border - in hdcs_set_size()
297 y = (hdcs->array.height - HDCS_1020_BOTTOM_Y_SKIP - height) / 2 in hdcs_set_size()
298 + hdcs->array.top; in hdcs_set_size()
300 if (height > hdcs->array.height) in hdcs_set_size()
301 height = hdcs->array.height; in hdcs_set_size()
303 y = hdcs->array.top + (hdcs->array.height - height) / 2; in hdcs_set_size()
306 x = hdcs->array.left + (hdcs->array.width - width) / 2; in hdcs_set_size()
318 hdcs->w = width; in hdcs_set_size()
319 hdcs->h = height; in hdcs_set_size()
358 struct hdcs *hdcs; in hdcs_probe_1x00() local
371 hdcs = kmalloc(sizeof(struct hdcs), GFP_KERNEL); in hdcs_probe_1x00()
372 if (!hdcs) in hdcs_probe_1x00()
375 hdcs->array.left = 8; in hdcs_probe_1x00()
376 hdcs->array.top = 8; in hdcs_probe_1x00()
377 hdcs->array.width = HDCS_1X00_DEF_WIDTH; in hdcs_probe_1x00()
378 hdcs->array.height = HDCS_1X00_DEF_HEIGHT; in hdcs_probe_1x00()
379 hdcs->array.border = 4; in hdcs_probe_1x00()
381 hdcs->exp.cto = 4; in hdcs_probe_1x00()
382 hdcs->exp.cpo = 2; in hdcs_probe_1x00()
383 hdcs->exp.rs = 186; in hdcs_probe_1x00()
384 hdcs->exp.er = 100; in hdcs_probe_1x00()
406 hdcs->psmp = (sd->bridge == BRIDGE_STV602) ? 20 : 5; in hdcs_probe_1x00()
408 sd->sensor_priv = hdcs; in hdcs_probe_1x00()
415 struct hdcs *hdcs; in hdcs_probe_1020() local
428 hdcs = kmalloc(sizeof(struct hdcs), GFP_KERNEL); in hdcs_probe_1020()
429 if (!hdcs) in hdcs_probe_1020()
437 hdcs->array.left = 24; in hdcs_probe_1020()
438 hdcs->array.top = 4; in hdcs_probe_1020()
439 hdcs->array.width = HDCS_1020_DEF_WIDTH; in hdcs_probe_1020()
440 hdcs->array.height = 304; in hdcs_probe_1020()
441 hdcs->array.border = 4; in hdcs_probe_1020()
443 hdcs->psmp = 6; in hdcs_probe_1020()
445 hdcs->exp.cto = 3; in hdcs_probe_1020()
446 hdcs->exp.cpo = 3; in hdcs_probe_1020()
447 hdcs->exp.rs = 155; in hdcs_probe_1020()
448 hdcs->exp.er = 96; in hdcs_probe_1020()
450 sd->sensor_priv = hdcs; in hdcs_probe_1020()
475 struct hdcs *hdcs = sd->sensor_priv; in hdcs_init() local
510 (HDCS_ADC_START_SIG_DUR << 6) | hdcs->psmp); in hdcs_init()
513 (HDCS_ADC_START_SIG_DUR << 5) | hdcs->psmp); in hdcs_init()
517 return hdcs_set_size(sd, hdcs->array.width, hdcs->array.height); in hdcs_init()