Lines Matching refs:rv
620 int rv; in lm80_update_device() local
632 rv = lm80_read_value(client, LM80_REG_IN(i)); in lm80_update_device()
633 if (rv < 0) in lm80_update_device()
635 data->in[i] = rv; in lm80_update_device()
637 rv = lm80_read_value(client, LM80_REG_IN_MIN(i)); in lm80_update_device()
638 if (rv < 0) in lm80_update_device()
640 data->in_min[i] = rv; in lm80_update_device()
642 rv = lm80_read_value(client, LM80_REG_IN_MAX(i)); in lm80_update_device()
643 if (rv < 0) in lm80_update_device()
645 data->in_max[i] = rv; in lm80_update_device()
648 rv = lm80_read_value(client, LM80_REG_FAN1); in lm80_update_device()
649 if (rv < 0) in lm80_update_device()
651 data->fan[0] = rv; in lm80_update_device()
653 rv = lm80_read_value(client, LM80_REG_FAN_MIN(1)); in lm80_update_device()
654 if (rv < 0) in lm80_update_device()
656 data->fan_min[0] = rv; in lm80_update_device()
658 rv = lm80_read_value(client, LM80_REG_FAN2); in lm80_update_device()
659 if (rv < 0) in lm80_update_device()
661 data->fan[1] = rv; in lm80_update_device()
663 rv = lm80_read_value(client, LM80_REG_FAN_MIN(2)); in lm80_update_device()
664 if (rv < 0) in lm80_update_device()
666 data->fan_min[1] = rv; in lm80_update_device()
668 prev_rv = rv = lm80_read_value(client, LM80_REG_TEMP); in lm80_update_device()
669 if (rv < 0) in lm80_update_device()
671 rv = lm80_read_value(client, LM80_REG_RES); in lm80_update_device()
672 if (rv < 0) in lm80_update_device()
674 data->temp = (prev_rv << 8) | (rv & 0xf0); in lm80_update_device()
676 rv = lm80_read_value(client, LM80_REG_TEMP_OS_MAX); in lm80_update_device()
677 if (rv < 0) in lm80_update_device()
679 data->temp_os_max = rv; in lm80_update_device()
681 rv = lm80_read_value(client, LM80_REG_TEMP_OS_HYST); in lm80_update_device()
682 if (rv < 0) in lm80_update_device()
684 data->temp_os_hyst = rv; in lm80_update_device()
686 rv = lm80_read_value(client, LM80_REG_TEMP_HOT_MAX); in lm80_update_device()
687 if (rv < 0) in lm80_update_device()
689 data->temp_hot_max = rv; in lm80_update_device()
691 rv = lm80_read_value(client, LM80_REG_TEMP_HOT_HYST); in lm80_update_device()
692 if (rv < 0) in lm80_update_device()
694 data->temp_hot_hyst = rv; in lm80_update_device()
696 rv = lm80_read_value(client, LM80_REG_FANDIV); in lm80_update_device()
697 if (rv < 0) in lm80_update_device()
699 data->fan_div[0] = (rv >> 2) & 0x03; in lm80_update_device()
700 data->fan_div[1] = (rv >> 4) & 0x03; in lm80_update_device()
702 prev_rv = rv = lm80_read_value(client, LM80_REG_ALARM1); in lm80_update_device()
703 if (rv < 0) in lm80_update_device()
705 rv = lm80_read_value(client, LM80_REG_ALARM2); in lm80_update_device()
706 if (rv < 0) in lm80_update_device()
708 data->alarms = prev_rv + (rv << 8); in lm80_update_device()
717 ret = ERR_PTR(rv); in lm80_update_device()