| /Linux-v5.15/drivers/macintosh/ |
| D | windfarm_cpufreq_clamp.c | 68 struct wf_control *clamp; in wf_cpufreq_clamp_init() local 99 clamp = kmalloc(sizeof(struct wf_control), GFP_KERNEL); in wf_cpufreq_clamp_init() 100 if (clamp == NULL) { in wf_cpufreq_clamp_init() 105 clamp->ops = &clamp_ops; in wf_cpufreq_clamp_init() 106 clamp->name = "cpufreq-clamp"; in wf_cpufreq_clamp_init() 107 ret = wf_register_control(clamp); in wf_cpufreq_clamp_init() 111 clamp_control = clamp; in wf_cpufreq_clamp_init() 115 kfree(clamp); in wf_cpufreq_clamp_init()
|
| /Linux-v5.15/samples/bpf/ |
| D | tcp_clamp_kern.c | 30 int clamp = 100; in bpf_clamp() local 71 &clamp, sizeof(clamp)); in bpf_clamp() 77 &clamp, sizeof(clamp)); in bpf_clamp()
|
| /Linux-v5.15/drivers/staging/media/atomisp/pci/ |
| D | sh_css_param_shading.c | 132 src_y0 = clamp(src_y0, 0, (int)table_height - 1); in crop_and_interpolate() 133 src_y1 = clamp(src_y1, 0, (int)table_height - 1); in crop_and_interpolate() 134 ty = min(clamp(ty, 0, (int)sensor_height - 1), in crop_and_interpolate() 165 src_x0 = clamp(src_x0, 0, (int)table_width - 1); in crop_and_interpolate() 166 src_x1 = clamp(src_x1, 0, (int)table_width - 1); in crop_and_interpolate() 167 tx = min(clamp(tx, 0, (int)sensor_width - 1), in crop_and_interpolate()
|
| /Linux-v5.15/mm/ |
| D | memtest.c | 73 this_start = clamp(this_start, start, end); in do_one_pass() 74 this_end = clamp(this_end, start, end); in do_one_pass()
|
| /Linux-v5.15/drivers/clk/ |
| D | clk-plldig.c | 134 div = clamp(div, 1UL, MAX_RFDPHI1); in plldig_calc_target_div() 145 req->rate = clamp(req->rate, PHI1_MIN_FREQ, PHI1_MAX_FREQ); in plldig_determine_rate() 159 rate = clamp(rate, PHI1_MIN_FREQ, PHI1_MAX_FREQ); in plldig_set_rate()
|
| /Linux-v5.15/drivers/media/platform/vsp1/ |
| D | vsp1_uds.c | 182 fmt->width = clamp(fmt->width, UDS_MIN_SIZE, UDS_MAX_SIZE); in uds_try_format() 183 fmt->height = clamp(fmt->height, UDS_MIN_SIZE, UDS_MAX_SIZE); in uds_try_format() 193 fmt->width = clamp(fmt->width, minimum, maximum); in uds_try_format() 195 fmt->height = clamp(fmt->height, minimum, maximum); in uds_try_format()
|
| /Linux-v5.15/drivers/power/supply/ |
| D | bq256xx_charger.c | 492 ichg = clamp(ichg, BQ256XX_ICHG_MIN_uA, ichg_max); in bq256xx_set_ichg_curr() 505 ichg = clamp(ichg, BQ25618_ICHG_MIN_uA, ichg_max); in bq25618_619_set_ichg_curr() 605 vbatreg = clamp(vbatreg, BQ25618_VBATREG_MIN_uV, vbatreg_max); in bq25618_619_set_chrg_volt() 627 vbatreg = clamp(vbatreg, BQ25611D_VBATREG_MIN_uV, vbatreg_max); in bq25611d_set_chrg_volt() 648 vbatreg = clamp(vbatreg, BQ2560X_VBATREG_MIN_uV, vbatreg_max); in bq2560x_set_chrg_volt() 663 vbatreg = clamp(vbatreg, BQ25601D_VBATREG_MIN_uV, vbatreg_max); in bq25601d_set_chrg_volt() 695 iprechg = clamp(iprechg, BQ256XX_IPRECHG_MIN_uA, in bq256xx_set_prechrg_curr() 727 iprechg = clamp(iprechg, BQ25618_IPRECHG_MIN_uA, in bq25618_619_set_prechrg_curr() 758 iterm = clamp(iterm, BQ256XX_ITERM_MIN_uA, BQ256XX_ITERM_MAX_uA); in bq256xx_set_term_curr() 788 iterm = clamp(iterm, BQ25618_ITERM_MIN_uA, BQ25618_ITERM_MAX_uA); in bq25618_619_set_term_curr() [all …]
|
| /Linux-v5.15/kernel/ |
| D | profile.c | 71 prof_shift = clamp(par, 0, BITS_PER_LONG - 1); in profile_setup() 82 prof_shift = clamp(par, 0, BITS_PER_LONG - 1); in profile_setup() 90 prof_shift = clamp(par, 0, BITS_PER_LONG - 1); in profile_setup() 94 prof_shift = clamp(par, 0, BITS_PER_LONG - 1); in profile_setup()
|
| /Linux-v5.15/drivers/media/platform/omap3isp/ |
| D | ispccdc.c | 536 u32 clamp; in ccdc_configure_clamp() local 539 clamp = ccdc->clamp.obgain << ISPCCDC_CLAMP_OBGAIN_SHIFT; in ccdc_configure_clamp() 540 clamp |= ccdc->clamp.oblen << ISPCCDC_CLAMP_OBSLEN_SHIFT; in ccdc_configure_clamp() 541 clamp |= ccdc->clamp.oblines << ISPCCDC_CLAMP_OBSLN_SHIFT; in ccdc_configure_clamp() 542 clamp |= ccdc->clamp.obstpixel << ISPCCDC_CLAMP_OBST_SHIFT; in ccdc_configure_clamp() 543 isp_reg_writel(isp, clamp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CLAMP); in ccdc_configure_clamp() 545 isp_reg_writel(isp, ccdc->clamp.dcsubval, in ccdc_configure_clamp() 684 if (copy_from_user(&ccdc->clamp, ccdc_struct->bclamp, in ccdc_config() 685 sizeof(ccdc->clamp))) { in ccdc_config() 858 div = clamp(div, 2U, max_div); in ccdc_config_vp() [all …]
|
| D | ispccdc.h | 142 struct omap3isp_ccdc_bclamp clamp; member
|
| /Linux-v5.15/drivers/thermal/intel/ |
| D | intel_powerclamp.c | 110 duration = clamp(new_duration, 6ul, 25ul); in duration_set() 158 window_size = clamp(new_window_size, 2ul, 10ul); in window_size_set() 529 set_target_ratio = clamp(set_target_ratio, 0U, MAX_TARGET_RATIO - 1); in start_power_clamp() 622 new_target_ratio = clamp(new_target_ratio, 0UL, in powerclamp_set_cur_state()
|
| /Linux-v5.15/drivers/clk/renesas/ |
| D | rcar-gen3-cpg.c | 79 mult = clamp(mult, min_mult, max_mult); in cpg_pll_clk_determine_rate() 93 mult = clamp(mult, 1U, 128U); in cpg_pll_clk_set_rate() 214 mult = clamp(mult, min_mult, max_mult); in cpg_z_clk_determine_rate() 229 mult = clamp(mult, 1U, 32U); in cpg_z_clk_set_rate()
|
| D | clk-div6.c | 100 return clamp(div, 1U, 64U); in cpg_div6_clock_calc_div() 127 div = clamp(div, min_div, max_div); in cpg_div6_clock_determine_rate()
|
| D | rcar-gen2-cpg.c | 78 mult = clamp(mult, min_mult, max_mult); in cpg_z_clk_determine_rate() 93 mult = clamp(mult, 1U, 32U); in cpg_z_clk_set_rate()
|
| /Linux-v5.15/sound/usb/line6/ |
| D | playback.c | 38 pv = clamp(val, -0x8000, 0x7fff); in change_volume() 53 val = clamp(val, -0x800000, 0x7fffff); in change_volume() 125 pov = clamp(val, -0x8000, 0x7fff); in add_monitor_signal()
|
| /Linux-v5.15/drivers/hid/ |
| D | hid-elecom.c | 49 nbuttons = clamp(nbuttons, 0, MOUSE_BUTTONS_MAX); in mouse_button_fixup()
|
| /Linux-v5.15/drivers/thermal/ |
| D | sprd_thermal.c | 181 clamp(rawdata, (u32)SPRD_THM_RAW_DATA_LOW, (u32)SPRD_THM_RAW_DATA_HIGH); in sprd_thm_rawdata_to_temp() 195 clamp(temp, (int)SPRD_THM_TEMP_LOW, (int)SPRD_THM_TEMP_HIGH); in sprd_thm_temp_to_rawdata() 204 return clamp(val, val, (u32)(SPRD_THM_RAW_DATA_HIGH - 1)); in sprd_thm_temp_to_rawdata()
|
| /Linux-v5.15/fs/btrfs/ |
| D | space-info.c | 204 space_info->clamp = 1; in create_space_info() 801 thresh >>= space_info->clamp; in need_preemptive_reclaim() 1103 space_info->clamp = max(1, space_info->clamp - 1); in btrfs_preempt_reclaim_metadata_space() 1418 space_info->clamp = min(space_info->clamp + 1, 8); in maybe_clamp_preempt()
|
| /Linux-v5.15/drivers/media/common/v4l2-tpg/ |
| D | v4l2-tpg-core.c | 539 v = clamp(v, 0, 0xff0); in rec709_to_linear() 545 v = clamp(v, 0, 0xff0); in linear_to_rec709() 731 *r = clamp(*r >> 12, 0, 0xff0); in ycbcr2rgb() 732 *g = clamp(*g >> 12, 0, 0xff0); in ycbcr2rgb() 733 *b = clamp(*b >> 12, 0, 0xff0); in ycbcr2rgb() 919 r = clamp(r, 16 << 4, 235 << 4); in precalculate_color() 920 g = clamp(g, 16 << 4, 235 << 4); in precalculate_color() 921 b = clamp(b, 16 << 4, 235 << 4); in precalculate_color() 985 y = clamp(y, 16, 235); in precalculate_color() 986 cb = clamp(cb, 16, 240); in precalculate_color() [all …]
|
| /Linux-v5.15/sound/soc/codecs/ |
| D | cs4234.c | 451 .min = mclk / clamp(mclk / 30000, 256, 512), in cs4234_dai_rule_rate() 452 .max = mclk / clamp(mclk / 50000, 256, 512), in cs4234_dai_rule_rate() 455 .min = mclk / clamp(mclk / 60000, 128, 256), in cs4234_dai_rule_rate() 456 .max = mclk / clamp(mclk / 100000, 128, 256), in cs4234_dai_rule_rate()
|
| /Linux-v5.15/drivers/staging/media/atomisp/include/media/ |
| D | lm3554.h | 94 clamp(val, LM3554_MIN_PERCENT, LM3554_MAX_PERCENT)
|
| /Linux-v5.15/drivers/input/mouse/ |
| D | focaltech.c | 135 clamped_x = clamp(finger->x, 0U, priv->x_max); in focaltech_report_state() 136 clamped_y = clamp(finger->y, 0U, priv->y_max); in focaltech_report_state()
|
| /Linux-v5.15/drivers/iio/chemical/ |
| D | sgp40.c | 173 ticks16 = (u16)clamp(ticks, 0u, 65535u); /* clamp between 0 .. 100 %rH */ in sgp40_measure_resistance_raw() 178 ticks16 = (u16)clamp(ticks, 0u, 65535u); /* clamp between -45 .. +130 °C */ in sgp40_measure_resistance_raw()
|
| /Linux-v5.15/drivers/staging/media/zoran/ |
| D | zoran_card.c | 720 settings->hor_dcm = clamp(settings->hor_dcm, 1, 2); in zoran_check_jpg_settings() 724 settings->ver_dcm = clamp(settings->ver_dcm, 1, 2); in zoran_check_jpg_settings() 728 settings->tmp_dcm = clamp(settings->tmp_dcm, 1, 2); in zoran_check_jpg_settings() 733 settings->field_per_buff = clamp(settings->field_per_buff, 1, 2); in zoran_check_jpg_settings() 745 settings->img_width = clamp(settings->img_width, 0, (int)BUZ_MAX_WIDTH); in zoran_check_jpg_settings() 749 settings->img_height = clamp(settings->img_height, 0, BUZ_MAX_HEIGHT / 2); in zoran_check_jpg_settings()
|
| /Linux-v5.15/lib/ |
| D | dynamic_queue_limits.c | 101 limit = clamp(limit, dql->min_limit, dql->max_limit); in dql_completed()
|