Home
last modified time | relevance | path

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

1234

/linux-6.6.21/include/linux/
Dmath64.h86 #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); \
Dfixp-arith.h137 return v1 + div_s64(tmp, dx); in fixp_sin32_rad()
/linux-6.6.21/drivers/thermal/
Damlogic_thermal.c122 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()
Darmada_thermal.c388 *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/
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()
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/
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-6.6.21/drivers/iio/pressure/
Dmprls0025pa.c385 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()
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.c686 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/
Dinv_sensors_timestamp.c15 (div_s64((_val) * (_jitter), 1000))
142 period = div_s64(delta, fifo_nb); in inv_sensors_timestamp_interrupt()
/linux-6.6.21/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-6.6.21/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()
Drtc-ti-k3.c368 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/
Dptp_idt82p33.c557 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()
Dptp_mock.c55 adj = div_s64(adj, MOCK_PHC_FADJ_DENOMINATOR); in mock_phc_adjfine()
/linux-6.6.21/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-6.6.21/drivers/iio/common/cros_ec_sensors/
Dcros_ec_sensors.c112 *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/
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-6.6.21/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-6.6.21/drivers/iio/
Dinkern.c682 *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/
Drcar_gen4_ptp.c38 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/
Dadxl345_core.c167 n = div_s64(val * NANOHZ_PER_HZ + val2, in adxl345_write_raw()
/linux-6.6.21/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()

1234