Lines Matching refs:dac
519 unsigned int dac, position, range; in dw9714_get_pos() local
523 ret = dw9714_get_dac(dev_vcm, &dac); in dw9714_get_pos()
525 if (dac <= dev_vcm->start_current) { in dw9714_get_pos()
527 } else if ((dac > dev_vcm->start_current) && in dw9714_get_pos()
528 (dac <= dev_vcm->rated_current)) { in dw9714_get_pos()
529 position = (dac - dev_vcm->start_current) * dev_vcm->max_logicalpos / range; in dw9714_get_pos()
537 dev_dbg(&client->dev, "%s: get position %d, dac %d\n", __func__, *cur_pos, dac); in dw9714_get_pos()
729 int dac = 0; in dw9714_open() local
743 while (dac <= dev_vcm->current_lens_pos) { in dw9714_open()
744 dw9714_set_dac(dev_vcm, dac); in dw9714_open()
746 dac += DW9714_GRADUAL_MOVELENS_STEPS; in dw9714_open()
747 if (dac >= dev_vcm->current_lens_pos) in dw9714_open()
751 if (dac > dev_vcm->current_lens_pos) { in dw9714_open()
752 dac = dev_vcm->current_lens_pos; in dw9714_open()
753 dw9714_set_dac(dev_vcm, dac); in dw9714_open()
763 int dac = dev_vcm->current_lens_pos; in dw9714_close() local
769 while (dac >= 0) { in dw9714_close()
770 dw9714_set_dac(dev_vcm, dac); in dw9714_close()
772 dac -= DW9714_GRADUAL_MOVELENS_STEPS; in dw9714_close()
773 if (dac <= 0) in dw9714_close()
777 if (dac < 0) { in dw9714_close()
778 dac = 0; in dw9714_close()
779 dw9714_set_dac(dev_vcm, dac); in dw9714_close()
990 unsigned int dac = 0; in get_dacval() local
992 dw9714_get_dac(dev_vcm, &dac); in get_dacval()
993 return sprintf(buf, "%u\n", dac); in get_dacval()