/linux-6.6.21/include/linux/ |
D | math64.h | 86 #define div64_long(x, y) div_s64((x), (y)) 141 #ifndef div_s64 142 static inline s64 div_s64(s64 dividend, s32 divisor) in div_s64() function 345 div_s64((__x + (__d / 2)), __d) : \ 346 div_s64((__x - (__d / 2)), __d); \
|
D | fixp-arith.h | 137 return v1 + div_s64(tmp, dx); in fixp_sin32_rad()
|
/linux-6.6.21/drivers/thermal/ |
D | amlogic_thermal.c | 122 factor = div_s64(factor, 100); in amlogic_thermal_code_to_millicelsius() 125 Uptat = div_s64(Uptat, 100); in amlogic_thermal_code_to_millicelsius() 127 Uptat = div_s64(Uptat, BIT(16) + factor); in amlogic_thermal_code_to_millicelsius() 130 temp = div_s64(temp, BIT(16)); in amlogic_thermal_code_to_millicelsius()
|
D | armada_thermal.c | 388 *temp = div_s64((m * sample) - b, div); in armada_read_sensor() 390 *temp = div_s64(b - (m * sample), div); in armada_read_sensor() 458 sample = div_s64(((temp_mc * div) + b), m); in armada_mc_to_reg_temp() 460 sample = div_s64((b - (temp_mc * div)), m); in armada_mc_to_reg_temp()
|
/linux-6.6.21/drivers/iio/afe/ |
D | iio-rescale.c | 53 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() 121 *val = div_s64(tmp, scale) + schan_off; in rescale_process_offset() 124 *val = div_s64(rescale->offset, scale) + schan_off; in rescale_process_offset() 128 *val = div_s64(tmp, scale) + schan_off; in rescale_process_offset() 469 rescale->offset = div_s64((s64)offset * rescale->denominator, in rescale_temp_transducer_props()
|
/linux-6.6.21/drivers/net/dsa/sja1105/ |
D | sja1105_ptp.h | 48 n = div_s64(a + b - 1, b); in future_base_time() 58 return div_s64(ns, 200); in ns_to_sja1105_delta()
|
/linux-6.6.21/drivers/iio/pressure/ |
D | mprls0025pa.c | 385 scale = div_s64(((s64)(data->pmax - data->pmin)) * NANO, in mpr_probe() 393 div_s64(div_s64((s64)data->pmin * NANO, scale), NANO); in mpr_probe()
|
D | icp10100.c | 295 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()
|
D | dps310.c | 686 pressure += div_s64(rem, 1000000000LL); in dps310_calculate_pressure() 743 c0 = div_s64((s64)kt * (s64)data->c0, 2); in dps310_calculate_temp() 749 return (int)div_s64(t * 1000LL, kt); in dps310_calculate_temp()
|
/linux-6.6.21/drivers/iio/common/inv_sensors/ |
D | inv_sensors_timestamp.c | 15 (div_s64((_val) * (_jitter), 1000)) 142 period = div_s64(delta, fifo_nb); in inv_sensors_timestamp_interrupt()
|
/linux-6.6.21/drivers/platform/chrome/ |
D | cros_ec_sensorhub_ring.c | 289 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-6.6.21/drivers/rtc/ |
D | lib_test.c | 55 days = div_s64(secs, 86400); in rtc_time64_to_tm_test_date_range()
|
D | rtc-tps65910.c | 295 tmp = div_s64(tmp, TICKS_PER_HOUR); in tps65910_read_offset() 319 tmp = div_s64(tmp, PPB_MULT); in tps65910_set_offset()
|
D | rtc-ti-k3.c | 368 tmp = div_s64(tmp, ticks_per_hr); in ti_k3_rtc_read_offset() 393 tmp = div_s64(tmp, K3RTC_PPB_MULT); in ti_k3_rtc_set_offset()
|
/linux-6.6.21/drivers/ptp/ |
D | ptp_idt82p33.c | 557 fcw = div_s64(fcw, 8430756LL); in _idt82p33_adjfine() 578 s64 scaled_ppm = div_s64(((s64)ddco_ppb << 13), 125); in idt82p33_ddco_scaled_ppm() 579 s64 max_scaled_ppm = div_s64(((s64)DCO_MAX_PPB << 13), 125); in idt82p33_ddco_scaled_ppm() 666 *overhead_ns = div_s64(total_ns, MAX_MEASURMENT_COUNT); in idt82p33_measure_one_byte_write_overhead() 699 *overhead_ns = div_s64(total_ns, MAX_MEASURMENT_COUNT); in idt82p33_measure_one_byte_read_overhead() 735 idt82p33->tod_write_overhead_ns = div_s64(total_ns, in idt82p33_measure_tod_write_9_byte_overhead() 996 offset_regval = div_s64((s64)(-offset_ns) * 1000000000ll, in idt82p33_adjwritephase()
|
D | ptp_mock.c | 55 adj = div_s64(adj, MOCK_PHC_FADJ_DENOMINATOR); in mock_phc_adjfine()
|
/linux-6.6.21/kernel/time/ |
D | time_test.c | 74 days = div_s64(secs, 86400); in time64_to_tm_test_date_range()
|
D | ntp.c | 345 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-6.6.21/drivers/iio/common/cros_ec_sensors/ |
D | cros_ec_sensors.c | 112 *val = div_s64(val64 * 980665, 10); in cros_ec_sensors_read() 123 *val2 = div_s64(val64 * 3141592653ULL, in cros_ec_sensors_read()
|
/linux-6.6.21/drivers/md/bcache/ |
D | writeback.c | 87 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-6.6.21/drivers/power/supply/ |
D | max17042_battery.c | 359 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-6.6.21/drivers/iio/ |
D | inkern.c | 682 *processed += div_s64(raw64 * (s64)scale_val2 * scale, in iio_convert_raw_to_processed_unlocked() 690 *processed += div_s64(raw64 * (s64)scale_val2 * scale, in iio_convert_raw_to_processed_unlocked() 694 *processed = div_s64(raw64 * (s64)scale_val * scale, in iio_convert_raw_to_processed_unlocked()
|
/linux-6.6.21/drivers/net/ethernet/renesas/ |
D | rcar_gen4_ptp.c | 38 diff = div_s64(addend * scaled_ppm_to_ppb(scaled_ppm), NSEC_PER_SEC); in rcar_gen4_ptp_adjfine()
|
/linux-6.6.21/drivers/iio/accel/ |
D | adxl345_core.c | 167 n = div_s64(val * NANOHZ_PER_HZ + val2, in adxl345_write_raw()
|
/linux-6.6.21/drivers/iio/dac/ |
D | ad3552r.c | 729 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()
|