Home
last modified time | relevance | path

Searched refs:clamp (Results 1 – 25 of 183) sorted by relevance

12345678

/drivers/macintosh/
Dwindfarm_cpufreq_clamp.c68 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()
/drivers/staging/media/atomisp/pci/
Dsh_css_param_shading.c132 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()
/drivers/clk/
Dclk-plldig.c134 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()
/drivers/media/platform/vsp1/
Dvsp1_uds.c181 fmt->width = clamp(fmt->width, UDS_MIN_SIZE, UDS_MAX_SIZE); in uds_try_format()
182 fmt->height = clamp(fmt->height, UDS_MIN_SIZE, UDS_MAX_SIZE); in uds_try_format()
192 fmt->width = clamp(fmt->width, minimum, maximum); in uds_try_format()
194 fmt->height = clamp(fmt->height, minimum, maximum); in uds_try_format()
Dvsp1_brx.c128 fmt->width = clamp(fmt->width, BRX_MIN_SIZE, BRX_MAX_SIZE); in brx_try_format()
129 fmt->height = clamp(fmt->height, BRX_MIN_SIZE, BRX_MAX_SIZE); in brx_try_format()
Dvsp1_sru.c181 fmt->width = clamp(fmt->width, SRU_MIN_SIZE, SRU_MAX_SIZE); in sru_try_format()
182 fmt->height = clamp(fmt->height, SRU_MIN_SIZE, SRU_MAX_SIZE); in sru_try_format()
/drivers/media/platform/omap3isp/
Dispccdc.c536 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 …]
Dispccdc.h142 struct omap3isp_ccdc_bclamp clamp; member
/drivers/thermal/intel/
Dintel_powerclamp.c111 duration = clamp(new_duration, 6ul, 25ul); in duration_set()
159 window_size = clamp(new_window_size, 2ul, 10ul); in window_size_set()
533 set_target_ratio = clamp(set_target_ratio, 0U, MAX_TARGET_RATIO - 1); in start_power_clamp()
629 new_target_ratio = clamp(new_target_ratio, 0UL, in powerclamp_set_cur_state()
/drivers/media/common/v4l2-tpg/
Dv4l2-tpg-core.c539 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 …]
/drivers/thermal/
Dsprd_thermal.c181 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()
/drivers/hid/
Dhid-elecom.c47 nbuttons = clamp(nbuttons, 0, MOUSE_BUTTONS_MAX); in mouse_button_fixup()
Dhid-udraw-ps3.c92 axis = clamp(axis, in clamp_accel()
233 level = clamp(data[13] - PRESSURE_OFFSET, in udraw_raw_event()
/drivers/staging/media/zoran/
Dzoran_card.c719 settings->hor_dcm = clamp(settings->hor_dcm, 1, 2); in zoran_check_jpg_settings()
723 settings->ver_dcm = clamp(settings->ver_dcm, 1, 2); in zoran_check_jpg_settings()
727 settings->tmp_dcm = clamp(settings->tmp_dcm, 1, 2); in zoran_check_jpg_settings()
732 settings->field_per_buff = clamp(settings->field_per_buff, 1, 2); in zoran_check_jpg_settings()
744 settings->img_width = clamp(settings->img_width, 0, (int)BUZ_MAX_WIDTH); in zoran_check_jpg_settings()
748 settings->img_height = clamp(settings->img_height, 0, BUZ_MAX_HEIGHT / 2); in zoran_check_jpg_settings()
/drivers/clk/renesas/
Drcar-gen2-cpg.c78 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()
/drivers/input/mouse/
Dfocaltech.c135 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()
/drivers/gpu/drm/i915/display/
Dintel_dp_aux_backlight.c155 f = clamp(DIV_ROUND_CLOSEST(fxp, 1 << pn), 1, 255); in intel_dp_aux_set_pwm_freq()
299 f = clamp(DIV_ROUND_CLOSEST(fxp, 1 << pn), 1, 255); in intel_dp_aux_calc_max_backlight()
Dintel_panel.c479 source_val = clamp(source_val, source_min, source_max); in scale()
499 hw_level = clamp(hw_level, panel->backlight.min, panel->backlight.max); in clamp_user_to_hw()
1668 panel->backlight.level = clamp(val, panel->backlight.min, in lpt_setup_backlight()
1696 panel->backlight.level = clamp(val, panel->backlight.min, in pch_setup_backlight()
1737 panel->backlight.level = clamp(val, panel->backlight.min, in i9xx_setup_backlight()
1771 panel->backlight.level = clamp(val, panel->backlight.min, in i965_setup_backlight()
1804 panel->backlight.level = clamp(val, panel->backlight.min, in vlv_setup_backlight()
1846 panel->backlight.level = clamp(val, panel->backlight.min, in bxt_setup_backlight()
1886 panel->backlight.level = clamp(val, panel->backlight.min, in cnp_setup_backlight()
1929 panel->backlight.level = clamp(level, panel->backlight.min, in pwm_setup_backlight()
/drivers/rtc/
Drtc-pcf8523.c322 reg_m0 = clamp(DIV_ROUND_CLOSEST(offset, 4340), -64L, 63L); in pcf8523_rtc_set_offset()
323 reg_m1 = clamp(DIV_ROUND_CLOSEST(offset, 4069), -64L, 63L); in pcf8523_rtc_set_offset()
/drivers/staging/media/atomisp/include/media/
Dlm3554.h94 clamp(val, LM3554_MIN_PERCENT, LM3554_MAX_PERCENT)
/drivers/media/platform/sunxi/sun4i-csi/
Dsun4i_v4l2.c123 pix->width = clamp(width, _fmt->hsub, CSI_MAX_WIDTH); in _sun4i_csi_try_fmt()
124 pix->height = clamp(height, _fmt->vsub, CSI_MAX_HEIGHT); in _sun4i_csi_try_fmt()
/drivers/gpu/ipu-v3/
Dipu-di.c432 div = clamp(div, 1U, 255U); in ipu_di_config_clock()
449 div = clamp(div, 1U, 255U); in ipu_di_config_clock()
473 div = clamp(div, 1U, 255U); in ipu_di_config_clock()
/drivers/leds/
Dleds-lm3533.c215 t = clamp(t, LM3533_LED_DELAY3_TMIN, LM3533_LED_DELAY3_TMAX); in lm3533_led_get_hw_delay()
221 t = clamp(t, LM3533_LED_DELAY2_TMIN, LM3533_LED_DELAY2_TMAX); in lm3533_led_get_hw_delay()
227 t = clamp(t, LM3533_LED_DELAY1_TMIN, LM3533_LED_DELAY1_TMAX); in lm3533_led_get_hw_delay()
/drivers/extcon/
Dextcon-arizona.c141 bool clamp) in arizona_extcon_hp_clamp() argument
157 if (clamp) { in arizona_extcon_hp_clamp()
175 if (clamp) in arizona_extcon_hp_clamp()
182 arizona->hpdet_clamp = clamp; in arizona_extcon_hp_clamp()
185 if (clamp) { in arizona_extcon_hp_clamp()
211 if (!clamp) { in arizona_extcon_hp_clamp()
/drivers/media/platform/xilinx/
Dxilinx-dma.c567 pix->width = clamp(width, min_width, max_width) / info->bpp; in __xvip_dma_try_format()
568 pix->height = clamp(pix->height, XVIP_DMA_MIN_HEIGHT, in __xvip_dma_try_format()
579 pix->bytesperline = clamp(bpl, min_bpl, max_bpl); in __xvip_dma_try_format()

12345678