/linux-master/drivers/hid/ |
H A D | hid-udraw-ps3.c | 92 axis = clamp(axis, 233 level = clamp(data[13] - PRESSURE_OFFSET, 368 /* 1G accel is reported as ~256, so clamp to 2G */
|
/linux-master/drivers/soc/tegra/ |
H A D | regulators-tegra20.c | 176 core_min_uV = clamp(tegra20_core_nominal_uV(), 316 cpu_min_uV = clamp(tegra20_cpu_nominal_uV(),
|
/linux-master/drivers/media/platform/verisilicon/ |
H A D | hantro_g1_vp8_dec.c | 147 u32 lf_level = clamp(lf->level + seg->lf_update[i], 188 u32 quant = clamp(q->y_ac_qi + seg->quant_update[i],
|
/linux-master/drivers/media/platform/amphion/ |
H A D | vpu_helpers.c | 126 width = clamp(width, res->min_width, res->max_width); 144 height = clamp(height, res->min_height, res->max_height);
|
/linux-master/drivers/mtd/nand/raw/ |
H A D | txx9ndfmc.c | 302 hold = clamp(hold, 1, 15); 304 spw = clamp(spw, 1, 15);
|
/linux-master/drivers/media/pci/bt8xx/ |
H A D | bttv-vbi.c | 217 start = clamp(f->start[i], min_start, max_start); 221 f->count[i] = clamp(count, (s64) 1,
|
/linux-master/drivers/rtc/ |
H A D | rtc-pcf8523.c | 362 reg_m0 = clamp(DIV_ROUND_CLOSEST(offset, 4340), -64L, 63L); 363 reg_m1 = clamp(DIV_ROUND_CLOSEST(offset, 4069), -64L, 63L);
|
/linux-master/drivers/devfreq/ |
H A D | mtk-cci-devfreq.c | 64 new_vsram = clamp(new_voltage + soc_data->min_volt_shift, 69 vsram = clamp(pre_voltage + soc_data->max_volt_shift,
|
/linux-master/tools/testing/selftests/bpf/progs/ |
H A D | bpf_cubic.c | 22 #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi) macro 47 #define HYSTART_DELAY_THRESH(x) clamp(x, HYSTART_DELAY_MIN, HYSTART_DELAY_MAX)
|
/linux-master/drivers/net/wireless/realtek/rtlwifi/ |
H A D | stats.c | 21 s8 ret_val = clamp(-value, 0, 33) * 3;
|
/linux-master/drivers/watchdog/ |
H A D | jz4740_wdt.c | 171 jz4740_wdt->timeout = clamp(heartbeat,
|
/linux-master/drivers/slimbus/ |
H A D | messaging.c | 217 code = clamp(code, 1, (int)ARRAY_SIZE(sizetocode));
|
/linux-master/sound/soc/codecs/ |
H A D | cs4234.c | 451 .min = mclk / clamp(mclk / 30000, 256, 512), 452 .max = mclk / clamp(mclk / 50000, 256, 512), 455 .min = mclk / clamp(mclk / 60000, 128, 256), 456 .max = mclk / clamp(mclk / 100000, 128, 256),
|
/linux-master/drivers/clk/qcom/ |
H A D | clk-hfpll.c | 141 req->rate = clamp(req->rate, hd->min_rate, hd->max_rate);
|
/linux-master/net/handshake/ |
H A D | netlink.c | 186 hn->hn_pending_max = clamp(tmp, 3UL, 50UL);
|
/linux-master/include/linux/ |
H A D | minmax.h | 11 * min()/max()/clamp() macros must accomplish three things: 69 "clamp() low limit " #lo " greater than high limit " #hi); \ 70 static_assert(__types_ok(val, lo), "clamp() 'lo' signedness error"); \ 71 static_assert(__types_ok(val, hi), "clamp() 'hi' signedness error"); \ 138 * clamp - return a value clamped to a given range with strict typechecking 146 #define clamp(val, lo, hi) __careful_clamp(val, lo, hi) macro 152 * Or not use min/max/clamp at all, of course.
|
/linux-master/drivers/pwm/ |
H A D | pwm-lp3943.c | 118 period_ns = clamp(period_ns, (u64)LP3943_MIN_PERIOD, (u64)LP3943_MAX_PERIOD);
|
/linux-master/drivers/media/i2c/ |
H A D | mt9v032.c | 514 width = clamp(ALIGN(format->format.width, 2), 518 height = clamp(ALIGN(format->format.height, 2), 571 rect.left = clamp(ALIGN(sel->r.left + 1, 2) - 1, 574 rect.top = clamp(ALIGN(sel->r.top + 1, 2) - 1,
|
/linux-master/lib/ |
H A D | dynamic_queue_limits.c | 173 limit = clamp(limit, dql->min_limit, dql->max_limit);
|
/linux-master/drivers/hid/intel-ish-hid/ishtp/ |
H A D | loader.c | 176 fragment->fragment_tbl[i].length = clamp(ish_fw->size - offset, 0, fragment_size);
|
/linux-master/drivers/clk/meson/ |
H A D | sclk-div.c | 46 return clamp(div, 2, maxdiv);
|
/linux-master/drivers/media/common/v4l2-tpg/ |
H A D | v4l2-tpg-core.c | 575 v = clamp(v, 0, 0xff0); 581 v = clamp(v, 0, 0xff0); 767 *r = clamp(*r >> 12, 0, 0xff0); 768 *g = clamp(*g >> 12, 0, 0xff0); 769 *b = clamp(*b >> 12, 0, 0xff0); 955 r = clamp(r, 16 << 4, 235 << 4); 956 g = clamp(g, 16 << 4, 235 << 4); 957 b = clamp(b, 16 << 4, 235 << 4); 1015 * and B' values outside the range [0-1]. So do not clamp 1021 y = clamp( [all...] |
/linux-master/drivers/media/usb/gspca/ |
H A D | stk1135.c | 608 fmt->fmt.pix.width = clamp(fmt->fmt.pix.width, 32U, 1280U); 609 fmt->fmt.pix.height = clamp(fmt->fmt.pix.height, 32U, 1024U);
|
/linux-master/drivers/media/radio/ |
H A D | radio-tea5777.c | 178 freq = clamp(tea->freq, bands[tea->band].rangelow, 398 tea->freq = clamp(tea->freq, rangelow,
|
H A D | tea575x.c | 170 return clamp(freq * 16, bands[tea->band].rangelow, 384 tea->freq = clamp(tea->freq, bands[i].rangelow,
|