Home
last modified time | relevance | path

Searched refs:clamp_t (Results 1 – 25 of 159) sorted by relevance

1234567

/linux/drivers/staging/media/atomisp/pci/
H A Dsh_css_frac.h34 return clamp_t(int, v, sISP_VAL_MIN, sISP_VAL_MAX); in sDIGIT_FITTING()
45 return clamp_t(unsigned int, v, uISP_VAL_MIN, uISP_VAL_MAX); in uDIGIT_FITTING()
/linux/drivers/media/platform/renesas/vsp1/
H A Dvsp1_uif.c153 sel->r.left = clamp_t(unsigned int, sel->r.left, 0, format->width - 1); in uif_set_selection()
154 sel->r.top = clamp_t(unsigned int, sel->r.top, 0, format->height - 1); in uif_set_selection()
155 sel->r.width = clamp_t(unsigned int, sel->r.width, UIF_MIN_SIZE, in uif_set_selection()
157 sel->r.height = clamp_t(unsigned int, sel->r.height, UIF_MIN_SIZE, in uif_set_selection()
/linux/drivers/media/dvb-frontends/
H A Dts2020.c358 gain1 = clamp_t(long, gain1, 0, 15); in ts2020_read_tuner_gain()
359 gain2 = clamp_t(long, gain2, 0, 13); in ts2020_read_tuner_gain()
360 v_agc = clamp_t(long, v_agc, 400, 1100); in ts2020_read_tuner_gain()
375 gain1 = clamp_t(long, gain1, 0, 15); in ts2020_read_tuner_gain()
376 gain2 = clamp_t(long, gain2, 2, 16); in ts2020_read_tuner_gain()
377 gain3 = clamp_t(long, gain3, 0, 6); in ts2020_read_tuner_gain()
378 v_agc = clamp_t(long, v_agc, 600, 1600); in ts2020_read_tuner_gain()
/linux/arch/x86/kernel/
H A Dcheck.c117 start = clamp_t(phys_addr_t, round_up(start, PAGE_SIZE), in setup_bios_corruption_check()
119 end = clamp_t(phys_addr_t, round_down(end, PAGE_SIZE), in setup_bios_corruption_check()
/linux/drivers/platform/x86/dell/
H A Ddell-wmi-led.c143 on_eighths = clamp_t(unsigned long, on_eighths, 1, 255); in dell_led_blink()
147 off_eighths = clamp_t(unsigned long, off_eighths, 1, 255); in dell_led_blink()
/linux/drivers/clk/zynqmp/
H A Dpll.c118 fbdiv = clamp_t(u32, fbdiv, PLL_FBDIV_MIN, PLL_FBDIV_MAX); in zynqmp_pll_determine_rate()
192 m = clamp_t(u32, m, (PLL_FBDIV_MIN), (PLL_FBDIV_MAX)); in zynqmp_pll_set_rate()
209 fbdiv = clamp_t(u32, fbdiv, PLL_FBDIV_MIN, PLL_FBDIV_MAX); in zynqmp_pll_set_rate()
/linux/drivers/net/ethernet/wangxun/ngbe/
H A Dngbe_ethtool.c57 new_tx_count = clamp_t(u32, ring->tx_pending, WX_MIN_TXD, WX_MAX_TXD); in ngbe_set_ringparam()
60 new_rx_count = clamp_t(u32, ring->rx_pending, WX_MIN_RXD, WX_MAX_RXD); in ngbe_set_ringparam()
/linux/drivers/media/platform/xilinx/
H A Dxilinx-vip.c152 format->width = clamp_t(unsigned int, fmt->format.width, in xvip_set_format_size()
154 format->height = clamp_t(unsigned int, fmt->format.height, in xvip_set_format_size()
/linux/drivers/net/wireless/realtek/rtw89/
H A Dutil.c140 db = clamp_t(s32, db, RTW89_MIN_DBM, RTW89_MAX_DBM); in rtw89_db_quarter_to_linear()
/linux/arch/powerpc/platforms/85xx/
H A Dp1022_rdk.c76 pxclk = clamp_t(u32, pxclk, 2, 255); in p1022rdk_set_pixel_clock()
H A Dt1042rdb_diu.c110 pxclk = clamp_t(u32, pxclk, 2, 255); in t1042rdb_set_pixel_clock()
/linux/drivers/watchdog/
H A Dstm32_iwdg.c108 tout = clamp_t(unsigned int, wdd->timeout, in stm32_iwdg_start()
110 ptot = clamp_t(unsigned int, tout - wdd->pretimeout, in stm32_iwdg_start()
H A Dstmp3xxx_rtc_wdt.c97 stmp3xxx_wdd.timeout = clamp_t(unsigned, heartbeat, 1, STMP3XXX_MAX_TIMEOUT); in stmp3xxx_wdt_probe()
/linux/lib/
H A Dnotifier-error-inject.c8 *(int *)data = clamp_t(int, val, -MAX_ERRNO, 0); in debugfs_errno_set()
/linux/drivers/thermal/
H A Dairoha_thermal.c264 high = clamp_t(int, high, RAW_TO_TEMP(priv, 0), in airoha_thermal_set_trips()
276 low = clamp_t(int, high, RAW_TO_TEMP(priv, 0), in airoha_thermal_set_trips()
/linux/drivers/media/test-drivers/vimc/
H A Dvimc-scaler.c178 fmt->width = clamp_t(u32, format->format.width, VIMC_FRAME_MIN_WIDTH, in vimc_scaler_set_fmt()
180 fmt->height = clamp_t(u32, format->format.height, VIMC_FRAME_MIN_HEIGHT, in vimc_scaler_set_fmt()
H A Dvimc-sensor.c125 fmt->width = clamp_t(u32, fmt->width, VIMC_FRAME_MIN_WIDTH, in vimc_sensor_adjust_fmt()
127 fmt->height = clamp_t(u32, fmt->height, VIMC_FRAME_MIN_HEIGHT, in vimc_sensor_adjust_fmt()
/linux/drivers/media/usb/stk1160/
H A Dstk1160-v4l.c381 width = clamp_t(unsigned int, f->fmt.pix.width, in stk1160_try_fmt()
383 height = clamp_t(unsigned int, f->fmt.pix.height, in stk1160_try_fmt()
663 *nbuffers = clamp_t(unsigned int, *nbuffers, in queue_setup()
/linux/drivers/staging/media/imx/
H A Dimx-media-csc-scaler.c370 s->r.width = clamp_t(unsigned int, s->r.width, 8, in ipu_csc_scaler_s_selection()
372 s->r.height = clamp_t(unsigned int, s->r.height, 1, in ipu_csc_scaler_s_selection()
374 s->r.left = clamp_t(unsigned int, s->r.left, 0, in ipu_csc_scaler_s_selection()
376 s->r.top = clamp_t(unsigned int, s->r.top, 0, in ipu_csc_scaler_s_selection()
/linux/mm/
H A Ddmapool_test.c38 return clamp_t(int, (PAGE_SIZE / size) * 512, 1024, 8192); in nr_blocks()
/linux/drivers/media/platform/nxp/imx8-isi/
H A Dimx8-isi-crossbar.c273 fmt->format.width = clamp_t(unsigned int, fmt->format.width, in mxc_isi_crossbar_set_fmt()
275 fmt->format.height = clamp_t(unsigned int, fmt->format.height, in mxc_isi_crossbar_set_fmt()
/linux/drivers/net/wireless/realtek/rtw88/
H A Dsar.c55 return (s8)clamp_t(s32, tmp, -max - 1, max) - base; in rtw_sar_to_phy()
/linux/drivers/media/platform/ti/omap3isp/
H A Dispccdc.c1995 fmt->width = clamp_t(u32, width, 32, 4096); in ccdc_try_format()
1996 fmt->height = clamp_t(u32, height, 32, 4096); in ccdc_try_format()
2066 fmt->width = clamp_t(u32, width, 32, fmt->width); in ccdc_try_format()
2067 fmt->height = clamp_t(u32, height, 32, fmt->height - 1); in ccdc_try_format()
2099 crop->left = clamp_t(u32, crop->left, 0, sink->width - CCDC_MIN_WIDTH); in ccdc_try_crop()
2100 crop->top = clamp_t(u32, crop->top, 0, sink->height - CCDC_MIN_HEIGHT); in ccdc_try_crop()
2108 crop->width = clamp_t(u32, crop->width, CCDC_MIN_WIDTH, max_width) in ccdc_try_crop()
2110 crop->height = clamp_t(u32, crop->height, CCDC_MIN_HEIGHT, in ccdc_try_crop()
/linux/drivers/net/ethernet/marvell/octeontx2/nic/
H A Dotx2_ethtool.c437 tx_count = clamp_t(u32, ring->tx_pending, in otx2_set_ringparam()
519 ec->rx_coalesce_usecs = clamp_t(u32, ec->rx_coalesce_usecs, in otx2_set_coalesce()
521 ec->tx_coalesce_usecs = clamp_t(u32, ec->tx_coalesce_usecs, in otx2_set_coalesce()
538 ec->rx_max_coalesced_frames = clamp_t(u32, ec->rx_max_coalesced_frames, in otx2_set_coalesce()
540 ec->tx_max_coalesced_frames = clamp_t(u32, ec->tx_max_coalesced_frames, in otx2_set_coalesce()
/linux/drivers/powercap/
H A Darm_scmi_powercap.c111 *norm = clamp_t(u32, val, spz->info->min_power_cap, in scmi_powercap_normalize_cap()
162 *norm = clamp_t(u32, time_us, spz->info->min_pai, spz->info->max_pai); in scmi_powercap_normalize_time()

1234567