Home
last modified time | relevance | path

Searched +full:abs +full:- +full:range (Results 1 – 25 of 200) sorted by relevance

12345678

/linux-5.10/Documentation/devicetree/bindings/input/
Dadc-joystick.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 # Copyright 2019-2020 Artur Rojek
4 ---
5 $id: "http://devicetree.org/schemas/input/adc-joystick.yaml#"
6 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
11 - Artur Rojek <contact@artur-rojek.eu>
19 const: adc-joystick
21 io-channels:
27 See Documentation/devicetree/bindings/iio/iio-bindings.txt for details.
29 '#address-cells':
[all …]
/linux-5.10/drivers/input/joystick/
Dadc-joystick.c1 // SPDX-License-Identifier: GPL-2.0
4 * Copyright (c) 2019-2020 Artur Rojek <contact@artur-rojek.eu>
18 s32 range[2]; member
39 bytes = joy->chans[0].channel->scan_type.storagebits >> 3; in adc_joystick_handle()
41 for (i = 0; i < joy->num_chans; ++i) { in adc_joystick_handle()
42 idx = joy->chans[i].channel->scan_index; in adc_joystick_handle()
43 endianness = joy->chans[i].channel->scan_type.endianness; in adc_joystick_handle()
44 msb = joy->chans[i].channel->scan_type.realbits - 1; in adc_joystick_handle()
45 sign = tolower(joy->chans[i].channel->scan_type.sign) == 's'; in adc_joystick_handle()
66 return -EINVAL; in adc_joystick_handle()
[all …]
/linux-5.10/drivers/net/wireless/intel/iwlegacy/
D3945.h1 /* SPDX-License-Identifier: GPL-2.0-only */
4 * Copyright(c) 2003 - 2011 Intel Corporation. All rights reserved.
8 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
32 #define IL3945_FW_PRE "iwlwifi-3945-"
41 * Use default noise value of -127 ... this is below the range of measurable
43 * Also, -127 works better than 0 when averaging frames with/without
46 * averages within an s8's (used in some apps) range of negative values. */
47 #define IL_NOISE_MEAS_NOT_AVAILABLE (-127)
49 /* Module parameters accessible from iwl-*.c */
146 #define IL_INVALID_VALUE -1
[all …]
/linux-5.10/tools/testing/selftests/resctrl/
Dcqm_test.c1 // SPDX-License-Identifier: GPL-2.0
34 if (p->num_of_runs >= NUM_OF_RUNS) in cqm_setup()
35 return -1; in cqm_setup()
37 p->num_of_runs++; in cqm_setup()
50 avg_llc_occu_resc = sum_llc_occu_resc / (NUM_OF_RUNS - 1); in show_cache_info()
51 avg_diff = (long)abs(span - avg_llc_occu_resc); in show_cache_info()
53 diff_percent = (((float)span - avg_llc_occu_resc) / span) * 100; in show_cache_info()
55 if ((abs((int)diff_percent) <= MAX_DIFF_PERCENT) || in show_cache_info()
56 (abs(avg_diff) <= MAX_DIFF)) in show_cache_info()
65 printf("# percent diff=%d\n", abs((int)diff_percent)); in show_cache_info()
[all …]
Dcat_test.c1 // SPDX-License-Identifier: GPL-2.0
42 if (p->num_of_runs >= NUM_OF_RUNS) in cat_setup()
43 return -1; in cat_setup()
45 if (p->num_of_runs == 0) { in cat_setup()
46 sprintf(schemata, "%lx", p->mask); in cat_setup()
47 ret = write_schemata(p->ctrlgrp, schemata, p->cpu_no, in cat_setup()
48 p->resctrl_val); in cat_setup()
50 p->num_of_runs++; in cat_setup()
62 avg_llc_perf_miss = sum_llc_perf_miss / (NUM_OF_RUNS - 1); in show_cache_info()
63 diff_percent = ((float)allocated_cache_lines - avg_llc_perf_miss) / in show_cache_info()
[all …]
/linux-5.10/drivers/gpu/drm/amd/display/include/
Dfixed31_32.h2 * Copyright 2012-15 Advanced Micro Devices, Inc.
33 #define LLONG_MIN (-LLONG_MAX - 1ll)
41 #define LLONG_MAX (-1LL>>1)
47 * represented as fixed-point numbers.
109 * result = -arg
115 res.value = -arg.value; in dc_fixpt_neg()
122 * result = abs(arg) := (arg >= 0) ? arg : -arg
235 arg.value = -arg.value; in dc_fixpt_shr()
238 arg.value = -arg.value; in dc_fixpt_shr()
255 ASSERT(((arg1.value >= 0) && (LLONG_MAX - arg1.value >= arg2.value)) || in dc_fixpt_add()
[all …]
/linux-5.10/drivers/media/test-drivers/vivid/
Dvivid-radio-rx.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * vivid-radio-rx.c - radio receiver support functions.
12 #include <linux/v4l2-dv-timings.h>
15 #include <media/v4l2-common.h>
16 #include <media/v4l2-event.h>
17 #include <media/v4l2-dv-timings.h>
19 #include "vivid-core.h"
20 #include "vivid-ctrls.h"
21 #include "vivid-radio-common.h"
22 #include "vivid-rds-gen.h"
[all …]
/linux-5.10/tools/perf/Documentation/
Dperf-diff.txt1 perf-diff(1)
5 ----
6 perf-diff - Read perf.data files and display the differential profile
9 --------
14 -----------
29 -------
30 -D::
31 --dump-raw-trace::
34 --kallsyms=<file>::
37 -m::
[all …]
/linux-5.10/drivers/net/wireless/ath/ath9k/
Dar9003_paprd.c2 * Copyright (c) 2010-2011 Atheros Communications Inc.
23 struct ath9k_channel *chan = ah->curchan; in ar9003_paprd_enable()
24 struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep; in ar9003_paprd_enable()
28 * is used for sub-band disabling of PAPRD. in ar9003_paprd_enable()
29 * 5G band is divided into 3 sub-bands -- upper, in ar9003_paprd_enable()
32 * -- disable PAPRD for upper band 5GHz in ar9003_paprd_enable()
34 * -- disable PAPRD for middle band 5GHz in ar9003_paprd_enable()
36 * -- disable PAPRD for lower band 5GHz in ar9003_paprd_enable()
40 if (chan->channel >= UPPER_5G_SUB_BAND_START) { in ar9003_paprd_enable()
41 if (le32_to_cpu(eep->modalHeader5G.papdRateMaskHt20) in ar9003_paprd_enable()
[all …]
Ddfs.c2 * Copyright (c) 2008-2011 Atheros Communications Inc.
19 #include "hw-ops.h"
36 * - 20MHz chirp width over a pulse width of 50us
37 * - 5MHz chirp width over a pulse width of 100us
49 /* width range to be checked for chirping */
83 is_ctl = fft_bitmap_weight(fft->lower_bins) != 0; in ath9k_get_max_index_ht40()
84 is_ext = fft_bitmap_weight(fft->upper_bins) != 0; in ath9k_get_max_index_ht40()
88 int mag_lower = fft_max_magnitude(fft->lower_bins); in ath9k_get_max_index_ht40()
89 int mag_upper = fft_max_magnitude(fft->upper_bins); in ath9k_get_max_index_ht40()
97 return fft_max_index(fft->lower_bins); in ath9k_get_max_index_ht40()
[all …]
/linux-5.10/sound/soc/codecs/
Drl6231.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * rl6231.c - RL6231 class device shared support
17 * rl6231_get_pre_div - Return the value of pre divider.
54 pd = -EINVAL; in rl6231_get_pre_div()
63 * rl6231_calc_dmic_clk - Calculate the frequency divider parameter of dmic.
68 * 1MHz - 3MHz range.
77 return -EINVAL; in rl6231_calc_dmic_clk()
89 return -EINVAL; in rl6231_calc_dmic_clk()
131 * rl6231_pll_calc - Calcualte PLL M/N/K code.
147 unsigned int red_t = abs(freq_out - freq_in); in rl6231_pll_calc()
[all …]
/linux-5.10/drivers/hid/
Dhid-sony.c1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz>
7 * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
10 * Copyright (c) 2006-2013 Jiri Kosina
12 * Copyright (c) 2014-2016 Frank Praznik <frank.praznik@gmail.com>
40 #include "hid-ids.h"
194 0x81, 0x01, /* MInput 0x01 (Const[0] Arr[1] Abs[2]) */
207 0x81, 0x02, /* MInput 0x02 (Data[0] Var[1] Abs[2]) */
230 0x81, 0x01, /* MInput 0x01 (Const[0] Arr[1] Abs[2]) */
239 0x81, 0x02, /* MInput 0x02 (Data[0] Var[1] Abs[2]) */
[all …]
/linux-5.10/drivers/input/misc/
Duinput.c1 // SPDX-License-Identifier: GPL-2.0-or-later
11 * - add UI_GET_SYSNAME ioctl
13 * - updated ff support for the changes in kernel interface
14 * - added MODULE_VERSION
16 * - added force feedback support
17 * - added UI_SET_PHYS
19 * - first public version
31 #include "../input-compat.h"
79 udev->buff[udev->head] = (struct input_event) { in uinput_dev_event()
87 udev->head = (udev->head + 1) % UINPUT_BUFFER_SIZE; in uinput_dev_event()
[all …]
/linux-5.10/drivers/clk/meson/
Dclk-pll.c1 // SPDX-License-Identifier: GPL-2.0
14 * +--------------------------------+
16 * | +--+ |
17 * in >>-----[ /N ]--->| | +-----+ |
18 * | | |------| DCO |---->> out
19 * | +--------->| | +--v--+ |
20 * | | +--+ | |
22 * | +--[ *(M + (F/Fmax) ]<--+ |
24 * +--------------------------------+
29 #include <linux/clk-provider.h>
[all …]
/linux-5.10/include/uapi/linux/
Dinput.h1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * Copyright (c) 1999-2002 Vojtech Pavlik
20 #include "input-event-codes.h"
56 * IOCTLs (0x00 - 0x7f)
67 * struct input_absinfo - used by EVIOCGABS/EVIOCSABS ioctls
100 * struct input_keymap_entry - used by EVIOCGKEYCODE/EVIOCSKEYCODE ioctls
101 * @scancode: scancode represented in machine-endian form.
145 * EVIOCGMTSLOTS(len) - get MT slot values
166 * If the request code is not an ABS_MT value, -EINVAL is returned.
176 #define EVIOCGABS(abs) _IOR('E', 0x40 + (abs), struct input_absinfo) /* get abs value/limits */ argument
[all …]
/linux-5.10/drivers/macintosh/
Dvia-pmu-backlight.c1 // SPDX-License-Identifier: GPL-2.0
3 * Backlight code for via-pmu
6 * Copyright (C) 2001-2002 Benjamin Herrenschmidt
7 * Copyright (C) 2006 Michael Hanselmann <linux-kernel@hansmi.ch>
26 int i, flat, count, range = (max - min); in pmu_backlight_init_curve() local
35 bl_curve[flat + i] = min + (range * (i + 1) / count); in pmu_backlight_init_curve()
40 int level = (FB_BACKLIGHT_LEVELS - 1); in pmu_backlight_curve_lookup()
49 int diff = abs(bl_curve[i] - value); in pmu_backlight_curve_lookup()
75 int level = bd->props.brightness; in __pmu_backlight_update_status()
78 if (bd->props.power != FB_BLANK_UNBLANK || in __pmu_backlight_update_status()
[all …]
/linux-5.10/arch/powerpc/platforms/512x/
Dmpc512x_shared.c1 // SPDX-License-Identifier: GPL-2.0-or-later
16 #include <linux/fsl-diu-fb.h>
50 out_be32(&reset_module_base->rpr, 0x52535445); in mpc512x_restart()
52 out_be32(&reset_module_base->rcr, 0x2); in mpc512x_restart()
61 u8 gamma[0x300]; /* 32-bit aligned! */
62 struct diu_ad ad0; /* 32-bit aligned! */
77 np = of_find_compatible_node(NULL, NULL, "fsl,mpc5121-diu"); in mpc512x_set_pixel_clock()
85 clk_diu = clk_get_sys(np->name, "ipg"); in mpc512x_set_pixel_clock()
99 * determine the acceptable clock range for the monitor (+/- 5%), in mpc512x_set_pixel_clock()
102 pr_debug("DIU pixclock in ps - %u\n", pixclock); in mpc512x_set_pixel_clock()
[all …]
/linux-5.10/drivers/clk/at91/
Dclk-generated.c1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Based on clk-programmable & clk-peripheral drivers by Boris BREZILLON.
10 #include <linux/clk-provider.h>
24 struct clk_range range; member
43 __func__, gck->gckdiv, gck->parent_id); in clk_generated_enable()
45 spin_lock_irqsave(gck->lock, flags); in clk_generated_enable()
46 regmap_write(gck->regmap, gck->layout->offset, in clk_generated_enable()
47 (gck->id & gck->layout->pid_mask)); in clk_generated_enable()
48 regmap_update_bits(gck->regmap, gck->layout->offset, in clk_generated_enable()
49 AT91_PMC_PCR_GCKDIV_MASK | gck->layout->gckcss_mask | in clk_generated_enable()
[all …]
Dclk-peripheral.c1 // SPDX-License-Identifier: GPL-2.0-or-later
7 #include <linux/clk-provider.h>
35 struct clk_range range; member
51 u32 id = periph->id; in clk_peripheral_enable()
57 regmap_write(periph->regmap, offset, PERIPHERAL_MASK(id)); in clk_peripheral_enable()
66 u32 id = periph->id; in clk_peripheral_disable()
72 regmap_write(periph->regmap, offset, PERIPHERAL_MASK(id)); in clk_peripheral_disable()
80 u32 id = periph->id; in clk_peripheral_is_enabled()
86 regmap_read(periph->regmap, offset, &status); in clk_peripheral_is_enabled()
107 return ERR_PTR(-EINVAL); in at91_clk_register_peripheral()
[all …]
/linux-5.10/drivers/media/dvb-frontends/
Dstb0899_algo.c1 // SPDX-License-Identifier: GPL-2.0-or-later
50 struct stb0899_internal *internal = &state->internal;
55 return stb0899_calc_srate(internal->master_clk, sfr);
71 dprintk(state->verbose, FE_DEBUG, 1, "-->"); in stb0899_set_srate()
122 struct stb0899_internal *internal = &state->internal; in stb0899_carr_width()
124 return (internal->srate + (internal->srate * internal->rolloff) / 100); in stb0899_carr_width()
133 struct stb0899_internal *internal = &state->internal; in stb0899_first_subrange()
134 struct stb0899_params *params = &state->params; in stb0899_first_subrange()
135 struct stb0899_config *config = state->config; in stb0899_first_subrange()
137 int range = 0; in stb0899_first_subrange() local
[all …]
/linux-5.10/drivers/clk/analogbits/
Dwrpll-cln28hpc.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2018-2019 SiFive, Inc.
8 * the CLN28HPC variant of the Analog Bits Wide Range PLL. The
16 * pre-determined set of performance points.
19 * - Analog Bits "Wide Range PLL Datasheet", version 2015.10.01
20 * - SiFive FU540-C000 Manual v1p0, Chapter 7 "Clocking and Reset"
21 * https://static.dev.sifive.com/FU540-C000-v1.0.pdf
28 #include <linux/clk/analogbits-wrpll-cln28hpc.h>
36 /* MIN_POST_DIVIDE_REF_FREQ: minimum post-divider reference frequency, in Hz */
39 /* MAX_POST_DIVIDE_REF_FREQ: maximum post-divider reference frequency, in Hz */
[all …]
/linux-5.10/arch/m68k/fpsp040/
Ddecbin.S5 | register A6 to extended-precision value in FP0.
9 | Output: Exact floating-point representation of the packed bcd value.
11 | Saves and Modifies: D2-D5
20 | Expected is a normal bcd (i.e. non-exceptional; all inf, zero,
33 | assumed following the least-significant digit.
43 | SM = 0 a non-zero digit in the integer position
44 | SM = 1 a non-zero digit in Mant0, lsd of the fraction
47 | representation (ex. 0.1E2, 1E1, 10E0, 100E-1), is converted
121 moveml %d2-%d5,-(%a7)
248 | 3. Add one for each zero encountered until a non-zero digit.
[all …]
/linux-5.10/drivers/input/
Djoydev.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (c) 1999-2002 Vojtech Pavlik
51 __u16 keymap[KEY_MAX - BTN_MISC + 1];
52 __u16 keypam[KEY_MAX - BTN_MISC + 1];
55 __s16 abs[ABS_CNT]; member
71 switch (corr->type) { in joydev_correct()
77 value = value > corr->coef[0] ? (value < corr->coef[1] ? 0 : in joydev_correct()
78 ((corr->coef[3] * (value - corr->coef[1])) >> 14)) : in joydev_correct()
79 ((corr->coef[2] * (value - corr->coef[0])) >> 14); in joydev_correct()
86 return clamp(value, -32767, 32767); in joydev_correct()
[all …]
/linux-5.10/drivers/gpu/drm/amd/amdgpu/
Damdgpu_pll.c33 * amdgpu_pll_reduce_ratio - fractional number reduction
70 * amdgpu_pll_get_fb_ref_div - feedback and ref divider calculation
102 * amdgpu_pll_compute - compute PLL paramaters
122 unsigned target_clock = pll->flags & AMDGPU_PLL_USE_FRAC_FB_DIV ? in amdgpu_pll_compute()
131 /* determine allowed feedback divider range */ in amdgpu_pll_compute()
132 fb_div_min = pll->min_feedback_div; in amdgpu_pll_compute()
133 fb_div_max = pll->max_feedback_div; in amdgpu_pll_compute()
135 if (pll->flags & AMDGPU_PLL_USE_FRAC_FB_DIV) { in amdgpu_pll_compute()
140 /* determine allowed ref divider range */ in amdgpu_pll_compute()
141 if (pll->flags & AMDGPU_PLL_USE_REF_DIV) in amdgpu_pll_compute()
[all …]
/linux-5.10/drivers/staging/media/imx/
Dimx-media-fim.c1 // SPDX-License-Identifier: GPL-2.0+
13 #include <media/v4l2-ctrls.h>
14 #include <media/v4l2-subdev.h>
16 #include "imx-media.h"
71 #define icap_enabled(fim) ((fim)->icap_flags != IRQ_TYPE_NONE)
76 if (fi->denominator == 0) { in update_fim_nominal()
77 dev_dbg(fim->sd->dev, "no frame interval, FIM disabled\n"); in update_fim_nominal()
78 fim->enabled = false; in update_fim_nominal()
82 fim->nominal = DIV_ROUND_CLOSEST_ULL(1000000ULL * (u64)fi->numerator, in update_fim_nominal()
83 fi->denominator); in update_fim_nominal()
[all …]

12345678