Searched refs:clamp (Results 51 - 75 of 321) sorted by relevance

1234567891011>>

/linux-master/drivers/hid/
H A Dhid-udraw-ps3.c92 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 Dregulators-tegra20.c176 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 Dhantro_g1_vp8_dec.c147 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 Dvpu_helpers.c126 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 Dtxx9ndfmc.c302 hold = clamp(hold, 1, 15);
304 spw = clamp(spw, 1, 15);
/linux-master/drivers/media/pci/bt8xx/
H A Dbttv-vbi.c217 start = clamp(f->start[i], min_start, max_start);
221 f->count[i] = clamp(count, (s64) 1,
/linux-master/drivers/rtc/
H A Drtc-pcf8523.c362 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 Dmtk-cci-devfreq.c64 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 Dbpf_cubic.c22 #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 Dstats.c21 s8 ret_val = clamp(-value, 0, 33) * 3;
/linux-master/drivers/watchdog/
H A Djz4740_wdt.c171 jz4740_wdt->timeout = clamp(heartbeat,
/linux-master/drivers/slimbus/
H A Dmessaging.c217 code = clamp(code, 1, (int)ARRAY_SIZE(sizetocode));
/linux-master/sound/soc/codecs/
H A Dcs4234.c451 .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 Dclk-hfpll.c141 req->rate = clamp(req->rate, hd->min_rate, hd->max_rate);
/linux-master/net/handshake/
H A Dnetlink.c186 hn->hn_pending_max = clamp(tmp, 3UL, 50UL);
/linux-master/include/linux/
H A Dminmax.h11 * 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 Dpwm-lp3943.c118 period_ns = clamp(period_ns, (u64)LP3943_MIN_PERIOD, (u64)LP3943_MAX_PERIOD);
/linux-master/drivers/media/i2c/
H A Dmt9v032.c514 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 Ddynamic_queue_limits.c173 limit = clamp(limit, dql->min_limit, dql->max_limit);
/linux-master/drivers/hid/intel-ish-hid/ishtp/
H A Dloader.c176 fragment->fragment_tbl[i].length = clamp(ish_fw->size - offset, 0, fragment_size);
/linux-master/drivers/clk/meson/
H A Dsclk-div.c46 return clamp(div, 2, maxdiv);
/linux-master/drivers/media/common/v4l2-tpg/
H A Dv4l2-tpg-core.c575 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 Dstk1135.c608 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 Dradio-tea5777.c178 freq = clamp(tea->freq, bands[tea->band].rangelow,
398 tea->freq = clamp(tea->freq, rangelow,
H A Dtea575x.c170 return clamp(freq * 16, bands[tea->band].rangelow,
384 tea->freq = clamp(tea->freq, bands[i].rangelow,

Completed in 282 milliseconds

1234567891011>>