/linux/drivers/platform/x86/intel/ |
H A D | hid.c | 1 // SPDX-License-Identifier: GPL-2.0+ 12 #include <linux/input/sparse-keymap.h> 21 TABLET_SW_AUTO = -1, 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 */ 72 /* 13 has two different meanings in the spec -- ignore it. */ 80 /* 27: wake -- needs special handling */ [all …]
|
H A D | vbtn.c | 1 // SPDX-License-Identifier: GPL-2.0+ 13 #include <linux/input/sparse-keymap.h> 45 { KE_KEY, 0xC4, { KEY_VOLUMEUP } }, /* volume-up key press */ 46 { KE_IGNORE, 0xC5, { KEY_VOLUMEUP } }, /* volume-up key release */ 47 { KE_KEY, 0xC6, { KEY_VOLUMEDOWN } }, /* volume-down key press */ 48 { KE_IGNORE, 0xC7, { KEY_VOLUMEDOWN } }, /* volume-down key release */ 49 { KE_KEY, 0xC8, { KEY_ROTATE_LOCK_TOGGLE } }, /* rotate-lock key press */ 50 { KE_KEY, 0xC9, { KEY_ROTATE_LOCK_TOGGLE } }, /* rotate-lock key release */ 57 * intel-vbtn code, always seem to use this for 2-in-1s / convertibles and set 58 * SW_DOCK=1 when in laptop-mode (in tandem with setting SW_TABLET_MODE=0). [all …]
|
/linux/drivers/acpi/ |
H A D | pci_link.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * pci_link.c - ACPI PCI Interrupt Link Device Driver ($Revision: 34 $) 10 * 1. Support more than one IRQ resource entry per link device (index). 12 * for IRQ management (e.g. start()->_SRS). 36 static int acpi_pci_link_add(struct acpi_device *device, 38 static void acpi_pci_link_remove(struct acpi_device *device); 68 struct acpi_device *device; member 75 static int sci_irq = -1, sci_penalty; 77 /* -------------------------------------------------------------------------- 78 PCI Link Device Management [all …]
|
H A D | dock.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * dock.c - ACPI dock station driver 31 acpi_handle handle; member 62 * Dock Dependent device functions * 65 * add_dock_dependent_device - associate a device with the dock station 67 * @adev: Dependent ACPI device object. 69 * Add the dependent device to the dock's dependent device list. 78 return -ENOMEM; in add_dock_dependent_device() 80 dd->adev = adev; in add_dock_dependent_device() 81 INIT_LIST_HEAD(&dd->list); in add_dock_dependent_device() [all …]
|
H A D | acpi_processor.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * acpi_processor.c - ACPI processor enumeration support 16 #include <linux/device.h> 44 return pr->handle; in acpi_get_processor_handle() 56 return -EINVAL; in acpi_processor_errata_piix4() 62 switch (dev->revision) { in acpi_processor_errata_piix4() 64 dev_dbg(&dev->dev, "Found PIIX4 A-step\n"); in acpi_processor_errata_piix4() 67 dev_dbg(&dev->dev, "Found PIIX4 B-step\n"); in acpi_processor_errata_piix4() 70 dev_dbg(&dev->dev, "Found PIIX4E\n"); in acpi_processor_errata_piix4() 73 dev_dbg(&dev->dev, "Found PIIX4M\n"); in acpi_processor_errata_piix4() [all …]
|
H A D | acpi_video.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * video.c - ACPI Video Driver 7 * Copyright (C) 2006 Thomas Tuttle <linux-kernel@ttuttle.net> 32 #define ACPI_VIDEO_DEVICE_NAME "Video Device" 52 static int report_key_events = -1; 57 static int hw_changes_brightness = -1; 61 "a hotkey is pressed: -1: auto, 0: normal 1: hw-changes-brightness"); 78 static int acpi_video_bus_add(struct acpi_device *device); 79 static void acpi_video_bus_remove(struct acpi_device *device); 80 static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data); [all …]
|
H A D | device_pm.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * drivers/acpi/device_pm.c - ACPI device power management routines. 27 * acpi_power_state_string - String representation of ACPI device power state. 28 * @state: ACPI device power state to return the string representation of. 48 static int acpi_dev_pm_explicit_get(struct acpi_device *device, int *state) in acpi_dev_pm_explicit_get() argument 53 status = acpi_evaluate_integer(device->handle, "_PSC", NULL, &psc); in acpi_dev_pm_explicit_get() 55 return -ENODEV; in acpi_dev_pm_explicit_get() 62 * acpi_device_get_power - Get power state of an ACPI device. 63 * @device: Device to get the power state of. 64 * @state: Place to store the power state of the device. [all …]
|
H A D | pci_slot.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * pci_slot.c - ACPI PCI Slot Driver 10 * Copyright (C) 2007-2008 Hewlett-Packard Development Company, L.P. 27 #include <linux/pci-acpi.h> 42 check_slot(acpi_handle handle, unsigned long long *sun) in check_slot() argument 44 int device = -1; in check_slot() local 49 acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); in check_slot() 54 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); in check_slot() 59 status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr); in check_slot() 67 status = acpi_evaluate_integer(handle, "_SUN", NULL, sun); in check_slot() [all …]
|
H A D | thermal.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * acpi_thermal.c - ACPI Thermal Zone Driver ($Revision: 41 $) 27 #include <linux/device.h> 48 #define ACPI_THERMAL_TRIP_PASSIVE (-1) 55 * when re-evaluating the AML code. 57 * We need to re-bind the cooling devices of a thermal zone when this occurs. 61 acpi_handle_info(tz->device->handle, \ 63 "Please report to linux-acpi@vger.kernel.org\n", str); \ 110 struct acpi_device *device; member 124 /* -------------------------------------------------------------------------- [all …]
|
H A D | device_sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * drivers/acpi/device_sysfs.c - ACPI device sysfs attributes and modalias. 15 #include <linux/device.h> 21 static ssize_t acpi_object_path(acpi_handle handle, char *buf) in acpi_object_path() argument 26 result = acpi_get_name(handle, ACPI_FULL_PATHNAME, &path); in acpi_object_path() 47 return dn->handle ? acpi_object_path(dn->handle, buf) : 0; in data_node_show_path() 67 return dn_attr->show ? dn_attr->show(dn, buf) : -ENXIO; in acpi_data_node_attr_show() 78 complete(&dn->kobj_done); in acpi_data_node_release() 90 struct list_head *list = &data->subnodes; in acpi_expose_nondev_subnodes() 99 init_completion(&dn->kobj_done); in acpi_expose_nondev_subnodes() [all …]
|
/linux/drivers/iommu/ |
H A D | iommu-sva.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include "iommu-priv.h" 13 static struct iommu_domain *iommu_sva_domain_alloc(struct device *dev, 17 static struct iommu_mm_data *iommu_alloc_mm_data(struct mm_struct *mm, struct device *dev) in iommu_alloc_mm_data() 25 return ERR_PTR(-EBUSY); in iommu_alloc_mm_data() 27 iommu_mm = mm->iommu_mm; in iommu_alloc_mm_data() 30 if (iommu_mm->pasid >= dev->iommu->max_pasids) in iommu_alloc_mm_data() 31 return ERR_PTR(-EOVERFLOW); in iommu_alloc_mm_data() 37 return ERR_PTR(-ENOMEM); in iommu_alloc_mm_data() 42 return ERR_PTR(-ENOSPC); in iommu_alloc_mm_data() [all …]
|
/linux/drivers/platform/x86/ |
H A D | toshiba_bluetooth.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 * normal people aren't meant to understand :-) 38 static int toshiba_bt_rfkill_add(struct acpi_device *device); 39 static void toshiba_bt_rfkill_remove(struct acpi_device *device); 40 static void toshiba_bt_rfkill_notify(struct acpi_device *device, u32 event); 49 static int toshiba_bt_resume(struct device *dev); 65 static int toshiba_bluetooth_present(acpi_handle handle) in toshiba_bluetooth_present() argument 71 * Some Toshiba laptops may have a fake TOS6205 device in in toshiba_bluetooth_present() 75 result = acpi_evaluate_integer(handle, "_STA", NULL, &bt_present); in toshiba_bluetooth_present() 78 return -ENXIO; in toshiba_bluetooth_present() [all …]
|
H A D | toshiba_haps.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 29 static int toshiba_haps_reset_protection(acpi_handle handle) in toshiba_haps_reset_protection() argument 33 status = acpi_evaluate_object(handle, "RSSS", NULL, NULL); in toshiba_haps_reset_protection() 36 return -EIO; in toshiba_haps_reset_protection() 42 static int toshiba_haps_protection_level(acpi_handle handle, int level) in toshiba_haps_protection_level() argument 46 status = acpi_execute_simple_method(handle, "PTLV", level); in toshiba_haps_protection_level() 49 return -EIO; in toshiba_haps_protection_level() 58 static ssize_t protection_level_show(struct device *dev, in protection_level_show() 63 return sprintf(buf, "%i\n", haps->protection_level); in protection_level_show() 66 static ssize_t protection_level_store(struct device *dev, in protection_level_store() [all …]
|
H A D | asus-laptop.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * asus-laptop.c - Asus Laptop Support 5 * Copyright (C) 2002-2005 Julien Lerouge, 2003-2006 Karol Kozimor 6 * Copyright (C) 2006-2007 Corentin Chary 13 * Pontus Fuchs - Helper functions, cleanup 14 * Johann Wiesner - Small compile fixes 15 * John Belmonte - ACPI code for Toshiba laptop was a good starting point. 16 * Eric Burghard - LED display support for W1N 17 * Josh Green - Light Sens support 18 * Thomas Tuttle - His first patch for led support was very helpful [all …]
|
H A D | eeepc-laptop.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * eeepc-laptop.c - Asus Eee PC extras 7 * Based on eee.c from eeepc-linux 19 #include <linux/hwmon-sysfs.h> 24 #include <linux/input/sparse-keymap.h> 49 "Disable hotplug for wireless device. " 51 "acpi4asus-user@lists.sourceforge.net."); 153 acpi_handle handle; /* the handle of the acpi device */ member 161 struct acpi_device *device; /* the device we are in */ member 183 static int write_acpi_int(acpi_handle handle, const char *method, int val) in write_acpi_int() argument [all …]
|
H A D | sony-laptop.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (C) 2004-2005 Stelian Pop <stelian@popies.net> 6 * Copyright (C) 2007-2009 Mattia Dongili <malattia@linux.it> 14 * Copyright (C) 2001-2005 Stelian Pop <stelian@popies.net> 18 * Copyright (C) 2001-2002 Alcôve <www.alcove.com> 24 * Copyright (C) 2000 Takaya Kinjo <t-kinjo@tc4.so-net.ne.jp> 51 #include <linux/sony-laptop.h> 66 #define SONY_NC_CLASS "sony-nc" 70 #define SONY_PIC_CLASS "sony-pic" 75 MODULE_DESCRIPTION("Sony laptop extras driver (SPIC and SNC ACPI device)"); [all …]
|
/linux/drivers/scsi/mpt3sas/ |
H A D | mpt3sas_scsih.c | 5 * Copyright (C) 2012-2014 LSI Corporation 6 * Copyright (C) 2013-2014 Avago Technologies 7 * (mailto: MPT-FusionLinux.pdl@avagotech.com) 22 * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, 41 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 71 static int _scsih_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle, 73 static int _scsih_pcie_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle); 77 _scsih_pcie_check_device(struct MPT3SAS_ADAPTER *ioc, u16 handle); 93 static u8 scsi_io_cb_idx = -1; 94 static u8 tm_cb_idx = -1; [all …]
|
/linux/include/uapi/drm/ |
H A D | qaic_accel.h | 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 3 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. 4 * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. 55 * struct qaic_manage_trans_hdr - Header for a transaction in a manage message. 65 * struct qaic_manage_trans_passthrough - Defines a passthrough transaction. 68 * encode in little endian and align/pad to 64-bit. 76 * struct qaic_manage_trans_dma_xfer - Defines a DMA transfer transaction. 81 * @addr: In. Address of the data to DMA to the device. 82 * @size: In. Length of the data to DMA to the device. 93 * struct qaic_manage_trans_activate_to_dev - Defines an activate request. [all …]
|
/linux/tools/testing/selftests/tc-testing/ |
H A D | tdc_batch.py | 4 tdc_batch.py - a script to generate TC batch file 12 parser.add_argument("device", help="device name") 14 parser.add_argument("-n", "--number", type=int, 17 "-a", 18 "--handle_start", 21 help="start handle range from (default: 1)") 22 parser.add_argument("-o", "--skip_sw", 25 parser.add_argument("-s", "--share_action", 28 parser.add_argument("-p", "--prio", 32 "-e", [all …]
|
/linux/include/linux/ |
H A D | acpi.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * acpi.h - ACPI Interface 14 #include <linux/device.h> 54 return adev ? adev->handle : NULL; in acpi_device_handle() 57 #define ACPI_COMPANION(dev) to_acpi_device_node((dev)->fwnode) 85 static inline bool has_acpi_companion(struct device *dev) in has_acpi_companion() 87 return is_acpi_device_node(dev->fwnode); in has_acpi_companion() 90 static inline void acpi_preset_companion(struct device *dev, in acpi_preset_companion() 98 return dev_name(&adev->dev); in acpi_dev_name() 101 struct device *acpi_get_first_physical_node(struct acpi_device *adev); [all …]
|
/linux/include/linux/platform_data/ |
H A D | mlxreg.h | 1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ 3 * Copyright (C) 2017-2020 Mellanox Technologies Ltd. 14 * enum mlxreg_wdt_type - type of HW watchdog 28 * enum mlxreg_hotplug_kind - kind of hotplug entry 36 * after hardware-firmware synchronization handshake; 57 * enum mlxreg_hotplug_device_action - hotplug device action required for 60 * @MLXREG_HOTPLUG_DEVICE_DEFAULT_ACTION: probe device for 'on' event, remove 62 * @MLXREG_HOTPLUG_DEVICE_PLATFORM_ACTION: probe platform device for 'on' 73 * struct mlxreg_core_hotplug_notifier - hotplug notifier block: 76 * @handle: user handle to be passed by user handler function; [all …]
|
/linux/Documentation/power/ |
H A D | pm_qos_interface.rst | 11 * The per-device PM QoS framework provides the API to manage the 12 per-device latency constraints and PM QoS flags. 31 void cpu_latency_qos_add_request(handle, target_value): 35 Clients of PM QoS need to save the returned handle for future use in other 38 void cpu_latency_qos_update_request(handle, new_target_value): 39 Will update the list element pointed to by the handle with the new target 43 void cpu_latency_qos_remove_request(handle): 51 int cpu_latency_qos_request_active(handle): 65 The infrastructure exposes one device node, /dev/cpu_dma_latency, for the CPU 75 As long as the device node is held open that process has a registered [all …]
|
/linux/drivers/pnp/pnpacpi/ |
H A D | core.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * pnpacpi -- PnP ACPI driver 21 * Compatible Device IDs 45 pnp_dbg(&dev->dev, "get resources\n"); in pnpacpi_get_resources() 52 acpi_handle handle; in pnpacpi_set_resources() local 55 pnp_dbg(&dev->dev, "set resources\n"); in pnpacpi_set_resources() 57 acpi_dev = ACPI_COMPANION(&dev->dev); in pnpacpi_set_resources() 59 dev_dbg(&dev->dev, "ACPI device not found in %s!\n", __func__); in pnpacpi_set_resources() 60 return -ENODEV; in pnpacpi_set_resources() 63 if (WARN_ON_ONCE(acpi_dev != dev->data)) in pnpacpi_set_resources() [all …]
|
/linux/tools/testing/selftests/alsa/ |
H A D | pcm-test.c | 1 // SPDX-License-Identifier: GPL-2.0 9 // every PCM device it can find. This may conflict with other system 21 #include "alsa-local.h" 36 snd_pcm_t *handle; member 38 int device; member 71 if (tstamp->tv_nsec > now.tv_nsec) { in timestamp_diff_ms() 72 diff.tv_sec = now.tv_sec - tstamp->tv_sec - 1; in timestamp_diff_ms() 73 diff.tv_nsec = (now.tv_nsec + 1000000000L) - tstamp->tv_nsec; in timestamp_diff_ms() 75 diff.tv_sec = now.tv_sec - tstamp->tv_sec; in timestamp_diff_ms() 76 diff.tv_nsec = now.tv_nsec - tstamp->tv_nsec; in timestamp_diff_ms() [all …]
|
/linux/drivers/scsi/mpi3mr/ |
H A D | mpi3mr_transport.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (C) 2017-2023 Broadcom Inc. 6 * (mailto: mpi3mr-linuxdrv.pdl@broadcom.com) 15 * mpi3mr_post_transport_req - Issue transport requests and wait 33 * Return: 0 on success, non-zero on failure. 41 mutex_lock(&mrioc->transport_cmds.mutex); in mpi3mr_post_transport_req() 42 if (mrioc->transport_cmds.state & MPI3MR_CMD_PENDING) { in mpi3mr_post_transport_req() 43 retval = -1; in mpi3mr_post_transport_req() 45 mutex_unlock(&mrioc->transport_cmds.mutex); in mpi3mr_post_transport_req() 48 mrioc->transport_cmds.state = MPI3MR_CMD_PENDING; in mpi3mr_post_transport_req() [all …]
|