Lines Matching refs:hdcs

66 struct hdcs {  struct
113 struct hdcs *hdcs = sd->sensor_priv; in hdcs_set_state() local
117 if (hdcs->state == state) in hdcs_set_state()
121 if (hdcs->state != HDCS_STATE_IDLE) { in hdcs_set_state()
127 hdcs->state = HDCS_STATE_IDLE; in hdcs_set_state()
149 hdcs->state = state; in hdcs_set_state()
156 struct hdcs *hdcs = sd->sensor_priv; in hdcs_reset() local
165 hdcs->state = HDCS_STATE_IDLE; in hdcs_reset()
173 struct hdcs *hdcs = sd->sensor_priv; in hdcs_set_exposure() local
190 ct = hdcs->exp.cto + hdcs->psmp + (HDCS_ADC_START_SIG_DUR + 2); in hdcs_set_exposure()
191 cp = hdcs->exp.cto + (hdcs->w * ct / 2); in hdcs_set_exposure()
194 rp = hdcs->exp.rs + cp; in hdcs_set_exposure()
204 srowexp = hdcs->w - (cycles + hdcs->exp.er + 13) / ct; in hdcs_set_exposure()
206 mnct = (hdcs->exp.er + 12 + ct - 1) / ct; in hdcs_set_exposure()
207 max_srowexp = hdcs->w - mnct; in hdcs_set_exposure()
210 srowexp = cp - hdcs->exp.er - 6 - cycles; in hdcs_set_exposure()
212 mnct = (hdcs->exp.er + 5 + ct - 1) / ct; in hdcs_set_exposure()
287 struct hdcs *hdcs = sd->sensor_priv; in hdcs_set_size() local
296 if (width > hdcs->array.width) in hdcs_set_size()
297 width = hdcs->array.width; in hdcs_set_size()
301 if (height + 2 * hdcs->array.border + HDCS_1020_BOTTOM_Y_SKIP in hdcs_set_size()
302 > hdcs->array.height) in hdcs_set_size()
303 height = hdcs->array.height - 2 * hdcs->array.border - in hdcs_set_size()
306 y = (hdcs->array.height - HDCS_1020_BOTTOM_Y_SKIP - height) / 2 in hdcs_set_size()
307 + hdcs->array.top; in hdcs_set_size()
309 if (height > hdcs->array.height) in hdcs_set_size()
310 height = hdcs->array.height; in hdcs_set_size()
312 y = hdcs->array.top + (hdcs->array.height - height) / 2; in hdcs_set_size()
315 x = hdcs->array.left + (hdcs->array.width - width) / 2; in hdcs_set_size()
327 hdcs->w = width; in hdcs_set_size()
328 hdcs->h = height; in hdcs_set_size()
367 struct hdcs *hdcs; in hdcs_probe_1x00() local
380 hdcs = kmalloc(sizeof(struct hdcs), GFP_KERNEL); in hdcs_probe_1x00()
381 if (!hdcs) in hdcs_probe_1x00()
384 hdcs->array.left = 8; in hdcs_probe_1x00()
385 hdcs->array.top = 8; in hdcs_probe_1x00()
386 hdcs->array.width = HDCS_1X00_DEF_WIDTH; in hdcs_probe_1x00()
387 hdcs->array.height = HDCS_1X00_DEF_HEIGHT; in hdcs_probe_1x00()
388 hdcs->array.border = 4; in hdcs_probe_1x00()
390 hdcs->exp.cto = 4; in hdcs_probe_1x00()
391 hdcs->exp.cpo = 2; in hdcs_probe_1x00()
392 hdcs->exp.rs = 186; in hdcs_probe_1x00()
393 hdcs->exp.er = 100; in hdcs_probe_1x00()
415 hdcs->psmp = (sd->bridge == BRIDGE_STV602) ? 20 : 5; in hdcs_probe_1x00()
417 sd->sensor_priv = hdcs; in hdcs_probe_1x00()
424 struct hdcs *hdcs; in hdcs_probe_1020() local
437 hdcs = kmalloc(sizeof(struct hdcs), GFP_KERNEL); in hdcs_probe_1020()
438 if (!hdcs) in hdcs_probe_1020()
446 hdcs->array.left = 24; in hdcs_probe_1020()
447 hdcs->array.top = 4; in hdcs_probe_1020()
448 hdcs->array.width = HDCS_1020_DEF_WIDTH; in hdcs_probe_1020()
449 hdcs->array.height = 304; in hdcs_probe_1020()
450 hdcs->array.border = 4; in hdcs_probe_1020()
452 hdcs->psmp = 6; in hdcs_probe_1020()
454 hdcs->exp.cto = 3; in hdcs_probe_1020()
455 hdcs->exp.cpo = 3; in hdcs_probe_1020()
456 hdcs->exp.rs = 155; in hdcs_probe_1020()
457 hdcs->exp.er = 96; in hdcs_probe_1020()
459 sd->sensor_priv = hdcs; in hdcs_probe_1020()
484 struct hdcs *hdcs = sd->sensor_priv; in hdcs_init() local
519 (HDCS_ADC_START_SIG_DUR << 6) | hdcs->psmp); in hdcs_init()
522 (HDCS_ADC_START_SIG_DUR << 5) | hdcs->psmp); in hdcs_init()
526 return hdcs_set_size(sd, hdcs->array.width, hdcs->array.height); in hdcs_init()