Home
last modified time | relevance | path

Searched refs:max_val (Results 1 – 25 of 26) sorted by relevance

12

/drivers/clk/ti/
Ddivider.c43 u32 max_val; in _setup_mask() local
47 max_val = 0; in _setup_mask()
50 if (clkt->val > max_val) in _setup_mask()
51 max_val = clkt->val; in _setup_mask()
53 max_val = divider->max; in _setup_mask()
57 max_val--; in _setup_mask()
61 mask = fls(max_val) - 1; in _setup_mask()
63 mask = max_val; in _setup_mask()
/drivers/hwmon/
Dtmp513.c245 int regval, max_val; in tmp51x_set_value() local
256 max_val = U16_MAX >> tmp51x_get_pga_shift(data); in tmp51x_set_value()
257 regval = clamp_val(val, -max_val, max_val); in tmp51x_set_value()
262 max_val = (data->vbus_range_uvolt == TMP51X_VBUS_RANGE_32V) ? in tmp51x_set_value()
265 val = clamp_val(DIV_ROUND_CLOSEST(val, 4), 0, max_val); in tmp51x_set_value()
/drivers/gpu/host1x/
Dsyncpt.h34 atomic_t max_val; member
97 max = atomic_read(&sp->max_val); in host1x_syncpt_idle()
Dsyncpt.c128 return (u32)atomic_add_return(incrs, &sp->max_val); in host1x_syncpt_incr_max()
393 atomic_set(&sp->max_val, host1x_syncpt_read(sp)); in syncpt_release()
445 return (u32)atomic_read(&sp->max_val); in host1x_syncpt_read_max()
/drivers/iio/dac/
Dad5360.c320 int max_val = (1 << chan->scan_type.realbits); in ad5360_write_raw() local
325 if (val >= max_val || val < 0) in ad5360_write_raw()
332 if (val >= max_val || val < 0) in ad5360_write_raw()
339 if (val >= max_val || val < 0) in ad5360_write_raw()
346 if (val <= -max_val || val > 0) in ad5360_write_raw()
Dad5421.c359 const unsigned int max_val = 1 << 16; in ad5421_write_raw() local
363 if (val >= max_val || val < 0) in ad5421_write_raw()
369 if (val >= max_val || val < 0) in ad5421_write_raw()
374 if (val >= max_val || val < 0) in ad5421_write_raw()
Dad5380.c178 const unsigned int max_val = (1 << chan->scan_type.realbits); in ad5380_write_raw() local
184 if (val >= max_val || val < 0) in ad5380_write_raw()
192 if (val >= max_val || val < 0) in ad5380_write_raw()
Dad5764.c187 const int max_val = (1 << chan->scan_type.realbits); in ad5764_write_raw() local
192 if (val >= max_val || val < 0) in ad5764_write_raw()
Dad5766.c267 const int max_val = GENMASK(chan->scan_type.realbits - 1, 0); in ad5766_write_raw() local
269 if (val > max_val || val < 0) in ad5766_write_raw()
/drivers/net/wireless/broadcom/b43/
Dphy_g.h79 u8 max_val; member
100 u8 max_val; member
Dphy_g.c116 list->max_val = 9; in generate_rfatt_list()
124 list->max_val = 14; in generate_rfatt_list()
131 list->max_val = 9; in generate_rfatt_list()
152 list->max_val = 8; in generate_bbatt_list()
2777 const int rf_max = lo->rfatt_list.max_val; in b43_put_attenuation_into_ranges()
2779 const int bb_max = lo->bbatt_list.max_val; in b43_put_attenuation_into_ranges()
/drivers/misc/lis3lv02d/
Dlis3lv02d.c684 int max_val, fuzz, flat; in lis3lv02d_joystick_enable() local
703 max_val = (lis3->mdps_max_val * lis3->scale) / LIS3_ACCURACY; in lis3lv02d_joystick_enable()
714 input_set_abs_params(input_dev, ABS_X, -max_val, max_val, fuzz, flat); in lis3lv02d_joystick_enable()
715 input_set_abs_params(input_dev, ABS_Y, -max_val, max_val, fuzz, flat); in lis3lv02d_joystick_enable()
716 input_set_abs_params(input_dev, ABS_Z, -max_val, max_val, fuzz, flat); in lis3lv02d_joystick_enable()
/drivers/net/ethernet/broadcom/bnxt/
Dbnxt_devlink.c699 int max_val = -1; in bnxt_dl_msix_validate() local
702 max_val = BNXT_MSIX_VEC_MAX; in bnxt_dl_msix_validate()
705 max_val = BNXT_MSIX_VEC_MIN_MAX; in bnxt_dl_msix_validate()
707 if (val.vu32 > max_val) { in bnxt_dl_msix_validate()
/drivers/video/backlight/
Dpwm_bl.c388 unsigned int max_val = data->levels[nlevels - 1]; in pwm_backlight_is_linear() local
394 unsigned int slope = (128 * (max_val - min_val)) / nlevels; in pwm_backlight_is_linear()
395 unsigned int margin = (max_val - min_val) / 20; /* 5% */ in pwm_backlight_is_linear()
/drivers/s390/cio/
Dblacklist.c78 int max_digit, int max_val) in pure_hex() argument
95 if ((diff < min_digit) || (diff > max_digit) || (*val > max_val)) in pure_hex()
/drivers/i2c/busses/
Di2c-sh_mobile.c240 u16 max_val = pd->flags & IIC_FLAG_HAS_ICIC67 ? 0x1ff : 0xff; in sh_mobile_i2c_check_timing() local
242 if (pd->iccl > max_val || pd->icch > max_val) { in sh_mobile_i2c_check_timing()
/drivers/base/regmap/
Dregmap-debugfs.c29 static size_t regmap_calc_reg_len(int max_val) in regmap_calc_reg_len() argument
31 return snprintf(NULL, 0, "%x", max_val); in regmap_calc_reg_len()
/drivers/net/ethernet/netronome/nfp/
Dnfp_main.c420 const char *key, const char *default_val, int max_val, in nfp_get_fw_policy_value() argument
434 if (err || hi_val < 0 || hi_val > max_val) { in nfp_get_fw_policy_value()
/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/
Dphy_int.h972 void wlc_lcnphy_start_tx_tone(struct brcms_phy *pi, s32 f_kHz, u16 max_val,
1105 int wlc_phy_tx_tone_nphy(struct brcms_phy *pi, u32 f_kHz, u16 max_val, u8 mode,
Dphy_lcn.c3333 wlc_lcnphy_start_tx_tone(struct brcms_phy *pi, s32 f_kHz, u16 max_val, in wlc_lcnphy_start_tx_tone() argument
3377 i_samp = (u16)(CORDIC_FLOAT(tone_samp.i * max_val) & 0x3ff); in wlc_lcnphy_start_tx_tone()
3378 q_samp = (u16)(CORDIC_FLOAT(tone_samp.q * max_val) & 0x3ff); in wlc_lcnphy_start_tx_tone()
Dphy_n.c23039 wlc_phy_gen_load_samples_nphy(struct brcms_phy *pi, u32 f_kHz, u16 max_val, in wlc_phy_gen_load_samples_nphy() argument
23076 tone_buf[t].q = (s32)CORDIC_FLOAT(tone_buf[t].q * max_val); in wlc_phy_gen_load_samples_nphy()
23077 tone_buf[t].i = (s32)CORDIC_FLOAT(tone_buf[t].i * max_val); in wlc_phy_gen_load_samples_nphy()
23169 wlc_phy_tx_tone_nphy(struct brcms_phy *pi, u32 f_kHz, u16 max_val, in wlc_phy_tx_tone_nphy() argument
23176 num_samps = wlc_phy_gen_load_samples_nphy(pi, f_kHz, max_val, in wlc_phy_tx_tone_nphy()
25642 u16 max_val; in wlc_phy_cal_txiqlo_nphy() local
25770 max_val = 250; in wlc_phy_cal_txiqlo_nphy()
25778 wlc_phy_tx_tone_nphy(pi, tone_freq, max_val, 1, 0, in wlc_phy_cal_txiqlo_nphy()
/drivers/net/wireless/ti/wlcore/
Ddebugfs.c126 min_val, max_val, write_handler_locked, \ argument
152 if (value < min_val || value > max_val) { \
/drivers/s390/virtio/
Dvirtio_ccw.c1368 int max_digit, int max_val) in pure_hex() argument
1385 if ((diff < min_digit) || (diff > max_digit) || (*val > max_val)) in pure_hex()
/drivers/net/ethernet/mellanox/mlx4/
Dfw.c1082 dev_cap->rl_caps.max_val = size & 0xfff; in mlx4_QUERY_DEV_CAP()
1178 rl_caps->num_rates, rl_caps->max_unit, rl_caps->max_val, in mlx4_dev_cap_dump()
/drivers/net/ethernet/chelsio/cxgb3/
Dcxgb3_main.c698 unsigned int min_val, unsigned int max_val) in attr_store() argument
709 if (val < min_val || val > max_val) in attr_store()

12