Home
last modified time | relevance | path

Searched refs:div_s64 (Results 1 – 25 of 76) sorted by relevance

1234

/linux-5.19.10/include/linux/
Dmath64.h86 #define div64_long(x, y) div_s64((x), (y))
137 #ifndef div_s64
138 static inline s64 div_s64(s64 dividend, s32 divisor) in div_s64() function
331 div_s64((__x + (__d / 2)), __d) : \
332 div_s64((__x - (__d / 2)), __d); \
Dfixp-arith.h136 return v1 + div_s64(tmp, dx); in fixp_sin32_rad()
/linux-5.19.10/drivers/iio/afe/
Diio-rescale.c53 tmp = div_s64(tmp, rescale->denominator); in rescale_process_scale()
72 *val2 += div_s64((s64)rem2 * 1000000000LL, tmp); in rescale_process_scale()
90 tmp = div_s64(tmp, abs(rescale->denominator)); in rescale_process_scale()
120 *val = div_s64(tmp, scale) + schan_off; in rescale_process_offset()
123 *val = div_s64(rescale->offset, scale) + schan_off; in rescale_process_offset()
127 *val = div_s64(tmp, scale) + schan_off; in rescale_process_offset()
456 rescale->offset = div_s64((s64)offset * rescale->denominator, in rescale_temp_transducer_props()
/linux-5.19.10/drivers/thermal/
Damlogic_thermal.c125 factor = div_s64(factor, 100); in amlogic_thermal_code_to_millicelsius()
128 Uptat = div_s64(Uptat, 100); in amlogic_thermal_code_to_millicelsius()
130 Uptat = div_s64(Uptat, BIT(16) + factor); in amlogic_thermal_code_to_millicelsius()
133 temp = div_s64(temp, BIT(16)); in amlogic_thermal_code_to_millicelsius()
Darmada_thermal.c393 *temp = div_s64((m * sample) - b, div); in armada_read_sensor()
395 *temp = div_s64(b - (m * sample), div); in armada_read_sensor()
466 sample = div_s64(((temp_mc * div) + b), m); in armada_mc_to_reg_temp()
468 sample = div_s64((b - (temp_mc * div)), m); in armada_mc_to_reg_temp()
/linux-5.19.10/drivers/net/dsa/sja1105/
Dsja1105_ptp.h48 n = div_s64(a + b - 1, b); in future_base_time()
58 return div_s64(ns, 200); in ns_to_sja1105_delta()
/linux-5.19.10/drivers/platform/chrome/
Dcros_ec_sensorhub_ring.c289 div_s64(state->median_m * state->x_history[i], in cros_ec_sensor_ring_ts_filter_update()
329 return div_s64(state->median_m * (x - state->x_offset), M_PRECISION) in cros_ec_sensor_ring_ts_filter()
487 s64 avg = div_s64(sensorhub->future_timestamp_total_ns, in cros_ec_sensor_ring_process_event()
642 sample_period = div_s64(batch_timestamp - in cros_ec_sensor_ring_spread_add()
743 time_period = div_s64(current_timestamp - timestamp, count); in cros_ec_sensor_ring_spread_add_legacy()
/linux-5.19.10/drivers/rtc/
Dlib_test.c55 days = div_s64(secs, 86400); in rtc_time64_to_tm_test_date_range()
Drtc-tps65910.c295 tmp = div_s64(tmp, TICKS_PER_HOUR); in tps65910_read_offset()
319 tmp = div_s64(tmp, PPB_MULT); in tps65910_set_offset()
/linux-5.19.10/kernel/time/
Dtime_test.c74 days = div_s64(secs, 86400); in time64_to_tm_test_date_range()
Dntp.c345 time_offset = div_s64(offset64 << NTP_SCALE_SHIFT, NTP_INTERVAL_FREQ); in ntp_update_offset()
952 ftemp = div_s64(((s64)(-freq_norm.nsec)) << NTP_SCALE_SHIFT, in hardpps_update_freq()
973 pps_stabil += (div_s64(((s64)delta_mod) << in hardpps_update_freq()
1009 time_offset = div_s64(((s64)correction) << NTP_SCALE_SHIFT, in hardpps_update_phase()
/linux-5.19.10/drivers/iio/common/cros_ec_sensors/
Dcros_ec_sensors.c111 *val = div_s64(val64 * 980665, 10); in cros_ec_sensors_read()
122 *val2 = div_s64(val64 * 3141592653ULL, in cros_ec_sensors_read()
/linux-5.19.10/drivers/ptp/
Dptp_idt82p33.c254 fcw = div_s64(fcw, 2688); in _idt82p33_adjfine()
305 *overhead_ns = div_s64(total_ns, MAX_MEASURMENT_COUNT); in idt82p33_measure_one_byte_write_overhead()
341 idt82p33->tod_write_overhead_ns = div_s64(total_ns, in idt82p33_measure_tod_write_9_byte_overhead()
605 offset_regval = div_s64(offset_fs * 1000, IDT_T0DPLL_PHASE_RESOL); in idt82p33_adjwritephase()
/linux-5.19.10/drivers/iio/pressure/
Dicp10100.c295 p_lut[0] = lut_lower + (int32_t)div_s64(val1, inv_quadr_factor); in icp10100_get_pressure()
298 (int32_t)div_s64(val1, inv_quadr_factor); in icp10100_get_pressure()
300 p_lut[2] = lut_upper + (int32_t)div_s64(val1, inv_quadr_factor); in icp10100_get_pressure()
Ddps310.c536 pressure += div_s64(rem, 1000000000LL); in dps310_calculate_pressure()
593 c0 = div_s64((s64)kt * (s64)data->c0, 2); in dps310_calculate_temp()
599 return (int)div_s64(t * 1000LL, kt); in dps310_calculate_temp()
Ddlhl60d.c175 tmp = div_s64(125LL * st->info.fss * 24909 * 100, in dlh_read_raw()
/linux-5.19.10/drivers/md/bcache/
Dwriteback.c87 div_s64(error, dc->writeback_rate_p_term_inverse); in __update_writeback_rate()
108 div_s64((dirty_buckets * c->cache->sb.bucket_size), dirty); in __update_writeback_rate()
122 fps = div_s64(dirty, dirty_buckets) * fp_term; in __update_writeback_rate()
146 integral_scaled = div_s64(dc->writeback_rate_integral, in __update_writeback_rate()
/linux-5.19.10/drivers/iio/imu/inv_mpu6050/
Dinv_mpu_ring.c51 delta = div_s64(timestamp - st->it_timestamp, divider); in inv_mpu6050_update_period()
/linux-5.19.10/drivers/iio/imu/inv_icm42600/
Dinv_icm42600_timestamp.c132 period = div_s64(delta, fifo_nb); in inv_icm42600_timestamp_interrupt()
Dinv_icm42600_accel.c431 bias = div_s64(val64, 10000L); in inv_icm42600_accel_read_offset()
488 offset = div_s64(val64, 9806650 * 5); in inv_icm42600_accel_write_offset()
/linux-5.19.10/drivers/power/supply/
Dmax17042_battery.c359 val->intval = div_s64(data64, chip->pdata->r_sns); in max17042_get_property()
401 val->intval = div_s64(data64, chip->pdata->r_sns); in max17042_get_property()
413 val->intval = div_s64(data64, chip->pdata->r_sns); in max17042_get_property()
424 val->intval = div_s64(data64, chip->pdata->r_sns); in max17042_get_property()
/linux-5.19.10/drivers/iio/
Dinkern.c648 *processed += div_s64(raw64 * (s64)scale_val2 * scale, in iio_convert_raw_to_processed_unlocked()
656 *processed += div_s64(raw64 * (s64)scale_val2 * scale, in iio_convert_raw_to_processed_unlocked()
660 *processed = div_s64(raw64 * (s64)scale_val * scale, in iio_convert_raw_to_processed_unlocked()
/linux-5.19.10/drivers/iio/accel/
Dadxl345_core.c167 n = div_s64(val * NHZ_PER_HZ + val2, ADXL345_BASE_RATE_NANO_HZ); in adxl345_write_raw()
/linux-5.19.10/drivers/iio/dac/
Dad3552r.c729 tmp = div_s64(tmp, 1024 * AD3552R_GAIN_SCALE); in ad3552r_get_custom_range()
734 tmp = div_s64(tmp, 1024 * AD3552R_GAIN_SCALE); in ad3552r_get_custom_range()
775 dac->ch_data[ch].offset_dec = div_s64(tmp, span); in ad3552r_calc_gain_and_offset()
/linux-5.19.10/drivers/iio/humidity/
Dhts221_core.c360 tmp = div_s64(data * 1000000000LL, div); in hts221_get_sensor_scale()
389 tmp = div_s64(data * 1000000000LL, div); in hts221_get_sensor_offset()

1234