/drivers/mfd/ |
D | pcf50633-adc.c | 27 int avg; member 54 static void adc_setup(struct pcf50633 *pcf, int channel, int avg) in adc_setup() argument 63 pcf50633_reg_write(pcf, PCF50633_REG_ADCC1, channel | avg | in adc_setup() 77 adc_setup(pcf, adc->queue[head]->mux, adc->queue[head]->avg); in trigger_next_adc_job_if_any() 116 int pcf50633_adc_sync_read(struct pcf50633 *pcf, int mux, int avg) in pcf50633_adc_sync_read() argument 123 ret = pcf50633_adc_async_read(pcf, mux, avg, in pcf50633_adc_sync_read() 134 int pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg, in pcf50633_adc_async_read() argument 147 req->avg = avg; in pcf50633_adc_async_read()
|
/drivers/iio/humidity/ |
D | hts221_core.c | 174 const struct hts221_avg *avg = &hts221_avg_list[type]; in hts221_update_avg() local 178 if (avg->avg_avl[i] == val) in hts221_update_avg() 184 data = ((i << __ffs(avg->mask)) & avg->mask); in hts221_update_avg() 185 err = regmap_update_bits(hw->regmap, avg->addr, in hts221_update_avg() 186 avg->mask, data); in hts221_update_avg() 215 const struct hts221_avg *avg = &hts221_avg_list[HTS221_SENSOR_H]; in hts221_sysfs_rh_oversampling_avail() local 219 for (i = 0; i < ARRAY_SIZE(avg->avg_avl); i++) in hts221_sysfs_rh_oversampling_avail() 221 avg->avg_avl[i]); in hts221_sysfs_rh_oversampling_avail() 232 const struct hts221_avg *avg = &hts221_avg_list[HTS221_SENSOR_T]; in hts221_sysfs_temp_oversampling_avail() local 236 for (i = 0; i < ARRAY_SIZE(avg->avg_avl); i++) in hts221_sysfs_temp_oversampling_avail() [all …]
|
/drivers/hwmon/pmbus/ |
D | adm1275.c | 521 u32 avg; in adm1275_probe() local 786 "adi,power-sample-average", &avg) == 0) { in adm1275_probe() 787 if (!avg || avg > ADM1275_SAMPLES_AVG_MAX || in adm1275_probe() 788 BIT(__fls(avg)) != avg) { in adm1275_probe() 793 ret = adm1275_write_samples(data, client, true, ilog2(avg)); in adm1275_probe() 803 "adi,volt-curr-sample-average", &avg) == 0) { in adm1275_probe() 804 if (!avg || avg > ADM1275_SAMPLES_AVG_MAX || in adm1275_probe() 805 BIT(__fls(avg)) != avg) { in adm1275_probe() 810 ret = adm1275_write_samples(data, client, false, ilog2(avg)); in adm1275_probe()
|
/drivers/cpuidle/governors/ |
D | menu.c | 174 unsigned int min, max, thresh, avg; in get_typical_interval() local 203 avg = sum >> INTERVAL_SHIFT; in get_typical_interval() 205 avg = div_u64(sum, divisor); in get_typical_interval() 212 int64_t diff = (int64_t)value - avg; in get_typical_interval() 234 if ((((u64)avg*avg > variance*36) && (divisor * 4 >= INTERVALS * 3)) in get_typical_interval() 236 return avg; in get_typical_interval()
|
/drivers/power/supply/ |
D | ab8500_fg.c | 109 int avg; member 386 struct ab8500_fg_avg_cap *avg = &di->avg_cap; in ab8500_fg_add_cap_sample() local 389 avg->sum += sample - avg->samples[avg->pos]; in ab8500_fg_add_cap_sample() 390 avg->samples[avg->pos] = sample; in ab8500_fg_add_cap_sample() 391 avg->time_stamps[avg->pos] = now; in ab8500_fg_add_cap_sample() 392 avg->pos++; in ab8500_fg_add_cap_sample() 394 if (avg->pos == NBR_AVG_SAMPLES) in ab8500_fg_add_cap_sample() 395 avg->pos = 0; in ab8500_fg_add_cap_sample() 397 if (avg->nbr_samples < NBR_AVG_SAMPLES) in ab8500_fg_add_cap_sample() 398 avg->nbr_samples++; in ab8500_fg_add_cap_sample() [all …]
|
D | cw2015_battery.c | 310 u32 avg = 0; in cw_get_voltage() local 317 avg += reg_val; in cw_get_voltage() 319 avg /= CW2015_AVERAGING_SAMPLES; in cw_get_voltage() 326 voltage_mv = avg * 312 / 1024; in cw_get_voltage()
|
/drivers/clk/bcm/ |
D | clk-bcm53573-ilp.c | 50 int avg; in bcm53573_ilp_recalc_rate() local 87 avg = sum / num; in bcm53573_ilp_recalc_rate() 89 return parent_rate * 4 / avg; in bcm53573_ilp_recalc_rate()
|
/drivers/platform/x86/ |
D | intel_ips.c | 626 int avg; in cpu_exceeded() local 630 avg = cpu ? ips->ctv2_avg_temp : ips->ctv1_avg_temp; in cpu_exceeded() 631 if (avg > (ips->limits->core_temp_limit * 100)) in cpu_exceeded() 818 u16 avg; in calc_avg_temp() local 825 avg = (u16)total; in calc_avg_temp() 827 return avg; in calc_avg_temp() 891 static u16 update_average_temp(u16 avg, u16 val) in update_average_temp() argument 897 (((temp_decay_factor - 1) * avg) / temp_decay_factor); in update_average_temp() 902 static u16 update_average_power(u32 avg, u32 val) in update_average_power() argument 907 (((power_decay_factor - 1) * avg) / power_decay_factor); in update_average_power() [all …]
|
/drivers/thermal/intel/ |
D | therm_throt.c | 303 unsigned int i, avg, this_cpu = smp_processor_id(); in throttle_active_work() local 341 avg = 0; in throttle_active_work() 343 avg += state->temp_samples[i]; in throttle_active_work() 345 avg /= ARRAY_SIZE(state->temp_samples); in throttle_active_work() 347 if (state->average > avg) { in throttle_active_work() 355 state->average = avg; in throttle_active_work()
|
/drivers/net/wireless/ralink/rt2x00/ |
D | rt2x00link.c | 27 unsigned long avg; in rt2x00link_get_avg_rssi() local 29 avg = ewma_rssi_read(ewma); in rt2x00link_get_avg_rssi() 30 if (avg) in rt2x00link_get_avg_rssi() 31 return -avg; in rt2x00link_get_avg_rssi()
|
/drivers/iio/adc/ |
D | twl4030-madc.c | 113 u8 avg; member 278 .avg = TWL4030_MADC_RTAVERAGE_LSB, 283 .avg = TWL4030_MADC_SW1AVERAGE_LSB, 289 .avg = TWL4030_MADC_SW2AVERAGE_LSB, 633 method->avg); in twl4030_madc_conversion() 637 method->avg); in twl4030_madc_conversion()
|
D | ina2xx-adc.c | 99 * c->avg) 144 int avg; member 205 *val = chip->avg; in ina2xx_read_raw() 299 chip->avg = ina226_avg_tab[bits]; in ina226_set_average() 842 1000000 / sampling_us, chip->avg); in ina2xx_buffer_enable() 1007 chip->avg = 1; in ina2xx_probe()
|
/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/ |
D | phy_lcn.c | 3949 s16 avg = 0; in wlc_lcnphy_tempsense_new() local 3964 avg = (s16) (tempsenseval1 - 512); in wlc_lcnphy_tempsense_new() 3966 avg = (s16) tempsenseval1; in wlc_lcnphy_tempsense_new() 3969 avg += (s16) (tempsenseval2 - 512); in wlc_lcnphy_tempsense_new() 3971 avg += (s16) tempsenseval2; in wlc_lcnphy_tempsense_new() 3973 avg /= 2; in wlc_lcnphy_tempsense_new() 3985 return avg; in wlc_lcnphy_tempsense_new() 3991 s32 avg = 0; in wlc_lcnphy_tempsense() local 4008 avg = (int)(tempsenseval1 - 512); in wlc_lcnphy_tempsense() 4010 avg = (int)tempsenseval1; in wlc_lcnphy_tempsense() [all …]
|
/drivers/gpu/drm/i915/gt/ |
D | intel_context.c | 389 ewma_runtime_init(&ce->stats.runtime.avg); in intel_context_init() 601 u64 avg = ewma_runtime_read(&ce->stats.runtime.avg); in intel_context_get_avg_runtime_ns() local 604 avg *= ce->engine->gt->clock_period_ns; in intel_context_get_avg_runtime_ns() 606 return avg; in intel_context_get_avg_runtime_ns()
|
/drivers/hwmon/ |
D | ina2xx.c | 156 int avg = ina226_avg_tab[INA226_READ_AVG(config)]; in ina226_reg_to_interval() local 162 return DIV_ROUND_CLOSEST(avg * INA226_TOTAL_CONV_TIME_DEFAULT, 1000); in ina226_reg_to_interval() 171 int avg, avg_bits; in ina226_interval_to_reg() local 173 avg = DIV_ROUND_CLOSEST(interval * 1000, in ina226_interval_to_reg() 175 avg_bits = find_closest(avg, ina226_avg_tab, in ina226_interval_to_reg()
|
/drivers/media/platform/qcom/venus/ |
D | pm_helpers.c | 176 static void mbs_to_bw(struct venus_inst *inst, u32 mbs, u32 *avg, u32 *peak) in mbs_to_bw() argument 182 *avg = 0; in mbs_to_bw() 206 *avg = bw_tbl[i].avg_10bit; in mbs_to_bw() 209 *avg = bw_tbl[i].avg; in mbs_to_bw() 218 u32 mbs_per_sec, avg, peak, total_avg = 0, total_peak = 0; in load_scale_bw() local 222 mbs_to_bw(inst, mbs_per_sec, &avg, &peak); in load_scale_bw() 223 total_avg += avg; in load_scale_bw()
|
/drivers/thunderbolt/ |
D | tmu.c | 66 u32 freq, avg, val; in tb_switch_set_tmu_mode_params() local 70 avg = tmu_params[mode].avg_const; in tb_switch_set_tmu_mode_params() 94 val |= FIELD_PREP(TMU_RTR_CS_15_FREQ_AVG_MASK, avg) | in tb_switch_set_tmu_mode_params() 95 FIELD_PREP(TMU_RTR_CS_15_DELAY_AVG_MASK, avg) | in tb_switch_set_tmu_mode_params() 96 FIELD_PREP(TMU_RTR_CS_15_OFFSET_AVG_MASK, avg) | in tb_switch_set_tmu_mode_params() 97 FIELD_PREP(TMU_RTR_CS_15_ERROR_AVG_MASK, avg); in tb_switch_set_tmu_mode_params()
|
/drivers/devfreq/ |
D | tegra30-devfreq.c | 256 u32 avg; in tegra_devfreq_update_avg_wmark() local 258 avg = min(dev->avg_count, U32_MAX - band); in tegra_devfreq_update_avg_wmark() 259 device_writel(dev, avg + band, ACTMON_DEV_AVG_UPPER_WMARK); in tegra_devfreq_update_avg_wmark() 261 avg = max(dev->avg_count, band); in tegra_devfreq_update_avg_wmark() 262 device_writel(dev, avg - band, ACTMON_DEV_AVG_LOWER_WMARK); in tegra_devfreq_update_avg_wmark()
|
/drivers/usb/cdns3/ |
D | cdnsp-debug.h | 547 u16 maxp, avg; in cdnsp_decode_ep_context() local 566 avg = EP_AVG_TRB_LENGTH(tx_info); in cdnsp_decode_ep_context() 581 ret += snprintf(str + ret, size - ret, "avg trb len %d", avg); in cdnsp_decode_ep_context()
|
/drivers/media/platform/qcom/camss/ |
D | camss.c | 848 .icc_bw_tbl.avg = 38400, 853 .icc_bw_tbl.avg = 2097152, 858 .icc_bw_tbl.avg = 0, 863 .icc_bw_tbl.avg = 2097152, 1787 camss->icc_bw_tbl[i].avg, in camss_runtime_resume()
|
D | camss.h | 60 u32 avg; member
|
/drivers/interconnect/imx/ |
D | imx.c | 31 static int imx_icc_get_bw(struct icc_node *node, u32 *avg, u32 *peak) in imx_icc_get_bw() argument 33 *avg = 0; in imx_icc_get_bw()
|
/drivers/memory/tegra/ |
D | tegra186-emc.c | 255 static int tegra_emc_icc_get_init_bw(struct icc_node *node, u32 *avg, u32 *peak) in tegra_emc_icc_get_init_bw() argument 257 *avg = 0; in tegra_emc_icc_get_init_bw()
|
/drivers/gpu/drm/i915/gem/ |
D | i915_gem_shrinker.c | 303 unsigned long avg = 2 * count / num_objects; in i915_gem_shrinker_count() local 306 max((i915->mm.shrinker.batch + avg) >> 1, in i915_gem_shrinker_count()
|
/drivers/parisc/ |
D | ccio-dma.c | 1037 unsigned long avg = 0, min, max; in ccio_proc_info() local 1061 avg += ioc->avg_search[j]; in ccio_proc_info() 1067 avg /= CCIO_SEARCH_SAMPLE; in ccio_proc_info() 1069 min, avg, max); in ccio_proc_info()
|