Lines Matching refs:accum
80 struct sensor_accumulator *accum; in accumulate_delta() local
87 accum = &data->accums[channel]; in accumulate_delta()
88 if (input >= accum->prev_value) in accumulate_delta()
89 accum->energy_ctr += in accumulate_delta()
90 input - accum->prev_value; in accumulate_delta()
92 accum->energy_ctr += UINT_MAX - in accumulate_delta()
93 accum->prev_value + input; in accumulate_delta()
95 accum->prev_value = input; in accumulate_delta()
124 struct sensor_accumulator *accum; in amd_add_delta() local
131 accum = &data->accums[ch]; in amd_add_delta()
132 if (input >= accum->prev_value) in amd_add_delta()
133 input += accum->energy_ctr - in amd_add_delta()
134 accum->prev_value; in amd_add_delta()
136 input += UINT_MAX - accum->prev_value + in amd_add_delta()
137 accum->energy_ctr; in amd_add_delta()