/linux/drivers/platform/x86/ |
H A D | wireless-hotkey.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Airplane mode button for AMD, HP & Xiaomi laptops 5 * Copyright (C) 2014-2017 Alex Hung <alex.hung@canonical.com> 17 MODULE_DESCRIPTION("Airplane mode button for AMD, HP & Xiaomi laptops"); 40 struct wl_button *button = acpi_driver_data(device); in wireless_input_setup() local 43 button->input_dev = input_allocate_device(); in wireless_input_setup() 44 if (!button->input_dev) in wireless_input_setup() 45 return -ENOMEM; in wireless_input_setup() 47 snprintf(button->phys, sizeof(button->phys), "%s/input0", acpi_device_hid(device)); in wireless_input_setup() 49 button->input_dev->name = "Wireless hotkeys"; in wireless_input_setup() [all …]
|
H A D | adv_swbutton.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * adv_swbutton.c - Software Button Interface Driver. 24 /*------------------------------------------------------------------------- 26 *-------------------------------------------------------------------------- 31 struct adv_swbutton *button = dev_get_drvdata(&device->dev); in adv_swbutton_notify() local 35 input_report_key(button->input, KEY_PROG1, 0); in adv_swbutton_notify() 36 input_sync(button->input); in adv_swbutton_notify() 39 input_report_key(button->input, KEY_PROG1, 1); in adv_swbutton_notify() 40 input_sync(button->input); in adv_swbutton_notify() 43 dev_dbg(&device->dev, "Unsupported event [0x%x]\n", event); in adv_swbutton_notify() [all …]
|
H A D | xo15-ebook.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * OLPC XO-1.5 ebook switch driver 4 * (based on generic ACPI button driver) 19 #define MODULE_NAME "xo15-ebook" 29 MODULE_DESCRIPTION("OLPC XO-1.5 ebook switch driver"); 45 struct ebook_switch *button = acpi_driver_data(device); in ebook_send_state() local 49 status = acpi_evaluate_integer(device->handle, "EBK", NULL, &state); in ebook_send_state() 51 return -EIO; in ebook_send_state() 54 input_report_switch(button->input, SW_TABLET_MODE, !state); in ebook_send_state() 55 input_sync(button->input); in ebook_send_state() [all …]
|
/linux/drivers/input/keyboard/ |
H A D | gpio_keys_polled.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2007-2010 Gabor Juhos <juhosg@openwrt.org> 26 #define DRV_NAME "gpio-keys-polled" 45 const struct gpio_keys_button *button, in gpio_keys_button_event() argument 49 unsigned int type = button->type ?: EV_KEY; in gpio_keys_button_event() 53 input_event(input, type, button->code, button->value); in gpio_keys_button_event() 54 __set_bit(button->code, bdev->rel_axis_seen); in gpio_keys_button_event() 58 input_event(input, type, button->code, button->value); in gpio_keys_button_event() 59 __set_bit(button->code, bdev->abs_axis_seen); in gpio_keys_button_event() 62 input_event(input, type, button->code, state); in gpio_keys_button_event() [all …]
|
H A D | gpio_keys.c | 1 // SPDX-License-Identifier: GPL-2.0-only 31 #include <dt-bindings/input/gpio-keys.h> 34 const struct gpio_keys_button *button; member 41 unsigned int release_delay; /* in msecs, for IRQ-only buttons */ 45 unsigned int software_debounce; /* in msecs, for GPIO-driven buttons */ 69 * There are 4 attributes under /sys/devices/platform/gpio-keys/ 70 * keys [ro] - bitmap of keys (EV_KEY) which can be 72 * switches [ro] - bitmap of switches (EV_SW) which can be 74 * disabled_keys [rw] - bitmap of keys currently disabled 75 * disabled_switches [rw] - bitmap of switches currently disabled [all …]
|
H A D | qt1050.c | 1 // SPDX-License-Identifier: GPL-2.0 229 err = regmap_read(ts->regmap, QT1050_CHIP_ID, &val); in qt1050_identify() 231 dev_err(&ts->client->dev, "Failed to read chip ID: %d\n", err); in qt1050_identify() 236 dev_err(&ts->client->dev, "ID %d not supported\n", val); in qt1050_identify() 241 err = regmap_read(ts->regmap, QT1050_FW_VERSION, &val); in qt1050_identify() 243 dev_err(&ts->client->dev, "could not read the firmware version\n"); in qt1050_identify() 247 dev_info(&ts->client->dev, "AT42QT1050 firmware version %1d.%1d\n", in qt1050_identify() 256 struct input_dev *input = ts->input; in qt1050_irq_threaded() 262 err = regmap_read(ts->regmap, QT1050_DET_STATUS, &val); in qt1050_irq_threaded() 264 dev_err(&ts->client->dev, "Fail to read detection status: %d\n", in qt1050_irq_threaded() [all …]
|
/linux/drivers/acpi/ |
H A D | button.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * button.c - ACPI Button Driver 9 #define pr_fmt(fmt) "ACPI: button: " fmt 22 #include <acpi/button.h> 24 #define ACPI_BUTTON_CLASS "button" 30 #define ACPI_BUTTON_DEVICE_NAME_POWER "Power Button" 34 #define ACPI_BUTTON_DEVICE_NAME_SLEEP "Sleep Button" 56 MODULE_DESCRIPTION("ACPI Button Driver"); 72 /* GP-electronic T701, _LID method points to a floating GPIO */ 160 .name = "button", [all …]
|
/linux/drivers/input/misc/ |
H A D | cpcap-pwrbutton.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * CPCAP Power Button Input Driver 17 #include <linux/mfd/motorola-cpcap.h> 30 struct cpcap_power_button *button = _button; in powerbutton_irq() local 33 val = cpcap_sense_virq(button->regmap, irq); in powerbutton_irq() 35 dev_err(button->dev, "irq read failed: %d", val); in powerbutton_irq() 39 pm_wakeup_event(button->dev, 0); in powerbutton_irq() 40 input_report_key(button->idev, KEY_POWER, val); in powerbutton_irq() 41 input_sync(button->idev); in powerbutton_irq() 48 struct cpcap_power_button *button; in cpcap_power_button_probe() local [all …]
|
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 21 reporting power button status. 31 reporting power button status. 41 reporting power button status. 47 Say Y here to use the PowerOn Key for ST-Ericsson's AB8500 48 Mix-Sig PMIC. 51 will be called ab8500-ponkey. 71 module will be called ad714x-i2c. 81 module will be called ad714x-spi. 84 tristate "Dell Wyse 3020 Power Button Driver" [all …]
|
H A D | palmas-pwrbutton.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Texas Instruments' Palmas Power Button Input Driver 5 * Copyright (C) 2012-2014 Texas Instruments Incorporated - http://www.ti.com/ 26 * struct palmas_pwron - Palmas power on data 40 * struct palmas_pwron_config - configuration of palmas power on 42 * @pwron_debounce_val: value for debounce of power button 50 * palmas_power_button_work() - Detects the button release event 51 * @work: work item to detect button release 58 struct input_dev *input_dev = pwron->input_dev; in palmas_power_button_work() 62 error = palmas_read(pwron->palmas, PALMAS_INTERRUPT_BASE, in palmas_power_button_work() [all …]
|
/linux/drivers/platform/surface/ |
H A D | surfacepro3_button.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * power/home/volume button support for 16 #include <acpi/button.h> 44 MODULE_DESCRIPTION("Surface Pro3 Button Driver"); 48 * Power button, Home button, Volume buttons support is supposed to 76 struct surface_button *button = acpi_driver_data(device); in surface_button_notify() local 82 /* Power button press,release handle */ in surface_button_notify() 89 /* Home button press,release handle */ in surface_button_notify() 96 /* Volume up button press,release handle */ in surface_button_notify() 103 /* Volume down button press,release handle */ in surface_button_notify() [all …]
|
/linux/Documentation/input/devices/ |
H A D | sentelic.rst | 8 :Copyright: |copy| 2002-2011 Sentelic Corporation. 10 :Last update: Dec-07-2011 15 A) MSID 4: Scrolling wheel mode plus Forward page(4th button) and Backward 16 page (5th button) 28 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------| 30 |---------------| |---------------| |---------------| |---------------| 37 Bit2 => Middle Button, 1 is pressed, 0 is not pressed. 38 Bit1 => Right Button, 1 is pressed, 0 is not pressed. 39 Bit0 => Left Button, 1 is pressed, 0 is not pressed. 40 Byte 2: X Movement(9-bit 2's complement integers) [all …]
|
H A D | joystick-parport.rst | 3 .. _joystick-parport: 9 :Copyright: |copy| 1998-2000 Vojtech Pavlik <vojtech@ucw.cz> 10 :Copyright: |copy| 1998 Andree Borrmann <a.borrmann@tu-bs.de> 18 Any information in this file is provided as-is, without any guarantee that 36 Many console and 8-bit computer gamepads and joysticks are supported. The 40 ------------ 59 for your pads, use either keyboard or joystick port, and make a pass-through 69 (pin 9) -----> Power 77 (pin 9) ----|>|-------+------> Power 79 (pin 8) ----|>|-------+ [all …]
|
/linux/drivers/soc/loongson/ |
H A D | loongson2_pm.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Loongson-2 PM Support 100 struct input_dev *button; in loongson2_power_button_init() local 102 button = input_allocate_device(); in loongson2_power_button_init() 104 return -ENOMEM; in loongson2_power_button_init() 106 button->name = "Power Button"; in loongson2_power_button_init() 107 button->phys = "pm/button/input0"; in loongson2_power_button_init() 108 button->id.bustype = BUS_HOST; in loongson2_power_button_init() 109 button->dev.parent = NULL; in loongson2_power_button_init() 110 input_set_capability(button, EV_KEY, KEY_POWER); in loongson2_power_button_init() [all …]
|
/linux/Documentation/input/ |
H A D | gamepad.rst | 1 --------------------------- 3 --------------------------- 11 having user-space deal with different button-mappings for each gamepad, this 25 | <===DP===> |SE| |ST| (W) -|- (E) | | 35 D-Pad Left Right Action Pad 43 - Action-Pad 44 4 buttons in diamonds-shape (on the right side). The buttons are 47 - D-Pad (Direction-pad) 49 - Menu-Pad 50 Different constellations, but most-times 2 buttons: SELECT - START [all …]
|
/linux/drivers/hid/ |
H A D | hid-elecom.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * - BM084 Bluetooth Mouse 5 * - EX-G Trackballs (M-XT3DRBK, M-XT3URBK, M-XT4DRBK) 6 * - DEFT Trackballs (M-DT1DRBK, M-DT1URBK, M-DT2DRBK, M-DT2URBK) 7 * - HUGE Trackballs (M-HT1DRBK, M-HT1URBK) 13 * Copyright (c) 2017 Tomasz Kramkowski <tk@the-tk.com> 14 * Copyright (c) 2020 YOSHIOKA Takuma <lo48576@hard-wi.red> 25 #include "hid-ids.h" 28 * Certain ELECOM mice misreport their button count meaning that they only work 49 hid_info(hdev, "Fixing up Elecom mouse button count\n"); in mouse_button_fixup() [all …]
|
/linux/arch/mips/boot/dts/ingenic/ |
H A D | gcw0.dts | 1 // SPDX-License-Identifier: GPL-2.0 2 /dts-v1/; 5 #include <dt-bindings/clock/ingenic,tcu.h> 7 #include <dt-bindings/gpio/gpio.h> 8 #include <dt-bindings/iio/adc/ingenic,adc.h> 9 #include <dt-bindings/input/input.h> 29 stdout-path = "serial2:57600n8"; 33 compatible = "regulator-fixed"; 34 regulator-name = "vcc"; 36 regulator-min-microvolt = <3300000>; [all …]
|
/linux/scripts/kconfig/lxdialog/ |
H A D | inputbox.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * inputbox.c -- implements the input box 18 int x = width / 2 - 11; in print_buttons() 19 int y = height - 2; in print_buttons() 35 int input_x = 0, key = 0, button = -1; in dialog_inputbox() local 46 if (getmaxy(stdscr) <= (height - INPUTBOX_HEIGHT_MIN)) in dialog_inputbox() 47 return -ERRDISPLAYTOOSMALL; in dialog_inputbox() 48 if (getmaxx(stdscr) <= (width - INPUTBOX_WIDTH_MIN)) in dialog_inputbox() 49 return -ERRDISPLAYTOOSMALL; in dialog_inputbox() 52 x = (getmaxx(stdscr) - width) / 2; in dialog_inputbox() [all …]
|
H A D | yesno.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * yesno.c -- implements the yes/no box 16 int x = width / 2 - 10; in print_buttons() 17 int y = height - 2; in print_buttons() 27 * Display a dialog box with two buttons - Yes and No 31 int i, x, y, key = 0, button = 0; in dialog_yesno() local 36 return -ERRDISPLAYTOOSMALL; in dialog_yesno() 38 return -ERRDISPLAYTOOSMALL; in dialog_yesno() 41 x = (getmaxx(stdscr) - width) / 2; in dialog_yesno() 42 y = (getmaxy(stdscr) - height) / 2; in dialog_yesno() [all …]
|
/linux/arch/arm64/boot/dts/allwinner/ |
H A D | sun50i-h700-anbernic-rg35xx-2024.dts | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 6 /dts-v1/; 8 #include "sun50i-h616.dtsi" 9 #include "sun50i-h616-cpu-opp.dtsi" 10 #include <dt-bindings/gpio/gpio.h> 11 #include <dt-bindings/input/linux-event-codes.h> 12 #include <dt-bindings/interrupt-controller/arm-gic.h> 13 #include <dt-bindings/leds/common.h> 17 chassis-type = "handset"; 18 compatible = "anbernic,rg35xx-2024", "allwinner,sun50i-h700"; [all …]
|
/linux/Documentation/hid/ |
H A D | hidintro.rst | 1 .. SPDX-License-Identifier: GPL-2.0 8 descriptors are, and of how a casual (non-kernel) programmer can deal 18 hidreport-parsing 50 Documentation/hid/hid-transport.rst). Devices may misbehave because the 60 <https://www.usb.org/document-library/device-class-definition-hid-111>`_ (HID Spec from now on) 61 * the `HID Usage Tables <https://usb.org/document-library/hid-usage-tables-14>`_ (HUT from now on) 64 (USB, I2C, Bluetooth, etc.). See Documentation/hid/hid-transport.rst. 73 $ hexdump -C /sys/bus/hid/devices/0003\:093A\:2510.0002/report_descriptor 95 Documentation/hid/hidreport-parsing.rst; you only need to understand it 107 * `hid-tools <https://gitlab.freedesktop.org/libevdev/hid-tools>`_, [all …]
|
/linux/drivers/platform/x86/intel/ |
H A D | hid.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Intel HID event & 5 button array driver 12 #include <linux/input/sparse-keymap.h> 21 TABLET_SW_AUTO = -1, 30 "Enable 5 Button Array support. " 31 "If you need this please report this to: platform-driver-x86@vger.kernel.org"); 36 "Enable SW_TABLET_MODE reporting -1:auto 0:off 1:at-first-event 2:at-probe. " 37 "If you need this please report this to: platform-driver-x86@vger.kernel.org"); 62 /* 1: LSuper (Page 0x07, usage 0xE3) -- unclear what to do */ 63 /* 2: Toggle SW_ROTATE_LOCK -- easy to implement if seen in wild */ [all …]
|
/linux/drivers/media/usb/em28xx/ |
H A D | em28xx-input.c | 1 // SPDX-License-Identifier: GPL-2.0+ 33 dev_printk(KERN_DEBUG, &ir->dev->intf->dev, \ 69 * I2C IR based get keycodes - should be used with ir-kbd-i2c 83 return -EIO; in em28xx_get_key_terratec() 87 * it seems that 0xFE indicates that a button is still hold in em28xx_get_key_terratec() 88 * down, while 0xff indicates that no button is hold down. in em28xx_get_key_terratec() 113 return -EIO; in em28xx_get_key_em_haup() 142 return -EIO; in em28xx_get_key_pinnacle_usb_grey() 160 .addr = i2c_dev->addr, in em28xx_get_key_winfast_usbii_deluxe() 164 .addr = i2c_dev->addr, in em28xx_get_key_winfast_usbii_deluxe() [all …]
|
/linux/Documentation/input/joydev/ |
H A D | joystick.rst | 3 .. _joystick-doc: 14 linux-input@vger.kernel.org 16 send "subscribe linux-input" to majordomo@vger.kernel.org to subscribe to it. 25 --------- 29 usually packaged as ``joystick``, ``input-utils``, ``evtest``, and so on. 35 ------------ 48 ln -s input/js0 js0 49 ln -s input/js1 js1 50 ln -s input/js2 js2 51 ln -s input/js3 js3 [all …]
|
/linux/arch/arm/boot/dts/allwinner/ |
H A D | sun8i-v3s-anbernic-rg-nano.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 3 /dts-v1/; 4 #include <dt-bindings/input/linux-event-codes.h> 5 #include "sun8i-v3s.dtsi" 6 #include "sunxi-common-regulators.dtsi" 10 compatible = "anbernic,rg-nano", "allwinner,sun8i-v3s"; 19 compatible = "pwm-backlight"; 20 brightness-levels = <0 1 2 3 8 14 21 32 46 60 80 100>; 21 default-brightness-level = <11>; 22 power-supply = <®_vcc5v0>; [all …]
|