Searched refs:clamp_t (Results 1 - 25 of 235) sorted by relevance

12345678910

/linux-master/arch/x86/kernel/
H A Dcheck.c117 start = clamp_t(phys_addr_t, round_up(start, PAGE_SIZE),
119 end = clamp_t(phys_addr_t, round_down(end, PAGE_SIZE),
/linux-master/drivers/platform/x86/dell/
H A Ddell-wmi-led.c143 on_eighths = clamp_t(unsigned long, on_eighths, 1, 255);
147 off_eighths = clamp_t(unsigned long, off_eighths, 1, 255);
/linux-master/drivers/net/ethernet/wangxun/txgbe/
H A Dtxgbe_ethtool.c24 new_tx_count = clamp_t(u32, ring->tx_pending, WX_MIN_TXD, WX_MAX_TXD);
27 new_rx_count = clamp_t(u32, ring->rx_pending, WX_MIN_RXD, WX_MAX_RXD);
/linux-master/drivers/media/platform/renesas/vsp1/
H A Dvsp1_uif.c155 sel->r.left = clamp_t(unsigned int, sel->r.left, 0, format->width - 1);
156 sel->r.top = clamp_t(unsigned int, sel->r.top, 0, format->height - 1);
157 sel->r.width = clamp_t(unsigned int, sel->r.width, UIF_MIN_SIZE,
159 sel->r.height = clamp_t(unsigned int, sel->r.height, UIF_MIN_SIZE,
H A Dvsp1_hsit.c94 format->width = clamp_t(unsigned int, fmt->format.width,
96 format->height = clamp_t(unsigned int, fmt->format.height,
H A Dvsp1_rwpf.c95 format->width = clamp_t(unsigned int, fmt->format.width,
97 format->height = clamp_t(unsigned int, fmt->format.height,
/linux-master/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);
60 new_rx_count = clamp_t(u32, ring->rx_pending, WX_MIN_RXD, WX_MAX_RXD);
/linux-master/arch/powerpc/platforms/85xx/
H A Dt1042rdb_diu.c110 pxclk = clamp_t(u32, pxclk, 2, 255);
H A Dp1022_rdk.c76 pxclk = clamp_t(u32, pxclk, 2, 255);
/linux-master/lib/
H A Dnotifier-error-inject.c8 *(int *)data = clamp_t(int, val, -MAX_ERRNO, 0);
/linux-master/drivers/power/supply/
H A Dpm8916_lbc.c88 chg->charge_voltage_max = clamp_t(u32, chg->charge_voltage_max,
101 tmp = clamp_t(u32, chg->charge_current_max,
209 chg->charge_voltage_safe = clamp_t(u32, chg->charge_voltage_safe,
224 chg->charge_current_safe = clamp_t(u32, chg->charge_current_safe,
/linux-master/drivers/clk/zynqmp/
H A Dpll.c119 fbdiv = clamp_t(u32, fbdiv, PLL_FBDIV_MIN, PLL_FBDIV_MAX);
193 m = clamp_t(u32, m, (PLL_FBDIV_MIN), (PLL_FBDIV_MAX));
210 fbdiv = clamp_t(u32, fbdiv, PLL_FBDIV_MIN, PLL_FBDIV_MAX);
/linux-master/drivers/media/dvb-frontends/
H A Dts2020.c358 gain1 = clamp_t(long, gain1, 0, 15);
359 gain2 = clamp_t(long, gain2, 0, 13);
360 v_agc = clamp_t(long, v_agc, 400, 1100);
375 gain1 = clamp_t(long, gain1, 0, 15);
376 gain2 = clamp_t(long, gain2, 2, 16);
377 gain3 = clamp_t(long, gain3, 0, 6);
378 v_agc = clamp_t(long, v_agc, 600, 1600);
/linux-master/drivers/staging/media/omap4iss/
H A Diss_ipipeif.c401 fmt->width = clamp_t(u32, width, 1, 8192);
402 fmt->height = clamp_t(u32, height, 1, 8192);
416 fmt->width = clamp_t(u32, width, 32, (fmt->width + 15) & ~15);
418 fmt->height = clamp_t(u32, height, 32, fmt->height);
427 fmt->width = clamp_t(u32, width, 32, fmt->width);
428 fmt->height = clamp_t(u32, height, 32, fmt->height);
H A Diss_ipipe.c219 fmt->width = clamp_t(u32, width, 1, 8192);
220 fmt->height = clamp_t(u32, height, 1, 8192);
230 fmt->width = clamp_t(u32, width, 32, fmt->width);
231 fmt->height = clamp_t(u32, height, 32, fmt->height);
/linux-master/drivers/watchdog/
H A Dstmp3xxx_rtc_wdt.c97 stmp3xxx_wdd.timeout = clamp_t(unsigned, heartbeat, 1, STMP3XXX_MAX_TIMEOUT);
/linux-master/include/linux/
H A Dminmax.h215 * clamp_t - return a value clamped to a given range using a given type
224 #define clamp_t(type, val, lo, hi) __careful_clamp((type)(val), (type)(lo), (type)(hi)) macro
237 #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
/linux-master/drivers/media/platform/xilinx/
H A Dxilinx-vip.c152 format->width = clamp_t(unsigned int, fmt->format.width,
154 format->height = clamp_t(unsigned int, fmt->format.height,
/linux-master/drivers/staging/media/atomisp/pci/
H A Datomisp_csi2.c104 actual_ffmt->width = clamp_t(u32, ffmt->width,
107 actual_ffmt->height = clamp_t(u32, ffmt->height,
/linux-master/drivers/media/platform/renesas/rzg2l-cru/
H A Drzg2l-ip.c121 sink_format->width = clamp_t(u32, fmt->format.width,
123 sink_format->height = clamp_t(u32, fmt->format.height,
/linux-master/drivers/media/platform/ti/omap3isp/
H A Dispresizer.c812 ratio->vert = clamp_t(unsigned int, ratio->vert,
883 ratio->horz = clamp_t(unsigned int, ratio->horz,
1202 crop->width = clamp_t(u32, crop->width, min_width, max_width);
1203 crop->height = clamp_t(u32, crop->height, min_height, max_height);
1206 crop->left = clamp_t(u32, crop->left, 0, sink->width - MIN_IN_WIDTH);
1207 crop->width = clamp_t(u32, crop->width, MIN_IN_WIDTH,
1209 crop->top = clamp_t(u32, crop->top, 0, sink->height - MIN_IN_HEIGHT);
1210 crop->height = clamp_t(u32, crop->height, MIN_IN_HEIGHT,
1392 fmt->width = clamp_t(u32, fmt->width, MIN_IN_WIDTH,
1394 fmt->height = clamp_t(u3
[all...]
/linux-master/drivers/media/test-drivers/vivid/
H A Dvivid-radio-common.c165 freq = clamp_t(u32, vf->frequency, vivid_radio_bands[band].rangelow,
/linux-master/drivers/net/wireless/realtek/rtw88/
H A Dsar.c55 return (s8)clamp_t(s32, tmp, -max - 1, max) - base;
/linux-master/drivers/gpu/drm/vboxvideo/
H A Dvbox_main.c149 vbox->num_crtcs = clamp_t(u32, vbox->num_crtcs, 1, VBOX_MAX_SCREENS);
/linux-master/mm/
H A Ddmapool_test.c37 return clamp_t(int, (PAGE_SIZE / size) * 512, 1024, 8192);

Completed in 198 milliseconds

12345678910