| /linux/drivers/platform/x86/ |
| H A D | toshiba_haps.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 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() 48 pr_err("Error while setting the protection level\n"); in toshiba_haps_protection_level() 49 return -EIO; in toshiba_haps_protection_level() 52 pr_debug("HDD protection level set to: %d\n", level); 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 …]
|
| /linux/drivers/acpi/ |
| 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> 33 #define ACPI_VIDEO_DEVICE_NAME "Video Device" 53 static int report_key_events = -1; 58 static int hw_changes_brightness = -1; 62 "a hotkey is pressed: -1: auto, 0: normal 1: hw-changes-brightness"); 79 static int acpi_video_bus_add(struct acpi_device *device); 80 static void acpi_video_bus_remove(struct acpi_device *device); 90 ACPI_VIDEO_AC_LEVEL, /* level when machine has full power */ [all …]
|
| /linux/rust/kernel/ |
| H A D | device.rs | 1 // SPDX-License-Identifier: GPL-2.0 5 //! C header: [`include/linux/device.h`](srctree/include/linux/device.h) 19 /// The core representation of a device in the kernel's driver model. 21 /// This structure represents the Rust abstraction for a C `struct device`. A [`Device`] can either 22 /// exist as temporary reference (see also [`Device::from_raw`]), which is only valid within a 23 /// certain scope or as [`ARef<Device>`], owning a dedicated reference count. 25 /// # Device Types 27 /// A [`Device`] can represent either a bus device or a class device. 31 /// A bus device is a [`Device`] that is associated with a physical or virtual bus. Examples of 34 /// identifying information. Bus devices are visible in sysfs under `/sys/bus/<bus-name>/devices/`. [all …]
|
| /linux/include/linux/comedi/ |
| H A D | comedidev.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 4 * header file for kernel-only structures, variables, and constants 6 * COMEDI - Linux Control and Measurement Device Interface 7 * Copyright (C) 1997-2000 David A. Schleef <ds@schleef.org> 13 #include <linux/dma-mapping.h> 28 * struct comedi_subdevice - Working data for a COMEDI subdevice 29 * @device: COMEDI device to which this subdevice belongs. (Initialized by 31 * @index: Index of this subdevice within device's array of subdevices. 34 * the low-level driver.) 36 * low-level driver.) [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/ |
| H A D | gk20a.c | 53 struct nvkm_clk *clk = pmu->base.subdev.device->clk; in gk20a_pmu_dvfs_target() 61 struct nvkm_clk *clk = pmu->base.subdev.device->clk; in gk20a_pmu_dvfs_get_cur_state() 63 *state = clk->pstate; in gk20a_pmu_dvfs_get_cur_state() 70 struct gk20a_pmu_dvfs_data *data = pmu->data; in gk20a_pmu_dvfs_get_target_state() 71 struct nvkm_clk *clk = pmu->base.subdev.device->clk; in gk20a_pmu_dvfs_get_target_state() 72 int cur_level, level; in gk20a_pmu_dvfs_get_target_state() local 74 /* For GK20A, the performance level is directly mapped to pstate */ in gk20a_pmu_dvfs_get_target_state() 75 level = cur_level = clk->pstate; in gk20a_pmu_dvfs_get_target_state() 77 if (load > data->p_load_max) { in gk20a_pmu_dvfs_get_target_state() 78 level = min(clk->state_nr - 1, level + (clk->state_nr / 3)); in gk20a_pmu_dvfs_get_target_state() [all …]
|
| /linux/drivers/scsi/esas2r/ |
| H A D | esas2r_log.c | 5 * Copyright (c) 2001-2013 ATTO Technology, Inc. 21 * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, 40 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 48 * the event_log_level module parameter controls the level of messages that are 49 * written to the system log. the default level of messages that are written 57 * to the system log. if critical, warning, and information-level messages are 70 …"Specifies the level of events to report to the system log. Critical and warning level events are… 79 * translates an esas2r-defined logging event level to a kernel logging level. 81 * @param [in] level the esas2r-defined logging event level to translate 83 * @return the corresponding kernel logging level. [all …]
|
| /linux/Documentation/infiniband/ |
| H A D | core_locking.rst | 7 both low-level drivers that sit below the midlayer and upper level 13 With the following exceptions, a low-level driver implementation of 17 - create_ah 18 - modify_ah 19 - query_ah 20 - destroy_ah 21 - post_send 22 - post_recv 23 - poll_cq 24 - req_notify_cq [all …]
|
| /linux/Documentation/ABI/obsolete/ |
| H A D | sysfs-bus-usb | 1 What: /sys/bus/usb/devices/.../power/level 6 Each USB device directory will contain a file named 7 power/level. This file holds a power-level setting for 8 the device, either "on" or "auto". 10 "on" means that the device is not allowed to autosuspend, 12 be honored. "auto" means the device will autosuspend 17 level. The "on" level is meant for administrative uses. 18 If you want to suspend a device immediately but leave it 22 Device not capable of proper suspend and resume should be 23 left in the "on" level. Although the USB spec requires [all …]
|
| /linux/include/linux/ |
| H A D | pm_opp.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 5 * Copyright (C) 2009-2010 Texas Instruments Incorporated. 23 struct device; 32 * struct dev_pm_opp_supply - Power supply voltage/current values 36 * @u_amp: Maximum current drawn by the device in microamperes 37 * @u_watt: Power used by the device in microwatts 50 typedef int (*config_regulators_t)(struct device *de 96 unsigned int level; global() member 324 dev_pm_opp_find_level_exact(struct device * dev,unsigned int level) dev_pm_opp_find_level_exact() argument 330 dev_pm_opp_find_level_ceil(struct device * dev,unsigned int * level) dev_pm_opp_find_level_ceil() argument 336 dev_pm_opp_find_level_floor(struct device * dev,unsigned int * level) dev_pm_opp_find_level_floor() argument 721 dev_pm_opp_set_level(struct device * dev,unsigned int level) dev_pm_opp_set_level() argument [all...] |
| H A D | pm.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * pm.h - Power management interface 26 struct device; /* we have a circular dep with device.h */ 28 extern void pm_vt_switch_required(struct device *dev, bool required); 29 extern void pm_vt_switch_unregister(struct device *dev); 31 static inline void pm_vt_switch_required(struct device *dev, bool required) in pm_vt_switch_required() 34 static inline void pm_vt_switch_unregister(struct device *dev) in pm_vt_switch_unregister() 49 * Device power management 64 * struct dev_pm_ops - device PM callbacks. 67 * the device from being registered after it has returned (the driver's [all …]
|
| /linux/drivers/block/drbd/ |
| H A D | drbd_polymorph_printk.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 15 #define __drbd_printk_drbd_device_prep(device) \ argument 16 const struct drbd_device *__d = (device); \ 17 const struct drbd_resource *__r = __d->resource 19 #define __drbd_printk_drbd_device_args() __r->name, __d->vnr, __d->minor 25 __d = (peer_device)->device; \ 26 __r = __d->resource 30 __r->name, __d->vnr, __d->minor 36 #define __drbd_printk_drbd_resource_args() __r->name 41 const struct drbd_resource *__r = __c->resource [all …]
|
| /linux/drivers/iommu/intel/ |
| H A D | pasid.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * pasid.h - PASID idr, table and entry header 22 #define is_pasid_enabled(entry) (((entry)->lo >> 3) & 0x1) 23 #define get_pasid_dir_size(entry) (1 << ((((entry)->lo >> 9) & 0x7) + 7)) 29 * The PASID_FLAG_FL5LP flag Indicates using 5-level paging for first- 30 * level translation, otherwise, 4-level paging will be used. 56 return READ_ONCE(pde->val) & PASID_PTE_PRESENT; in pasid_pde_is_present() 66 return phys_to_virt(READ_ONCE(pde->val) & PDE_PFN_MASK); in get_pasid_table_from_pde() 72 return READ_ONCE(pte->val[0]) & PASID_PTE_PRESENT; in pasid_pte_is_present() 78 return READ_ONCE(pte->val[0]) & PASID_PTE_FPD; in pasid_pte_is_fault_disabled() [all …]
|
| /linux/Documentation/firmware-guide/acpi/ |
| H A D | video_extension.rst | 1 .. SPDX-License-Identifier: GPL-2.0 10 defining the video POST device, retrieving EDID information or to 12 only. It may or may not work for your integrated video device. 16 Export a sysfs interface for user space to control backlight level 19 If the ACPI table has a video device, and acpi_backlight=vendor kernel 20 command line is not present, the driver will register a backlight device 22 interface control. For every registered class device, there will be a 26 Documentation/ABI/stable/sysfs-class-backlight. 32 get the brightness level the firmware thinks it is at; 36 on write, control method _BCM will run to set the requested brightness level; [all …]
|
| /linux/sound/soc/sof/intel/ |
| H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 7 Say Y if you have such a device. 15 This option is not user-selectable but automagically handled by 16 'select' statements at a higher level. 23 This option is not user-selectable but automagically handled by 24 'select' statements at a higher level. 35 This option is not user-selectable but automagically handled by 36 'select' statements at a higher level. 77 DMA and suspend-resume, this is not a recommended option for 95 Say Y if you have such a device. [all …]
|
| /linux/Documentation/power/ |
| H A D | runtime_pm.rst | 5 (C) 2009-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. 15 at the power management core (PM core) level by means of: 17 * The power management workqueue pm_wq in which bus types and device drivers can 18 put their PM-related work items. It is strongly recommended that pm_wq be 20 them to be synchronized with system-wide power transitions (suspend to RAM, 24 * A number of runtime PM fields in the 'power' member of 'struct device' (which 28 * Three device runtime PM callbacks in 'struct dev_pm_ops' (defined in 34 device drivers are encouraged to use these functions. 36 The runtime PM callbacks present in 'struct dev_pm_ops', the device runtime PM 40 2. Device Runtime PM Callbacks [all …]
|
| /linux/Documentation/admin-guide/ |
| H A D | thunderbolt.rst | 1 .. SPDX-License-Identifier: GPL-2.0 7 some differences at the register level among other things. Connection 18 software connection manager in Linux also advertises security level 21 the software connection manager only supports ``user`` security level and 25 ----------------------------------- 27 should be a userspace tool that handles all the low-level details, keeps 31 found in Documentation/ABI/testing/sysfs-bus-thunderbolt. 33 Those users who just want to connect any device without any sort of 35 ``/etc/udev/rules.d/99-local.rules``:: 44 security levels available. Intel Titan Ridge added one more security level [all …]
|
| /linux/drivers/sh/intc/ |
| H A D | userimask.c | 2 * Support for hardware-assisted userspace interrupt masking. 13 #include <linux/device.h> 23 show_intc_userimask(struct device *dev, in show_intc_userimask() 30 store_intc_userimask(struct device *dev, in store_intc_userimask() 34 unsigned long level; in store_intc_userimask() local 37 ret = kstrtoul(buf, 10, &level); in store_intc_userimask() 42 * Minimal acceptable IRQ levels are in the 2 - 16 range, but in store_intc_userimask() 45 * Level 1 is a special case on some CPUs in that it's not in store_intc_userimask() 47 * certain level, we don't care about this limitation here. in store_intc_userimask() 48 * Level 0 on the other hand equates to user masking disabled. in store_intc_userimask() [all …]
|
| /linux/Documentation/networking/ |
| H A D | nfc.rst | 6 NFC device drivers development and to create an unified userspace interface. 8 This document covers the architecture overview, the device driver interface 15 - NFC adapters management; 16 - Polling for targets; 17 - Low-level data exchange; 20 providing the device driver interface. On the other side, it is also 21 responsible for providing an interface to control operations and low-level 26 The low-level data exchange interface is provided by the new socket family 29 .. code-block:: none 31 +--------------------------------------+ [all …]
|
| /linux/Documentation/driver-api/media/drivers/ |
| H A D | pvrusb2.rst | 1 .. SPDX-License-Identifier: GPL-2.0 9 ---------- 13 Its history started with the reverse-engineering effort by Björn 29 1. Low level wire-protocol implementation with the device. 34 3. High level hardware driver implementation which coordinates all 35 activities that ensure correct operation of the device. 38 tear-down, arbitration, and interaction with high level 42 5. High level interfaces which glue the driver to various published 54 right now the V4L high level interface is the most complete, the 55 sysfs high level interface will work equally well for similar [all …]
|
| /linux/drivers/thermal/ |
| H A D | khadas_mcu_fan.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 12 #include <linux/mfd/khadas-mcu.h> 21 unsigned int level; member 26 unsigned int level) in khadas_mcu_fan_set_level() argument 30 ret = regmap_write(ctx->mcu->regmap, KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG, in khadas_mcu_fan_set_level() 31 level); in khadas_mcu_fan_set_level() 35 ctx->level = level; in khadas_mcu_fan_set_level() 51 struct khadas_mcu_fan_ctx *ctx = cdev->devdata; in khadas_mcu_fan_get_cur_state() 53 *state = ctx->level; in khadas_mcu_fan_get_cur_state() 62 struct khadas_mcu_fan_ctx *ctx = cdev->devdata; in khadas_mcu_fan_set_cur_state() [all …]
|
| /linux/drivers/edac/ |
| H A D | edac_mc.h | 10 * http://www.anime.net/~goemon/linux-ecc/ 15 * Refactored for multi-source files: 18 * Please look at Documentation/driver-api/edac.rst for more info about 41 #define PAGES_TO_MiB(pages) ((pages) >> (20 - PAGE_SHIFT)) 42 #define MiB_TO_PAGES(mb) ((mb) << (20 - PAGE_SHIFT)) 44 #define PAGES_TO_MiB(pages) ((pages) << (PAGE_SHIFT - 20)) 45 #define MiB_TO_PAGES(mb) ((mb) >> (PAGE_SHIFT - 20)) 48 #define edac_printk(level, prefix, fmt, arg...) \ argument 49 printk(level "EDAC " prefix ": " fmt, ##arg) 51 #define edac_mc_printk(mci, level, fmt, arg...) \ argument [all …]
|
| /linux/drivers/gpu/drm/amd/pm/powerplay/smumgr/ |
| H A D | ci_smumgr.c | 100 return -EINVAL; in ci_set_smc_sram_address() 103 cgs_write_register(hwmgr->device, mmSMC_IND_INDEX_0, smc_addr); in ci_set_smc_sram_address() 104 PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0); in ci_set_smc_sram_address() 120 return -EINVAL; in ci_copy_bytes_to_smc() 134 cgs_write_register(hwmgr->device, mmSMC_IND_DATA_0, data); in ci_copy_bytes_to_smc() 137 byte_count -= 4; in ci_copy_bytes_to_smc() 151 original_data = cgs_read_register(hwmgr->device, mmSMC_IND_DATA_0); in ci_copy_bytes_to_smc() 153 extra_shift = 8 * (4 - byte_count); in ci_copy_bytes_to_smc() 158 byte_count--; in ci_copy_bytes_to_smc() 170 cgs_write_register(hwmgr->device, mmSMC_IND_DATA_0, data); in ci_copy_bytes_to_smc() [all …]
|
| H A D | fiji_smumgr.c | 88 …/* Voltage, Frequency, DpmLevel, DivId, Level, FuncCntl3, FuncCntl4, Spectrum, Spectrum… 107 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in fiji_start_smu_in_protection_mode() 115 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, in fiji_start_smu_in_protection_mode() 118 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in fiji_start_smu_in_protection_mode() 121 /* De-assert reset */ in fiji_start_smu_in_protection_mode() 122 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in fiji_start_smu_in_protection_mode() 130 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in fiji_start_smu_in_protection_mode() 134 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, in fiji_start_smu_in_protection_mode() 147 if (PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in fiji_start_smu_in_protection_mode() 150 "SMU Firmware start failed!", return -1); in fiji_start_smu_in_protection_mode() [all …]
|
| /linux/Documentation/cdrom/ |
| H A D | cdrom-standard.rst | 2 A Linux CD-ROM standard 14 Linux is probably the Unix-like operating system that supports 18 - The large list of hardware devices available for the many platforms 19 that Linux now supports (i.e., i386-PCs, Sparc Suns, etc.) 20 - The open design of the operating system, such that anybody can write a 22 - There is plenty of source code around as examples of how to write a driver. 28 device driver to differ significantly from one device to another. 29 This divergence of behavior has been very significant for CD-ROM 31 call varies greatly from one device driver to another. To avoid making 32 their drivers totally inconsistent, the writers of Linux CD-ROM [all …]
|
| /linux/scripts/gdb/linux/ |
| H A D | device.py | 1 # SPDX-License-Identifier: GPL-2.0 13 device_type = CachedType('struct device') 60 raise gdb.GdbError("Can't find device class {!r}".format(name)) 75 yield dp['device'] 81 yield dp['device'] 87 yield dp['device'] 90 def _show_device(dev, level=0, recursive=False): argument 91 gdb.write('{}dev {}:\t{}\n'.format('\t' * level, dev_name(dev), dev)) 94 _show_device(child, level + 1, recursive) 101 super(LxDeviceListBus, self).__init__('lx-device-list-bus', gdb.COMMAND_DATA) [all …]
|