| /linux/drivers/staging/media/atomisp/pci/ |
| H A D | sh_css_frac.h | 34 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/arch/x86/kernel/ |
| H A D | check.c | 117 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 D | dell-wmi-led.c | 143 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/net/ethernet/wangxun/ngbe/ |
| H A D | ngbe_ethtool.c | 25 new_tx_count = clamp_t(u32, ring->tx_pending, WX_MIN_TXD, WX_MAX_TXD); in ngbe_set_ringparam() 28 new_rx_count = clamp_t(u32, ring->rx_pending, WX_MIN_RXD, WX_MAX_RXD); in ngbe_set_ringparam()
|
| /linux/drivers/power/supply/ |
| H A D | pm8916_lbc.c | 87 chg->charge_voltage_max = clamp_t(u32, chg->charge_voltage_max, in pm8916_lbc_charger_configure() 100 tmp = clamp_t(u32, chg->charge_current_max, in pm8916_lbc_charger_configure() 208 chg->charge_voltage_safe = clamp_t(u32, chg->charge_voltage_safe, in pm8916_lbc_charger_probe_dt() 223 chg->charge_current_safe = clamp_t(u32, chg->charge_current_safe, in pm8916_lbc_charger_probe_dt()
|
| /linux/drivers/clk/zynqmp/ |
| H A D | pll.c | 118 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/accel/ivpu/ |
| H A D | ivpu_hw_btrs.c | 109 hw->pll.min_ratio = clamp_t(u8, ivpu_pll_min_ratio, hw->pll.min_ratio, hw->pll.max_ratio); in ivpu_hw_btrs_freq_ratios_init() 110 hw->pll.max_ratio = clamp_t(u8, ivpu_pll_max_ratio, hw->pll.min_ratio, hw->pll.max_ratio); in ivpu_hw_btrs_freq_ratios_init() 111 hw->pll.pn_ratio = clamp_t(u8, hw->pll.pn_ratio, hw->pll.min_ratio, hw->pll.max_ratio); in ivpu_hw_btrs_freq_ratios_init() 634 u8 min_ratio = clamp_t(u8, cfg_min_ratio, vdev->hw->pll.min_ratio, cfg_max_ratio); in ivpu_hw_btrs_cfg_freq_set() 635 u8 pn_ratio = clamp_t(u8, vdev->hw->pll.pn_ratio, min_ratio, cfg_max_ratio); in ivpu_hw_btrs_cfg_freq_set() 668 return clamp_t(u32, freq_mhz / (PLL_REF_CLK_FREQ_MHZ / 2), 0, U8_MAX); in dpu_mhz_to_pll_ratio_lnl() 674 u8 cfg_max_ratio = clamp_t(u8, ratio, vdev->hw->pll.min_ratio, vdev->hw->pll.max_ratio); in ivpu_hw_btrs_cfg_max_freq_set() 682 u8 cfg_min_ratio = clamp_t(u8, ratio, vdev->hw->pll.min_ratio, vdev->hw->pll.max_ratio); in ivpu_hw_btrs_cfg_min_freq_set()
|
| /linux/drivers/media/platform/xilinx/ |
| H A D | xilinx-vip.c | 152 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 D | util.c | 140 db = clamp_t(s32, db, RTW89_MIN_DBM, RTW89_MAX_DBM); in rtw89_db_quarter_to_linear()
|
| /linux/sound/soc/sophgo/ |
| H A D | cv1800b-sound-adc.c | 252 u32 v_left = clamp_t(u32, ucontrol->value.integer.value[0], 0, 24); in cv1800b_adc_volume_set() 253 u32 v_right = clamp_t(u32, ucontrol->value.integer.value[1], 0, 24); in cv1800b_adc_volume_set()
|
| /linux/arch/powerpc/platforms/85xx/ |
| H A D | p1022_rdk.c | 76 pxclk = clamp_t(u32, pxclk, 2, 255); in p1022rdk_set_pixel_clock()
|
| H A D | t1042rdb_diu.c | 110 pxclk = clamp_t(u32, pxclk, 2, 255); in t1042rdb_set_pixel_clock()
|
| /linux/lib/ |
| H A D | notifier-error-inject.c | 8 *(int *)data = clamp_t(int, val, -MAX_ERRNO, 0); in debugfs_errno_set()
|
| /linux/drivers/watchdog/ |
| H A D | stmp3xxx_rtc_wdt.c | 97 stmp3xxx_wdd.timeout = clamp_t(unsigned, heartbeat, 1, STMP3XXX_MAX_TIMEOUT); in stmp3xxx_wdt_probe()
|
| /linux/drivers/media/test-drivers/vimc/ |
| H A D | vimc-scaler.c | 178 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()
|
| /linux/drivers/iio/magnetometer/ |
| H A D | ak8975.c | 789 *val = clamp_t(s16, le16_to_cpu(rval), -def->range, def->range); in ak8975_read_axis() 891 data->scan.channels[0] = clamp_t(s16, le16_to_cpu(fval[0]), -def->range, def->range); in ak8975_fill_buffer() 892 data->scan.channels[1] = clamp_t(s16, le16_to_cpu(fval[1]), -def->range, def->range); in ak8975_fill_buffer() 893 data->scan.channels[2] = clamp_t(s16, le16_to_cpu(fval[2]), -def->range, def->range); in ak8975_fill_buffer()
|
| /linux/drivers/clk/imx/ |
| H A D | clk-pll14xx.c | 132 return clamp_t(short, kdiv, KDIV_MIN, KDIV_MAX); in pll1443x_calc_kdiv() 603 delta_k = (s16)clamp_t(s64, val, KDIV_MIN, KDIV_MAX); in pll_delta_k_set() 611 kdiv = (s16)clamp_t(s32, (s32)kdiv + delta_k, KDIV_MIN, KDIV_MAX); in pll_delta_k_set()
|
| /linux/mm/ |
| H A D | dmapool_test.c | 38 return clamp_t(int, (PAGE_SIZE / size) * 512, 1024, 8192); in nr_blocks()
|
| /linux/drivers/net/wireless/realtek/rtw88/ |
| H A D | sar.c | 55 return (s8)clamp_t(s32, tmp, -max - 1, max) - base; in rtw_sar_to_phy()
|
| /linux/drivers/media/usb/stk1160/ |
| H A D | stk1160-v4l.c | 381 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 D | imx-media-csc-scaler.c | 370 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/drivers/media/test-drivers/vivid/ |
| H A D | vivid-radio-common.c | 165 freq = clamp_t(u32, vf->frequency, vivid_radio_bands[band].rangelow, in vivid_radio_s_frequency()
|
| /linux/drivers/powercap/ |
| H A D | arm_scmi_powercap.c | 111 *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()
|
| /linux/drivers/media/i2c/ |
| H A D | mt9p031.c | 598 width = clamp_t(unsigned int, ALIGN(format->format.width, 2), in mt9p031_set_format() 602 height = clamp_t(unsigned int, ALIGN(format->format.height, 2), in mt9p031_set_format() 663 rect.width = clamp_t(unsigned int, ALIGN(sel->r.width, 2), in mt9p031_set_selection() 666 rect.height = clamp_t(unsigned int, ALIGN(sel->r.height, 2), in mt9p031_set_selection()
|
| /linux/drivers/media/platform/ti/omap3isp/ |
| H A D | ispccdc.c | 1995 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()
|