Home
last modified time | relevance | path

Searched +full:abs +full:- +full:flat (Results 1 – 20 of 20) sorted by relevance

/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>
20 s32 flat; 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/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
30 for (flat = 1; flat < (FB_BACKLIGHT_LEVELS / 16); ++flat) in pmu_backlight_init_curve()
31 bl_curve[flat] = min; in pmu_backlight_init_curve()
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()
[all …]
/linux-5.10/drivers/virtio/
Dvirtio_input.c1 // SPDX-License-Identifier: GPL-2.0-only
29 virtqueue_add_inbuf(vi->evt, sg, 1, evtbuf, GFP_ATOMIC); in virtinput_queue_evtbuf()
34 struct virtio_input *vi = vq->vdev->priv; in virtinput_recv_events()
39 spin_lock_irqsave(&vi->lock, flags); in virtinput_recv_events()
40 if (vi->ready) { in virtinput_recv_events()
41 while ((event = virtqueue_get_buf(vi->evt, &len)) != NULL) { in virtinput_recv_events()
42 spin_unlock_irqrestore(&vi->lock, flags); in virtinput_recv_events()
43 input_event(vi->idev, in virtinput_recv_events()
44 le16_to_cpu(event->type), in virtinput_recv_events()
45 le16_to_cpu(event->code), in virtinput_recv_events()
[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
73 * @flat: values that are within this value will be discarded by
95 __s32 flat; member
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
[all …]
/linux-5.10/drivers/video/fbdev/geode/
Dvideo_gx.c1 // SPDX-License-Identifier: GPL-2.0-or-later
136 min = abs(pll_table[0].pixclock - info->var.pixclock); in gx_set_dclk_frequency()
138 diff = abs(pll_table[i].pixclock - info->var.pixclock); in gx_set_dclk_frequency()
171 } while (timeout-- && !(dotpll & MSR_GLCP_DOTPLL_LOCK)); in gx_set_dclk_frequency()
177 struct gxfb_par *par = info->par; in gx_configure_tft()
198 fp |= info->var.yres << FP_PT1_VSIZE_SHIFT; in gx_configure_tft()
208 if (!(info->var.sync & FB_SYNC_VERT_HIGH_ACT)) in gx_configure_tft()
211 if (!(info->var.sync & FB_SYNC_HOR_HIGH_ACT)) in gx_configure_tft()
234 struct gxfb_par *par = info->par; in gx_configure_display()
260 if (par->enable_crt) { in gx_configure_display()
[all …]
Dlxfb_ops.c1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Copyright (C) 2006-2007, Advanced Micro Devices,Inc.
23 /* This is the complete list of PLL frequencies that we can set -
165 freq = (unsigned int) (1000000000 / info->var.pixclock); in lx_set_clock()
167 min = abs(pll_table[0].freq - freq); in lx_set_clock()
170 diff = abs(pll_table[i].freq - freq); in lx_set_clock()
182 struct lxfb_par *par = info->par; in lx_graphics_disable()
247 struct lxfb_par *par = info->par; in lx_graphics_enable()
263 if (info->var.sync & FB_SYNC_HOR_HIGH_ACT) in lx_graphics_enable()
266 if (info->var.sync & FB_SYNC_VERT_HIGH_ACT) in lx_graphics_enable()
[all …]
/linux-5.10/drivers/misc/lis3lv02d/
Dlis3lv02d.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * lis3lv02d.c - ST LIS3LV02DL accelerometer driver
5 * Copyright (C) 2007-2008 Yan Burman
7 * Copyright (C) 2008-2009 Pavel Machek
42 #define SELFTEST_FAIL -1
43 #define SELFTEST_IRQ -2
51 * to keep the interrupt for the free-fall event. The values are updated at
61 * LIS3LV02D spec says 1024 LSBs corresponds 1 G -> 1LSB is 1000/1024 mG
67 /* Sensitivity values for -2G +2G scale */
72 * LIS331DLH spec says 1LSBs corresponds 4G/4096 -> 1LSB is 1000/1024 mG.
[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/input/
Dinput.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (c) 1999-2002 Vojtech Pavlik
26 #include "input-compat.h"
27 #include "input-poller.h"
59 if (value > old_val - fuzz / 2 && value < old_val + fuzz / 2) in input_defuzz_abs_event()
62 if (value > old_val - fuzz && value < old_val + fuzz) in input_defuzz_abs_event()
65 if (value > old_val - fuzz * 2 && value < old_val + fuzz * 2) in input_defuzz_abs_event()
74 if (test_bit(EV_REP, dev->evbit) && in input_start_autorepeat()
75 dev->rep[REP_PERIOD] && dev->rep[REP_DELAY] && in input_start_autorepeat()
76 dev->timer.function) { in input_start_autorepeat()
[all …]
/linux-5.10/sound/soc/codecs/
Dtda7419.c1 // SPDX-License-Identifier: GPL-2.0-only
136 if (tvc->reg == tvc->rreg) in tda7419_vol_is_stereo()
146 (struct tda7419_vol_control *)kcontrol->private_value; in tda7419_vol_info()
148 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in tda7419_vol_info()
149 uinfo->count = tda7419_vol_is_stereo(tvc) ? 2 : 1; in tda7419_vol_info()
150 uinfo->value.integer.min = tvc->min; in tda7419_vol_info()
151 uinfo->value.integer.max = tvc->max; in tda7419_vol_info()
163 val = 0 - val; in tda7419_vol_get_value()
166 val = val - thresh; in tda7419_vol_get_value()
168 val = thresh - val; in tda7419_vol_get_value()
[all …]
/linux-5.10/drivers/media/i2c/
Dmt9m111.c1 // SPDX-License-Identifier: GPL-2.0-only
14 #include <linux/v4l2-mediabus.h>
18 #include <media/v4l2-async.h>
19 #include <media/v4l2-clk.h>
20 #include <media/v4l2-common.h>
21 #include <media/v4l2-ctrls.h>
22 #include <media/v4l2-device.h>
23 #include <media/v4l2-event.h>
24 #include <media/v4l2-fwnode.h>
246 /* user point of view - 0: falling 1: rising edge */
[all …]
/linux-5.10/tools/perf/Documentation/
Dperf-config.txt1 perf-config(1)
5 ----
6 perf-config - Get and set variables in a configuration file.
9 --------
11 'perf config' [<file-option>] [section.name[=value] ...]
13 'perf config' [<file-option>] -l | --list
16 -----------
20 -------
22 -l::
23 --list::
[all …]
/linux-5.10/drivers/video/fbdev/
Dtridentfb.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright 2001, 2002 - Jani Monoses <jani@iv.ro>
30 #include <linux/i2c-algo-bit.h>
79 MODULE_PARM_DESC(mode_option, "Initial video mode e.g. '648x480-8@60'");
81 MODULE_PARM_DESC(mode, "Initial video mode e.g. '648x480-8@60' (deprecated)");
166 fb_writeb(val, p->io_virt + reg); in t_outb()
171 return fb_readb(p->io_virt + reg); in t_inb()
176 fb_writel(v, par->io_virt + r); in writemmr()
181 return fb_readl(par->io_virt + r); in readmmr()
193 u8 reg = vga_mm_rcrt(par->io_virt, I2C) & DDC_MASK_TGUI; in tridentfb_ddc_setscl_tgui()
[all …]
/linux-5.10/drivers/media/pci/cx25821/
Dcx25821-medusa-video.c1 // SPDX-License-Identifier: GPL-2.0-or-later
12 #include "cx25821-medusa-video.h"
13 #include "cx25821-biffuncs.h"
63 value = cx25821_i2c_read(&dev->i2c_bus[0], out_ctrl, &tmp); in medusa_enable_bluefield_output()
67 cx25821_i2c_write(&dev->i2c_bus[0], out_ctrl, value); in medusa_enable_bluefield_output()
69 value = cx25821_i2c_read(&dev->i2c_bus[0], out_ctrl_ns, &tmp); in medusa_enable_bluefield_output()
73 cx25821_i2c_write(&dev->i2c_bus[0], out_ctrl_ns, value); in medusa_enable_bluefield_output()
84 /* set video format NTSC-M */ in medusa_initialize_ntsc()
85 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_ntsc()
90 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
[all …]
/linux-5.10/drivers/gpu/drm/rcar-du/
Drcar_lvds.c1 // SPDX-License-Identifier: GPL-2.0
3 * rcar_lvds.c -- R-Car LVDS Encoder
5 * Copyright (C) 2013-2018 Renesas Electronics Corporation
51 #define RCAR_LVDS_QUIRK_DUAL_LINK BIT(4) /* Supports dual-link operation */
88 iowrite32(data, lvds->mmio + reg); in rcar_lvds_write()
91 /* -----------------------------------------------------------------------------
99 return drm_panel_get_modes(lvds->panel, connector); in rcar_lvds_connector_get_modes()
111 if (!conn_state->crtc) in rcar_lvds_connector_atomic_check()
114 if (list_empty(&connector->modes)) { in rcar_lvds_connector_atomic_check()
115 dev_dbg(lvds->dev, "connector: empty modes list\n"); in rcar_lvds_connector_atomic_check()
[all …]
/linux-5.10/drivers/hid/
Dhid-lg.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
8 * Copyright (c) 2006-2007 Jiri Kosina
25 #include "hid-ids.h"
26 #include "hid-lg.h"
27 #include "hid-lg4ff.h"
435 if ((drv_data->quirks & LG_RDESC) && *rsize >= 91 && rdesc[83] == 0x26 && in lg_report_fixup()
442 if ((drv_data->quirks & LG_RDESC_REL_ABS) && *rsize >= 51 && in lg_report_fixup()
446 "fixing up rel/abs in Logitech report descriptor\n"); in lg_report_fixup()
[all …]
Dhid-logitech-hidpp.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * Copyright (c) 2012-2013 Google (c)
7 * Copyright (c) 2013-2014 Red Hat Inc.
25 #include <linux/fixp-arith.h>
28 #include "hid-ids.h"
42 "Disable Tap-To-Click mode reporting for touchpads (only on the K400 currently).");
83 /* Convenience constant to check for any high-res support. */
123 u8 params[HIDPP_REPORT_VERY_LONG_MAX_LENGTH - 4U];
129 u8 params[HIDPP_REPORT_VERY_LONG_MAX_LENGTH - 4U];
158 * struct hidpp_scroll_counter - Utility class for processing high-resolution
[all …]
/linux-5.10/drivers/gpu/drm/i915/display/
Dintel_tv.c2 * Copyright © 2006-2008 Intel Corporation
30 * Integrated TV-out support for the 915GM and 945GM.
127 * ee = 00 = 10^-1 (0.mmmmmmmmm)
128 * ee = 01 = 10^-2 (0.0mmmmmmmmm)
129 * ee = 10 = 10^-3 (0.00mmmmmmmmm)
130 * ee = 11 = 10^-4 (0.000mmmmmmmmm)
133 * eee = 000 = 10^-1 (0.mmmmmmmmm)
134 * eee = 001 = 10^-2 (0.0mmmmmmmmm)
135 * eee = 010 = 10^-3 (0.00mmmmmmmmm)
136 * eee = 011 = 10^-4 (0.000mmmmmmmmm)
[all …]
/linux-5.10/drivers/scsi/
Dscsi_debug.c1 // SPDX-License-Identifier: GPL-2.0-or-later
10 * Copyright (C) 2001 - 2020 Douglas Gilbert
34 #include <linux/crc-t10dif.h>
40 #include <linux/t10-pi.h>
142 #define DEF_SCSI_LEVEL 7 /* INQUIRY, byte2 [6->SPC-4; 7->SPC-5] */
156 #define JDELAY_OVERRIDDEN -9999
194 /* As indicated in SAM-5 and SPC-4 Unit Attentions (UAs) are returned in
215 * per-device DEF_CMD_PER_LUN can be changed via sysfs:
223 /* UA - Unit Attention; SA - Service Action; SSU - Start Stop Unit */
224 #define F_D_IN 1 /* Data-in command (e.g. READ) */
[all …]