/linux/drivers/base/power/ |
H A D | wakeirq.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Device wakeirq helper functions */ 3 #include <linux/device.h> 5 #include <linux/irq.h> 13 * dev_pm_attach_wake_irq - Attach device interrupt as a wake IRQ 14 * @dev: Device entry 15 * @wirq: Wake irq specific data 17 * Internal function to attach a dedicated wake-up interrupt as a wake IRQ. 19 static int dev_pm_attach_wake_irq(struct device *dev, struct wake_irq *wirq) in dev_pm_attach_wake_irq() 24 return -EINVAL; in dev_pm_attach_wake_irq() [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). 28 #include <linux/irq.h> 36 static int acpi_pci_link_add(struct acpi_device *device, 38 static void acpi_pci_link_remove(struct acpi_device *device); 53 * later even the link is disable. Instead, we just repick the active irq 56 u32 active; /* Current IRQ */ 68 struct acpi_device *device; member [all …]
|
H A D | irq.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * ACPI GSI IRQ layer 9 #include <linux/irq.h> 19 * acpi_gsi_to_irq() - Retrieve the linux irq number for a given GSI 20 * @gsi: GSI IRQ number to map 21 * @irq: pointer where linux IRQ number is stored 23 * irq location updated with irq value [>0 on success, 0 on failure] 26 * -EINVAL on failure 28 int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) in acpi_gsi_to_irq() argument 34 *irq = irq_find_mapping(d, gsi); in acpi_gsi_to_irq() [all …]
|
/linux/drivers/pci/ |
H A D | irq.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * PCI IRQ handling code 9 #include <linux/device.h> 19 * pci_request_irq - allocate an interrupt line for a PCI device 20 * @dev: PCI device to operate on 21 * @nr: device-relative interrupt vector index (0-based). 22 * @handler: Function to be called when the IRQ occurs. 26 * @thread_fn: Function called from the IRQ handler thread 27 * If NULL, no IRQ thread is created 29 * @fmt: Printf-like format string naming the handler [all …]
|
/linux/arch/x86/pci/ |
H A D | irq.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Low-Level PCI Support for PC -- Routing of Interrupts 5 * (c) 1999--2000 Martin Mares <mj@ucw.cz> 18 #include <linux/irq.h> 22 #include <asm/pc-conf-reg.h> 52 u16 vendor, device; member 57 int irq); 62 int (*probe)(struct irq_router *r, struct pci_dev *router, u16 device); 69 * Check passed address for the PCI IRQ Routing Table signature 81 if (rt->signature != PIRQ_SIGNATURE || in pirq_check_routing_table() [all …]
|
/linux/drivers/base/ |
H A D | auxiliary_sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0 29 guard(mutex)(&auxdev->sysfs.lock); in auxiliary_irq_dir_prepare() 30 if (auxdev->sysfs.irq_dir_exists) in auxiliary_irq_dir_prepare() 33 ret = devm_device_add_group(&auxdev->dev, &auxiliary_irqs_group); in auxiliary_irq_dir_prepare() 37 auxdev->sysfs.irq_dir_exists = true; in auxiliary_irq_dir_prepare() 38 xa_init(&auxdev->sysfs.irqs); in auxiliary_irq_dir_prepare() 43 * auxiliary_device_sysfs_irq_add - add a sysfs entry for the given IRQ 44 * @auxdev: auxiliary bus device to add the sysfs entry. 45 * @irq: The associated interrupt number. 47 * This function should be called after auxiliary device have successfully [all …]
|
H A D | platform.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * platform.c - platform 'pseudo' bus for legacy devices 5 * Copyright (c) 2002-3 Patrick Mochel 6 * Copyright (c) 2002-3 Open Source Development Labs 8 * Please see Documentation/driver-api/driver-model/platform.rst for more 20 #include <linux/dma-mapping.h> 28 #include <linux/clk/clk-conf.h> 34 #include <linux/dma-map-ops.h> 39 /* For automatically allocated device IDs */ 42 struct device platform_bus = { [all …]
|
/linux/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_irq.c | 33 * passed to amdgpu IRQ handler which is responsible for detecting source and 41 * For GPU interrupt sources that may be driven by another driver, IRQ domain 45 #include <linux/irq.h> 118 * amdgpu_irq_disable_all - disable *all* interrupts 120 * @adev: amdgpu device pointer 130 spin_lock_irqsave(&adev->irq.lock, irqflags); in amdgpu_irq_disable_all() 132 if (!adev->irq.client[i].sources) in amdgpu_irq_disable_all() 136 struct amdgpu_irq_src *src = adev->irq.client[i].sources[j]; in amdgpu_irq_disable_all() 138 if (!src || !src->funcs->set || !src->num_types) in amdgpu_irq_disable_all() 141 for (k = 0; k < src->num_types; ++k) { in amdgpu_irq_disable_all() [all …]
|
/linux/arch/alpha/kernel/ |
H A D | smc37c669.c | 60 * er 28-Jan-1997 Initial Entry 67 ** Macros for handling device IRQs 69 ** The mask acts as a flag used in mapping actual ISA IRQs (0 - 15) 70 ** to device IRQs (A - H). 81 ** Macros for handling device DRQs 84 ** channels to device DMA channels (A - C). 97 ** SMC37c669 Device Function Definitions 107 ** Default Device Function Mappings 127 ** SMC 37c669 Device IRQs 139 ** SMC 37c669 Device DMA Channel Definitions [all …]
|
H A D | sys_takara.c | 1 // SPDX-License-Identifier: GPL-2.0 21 #include <asm/irq.h> 34 static unsigned long cached_irq_mask[2] = { -1, -1 }; 37 takara_update_irq_hw(unsigned long irq, unsigned long mask) in takara_update_irq_hw() argument 41 mask = (irq >= 64 ? mask << 16 : mask >> ((irq - 16) & 0x30)); in takara_update_irq_hw() 42 regaddr = 0x510 + (((irq - 16) >> 2) & 0x0c); in takara_update_irq_hw() 49 unsigned int irq = d->irq; in takara_enable_irq() local 51 mask = (cached_irq_mask[irq >= 64] &= ~(1UL << (irq & 63))); in takara_enable_irq() 52 takara_update_irq_hw(irq, mask); in takara_enable_irq() 58 unsigned int irq = d->irq; in takara_disable_irq() local [all …]
|
/linux/drivers/gpu/drm/radeon/ |
H A D | radeon_irq_kms.c | 47 * radeon_driver_irq_handler_kms - irq handler for KMS 49 * This is the irq handler for the radeon KMS driver (all asics). 50 * radeon_irq_process is a macro that points to the per-asic 51 * irq handler callback. 53 static irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg) in radeon_driver_irq_handler_kms() argument 56 struct radeon_device *rdev = dev->dev_private; in radeon_driver_irq_handler_kms() 61 pm_runtime_mark_last_busy(dev->dev); in radeon_driver_irq_handler_kms() 69 * radeon_hotplug_work_func - display hotplug work handler 74 * The work gets scheduled from the irq handler if there 84 struct drm_mode_config *mode_config = &dev->mode_config; in radeon_hotplug_work_func() [all …]
|
/linux/sound/drivers/mpu401/ |
H A D | mpu401.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Driver for generic MPU-401 boards (UART mode only) 18 MODULE_DESCRIPTION("MPU-401 UART"); 21 static int index[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -2}; /* exclude the first card */ 25 static bool pnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; 27 static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* MPU-401 port number */ 28 static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* MPU-401 IRQ */ variable 29 static bool uart_enter[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; 32 MODULE_PARM_DESC(index, "Index value for MPU-401 device."); 34 MODULE_PARM_DESC(id, "ID string for MPU-401 device."); [all …]
|
/linux/Documentation/devicetree/bindings/interrupt-controller/ |
H A D | st,stih407-irq-syscfg.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/interrupt-controller/st,stih407-irq-syscfg.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Patrice Chotard <patrice.chotard@foss.st.com> 15 Configuration registers. This device is used to unmask them prior to use. 19 const: st,stih407-irq-syscfg 22 description: Phandle to Cortex-A9 IRQ system config registers 25 st,irq-device: 27 $ref: /schemas/types.yaml#/definitions/uint32-array [all …]
|
/linux/drivers/of/ |
H A D | irq.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Derived from arch/i386/kernel/irq.c 6 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 8 * Copyright (C) 1996-2001 Cort Dougan 12 * This file contains the code used to make IRQ descriptions in the 13 * device tree to actual irq numbers on an interrupt controller 19 #include <linux/device.h> 31 * irq_of_parse_and_map - Parse and map an interrupt into linux virq space 32 * @dev: Device node of the device whose interrupt is to be mapped 50 * of_irq_find_parent - Given a device node, find its interrupt parent node [all …]
|
/linux/include/linux/ |
H A D | interrupt.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 21 #include <asm/irq.h> 42 * irq handling routines. 44 * IRQF_SHARED - allow sharing the irq among several devices 45 * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur 46 * IRQF_TIMER - Flag to mark this interrupt as timer interrupt 47 * IRQF_PERCPU - Interrupt is per cpu 48 * IRQF_NOBALANCING - Flag to exclude this interrupt from irq balancing 49 * IRQF_IRQPOLL - Interrupt is used for polling (only the interrupt that is 52 * IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler finished. [all …]
|
H A D | pm_wakeirq.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* pm_wakeirq.h - Device wakeirq helper functions */ 9 extern int dev_pm_set_wake_irq(struct device *dev, int irq); 10 extern int dev_pm_set_dedicated_wake_irq(struct device *dev, int irq); 11 extern int dev_pm_set_dedicated_wake_irq_reverse(struct device *dev, int irq); 12 extern void dev_pm_clear_wake_irq(struct device *dev); 16 static inline int dev_pm_set_wake_irq(struct device *dev, int irq) in dev_pm_set_wake_irq() argument 21 static inline int dev_pm_set_dedicated_wake_irq(struct device *dev, int irq) in dev_pm_set_dedicated_wake_irq() argument 26 static inline int dev_pm_set_dedicated_wake_irq_reverse(struct device *dev, int irq) in dev_pm_set_dedicated_wake_irq_reverse() argument 31 static inline void dev_pm_clear_wake_irq(struct device *dev) in dev_pm_clear_wake_irq()
|
/linux/arch/arm64/kvm/vgic/ |
H A D | vgic-its.c | 1 // SPDX-License-Identifier: GPL-2.0-only 17 #include <linux/irqchip/arm-gic-v3.h> 24 #include "vgic-mmio.h" 31 static int update_lpi_config(struct kvm *kvm, struct vgic_irq *irq, 36 int __sz = vgic_its_get_abi(i)->t##_esz; \ 37 struct kvm *__k = (i)->dev->kvm; \ 44 __ret = -EINVAL; \ 53 int __sz = vgic_its_get_abi(i)->t##_esz; \ 54 struct kvm *__k = (i)->dev->kvm; \ 62 __ret = -EINVAL; \ [all …]
|
/linux/arch/mips/pci/ |
H A D | msi-octeon.c | 6 * Copyright (C) 2005-2009, 2010 Cavium Networks 15 #include <asm/octeon/cvmx-npi-defs.h> 16 #include <asm/octeon/cvmx-pci-defs.h> 17 #include <asm/octeon/cvmx-npei-defs.h> 18 #include <asm/octeon/cvmx-sli-defs.h> 19 #include <asm/octeon/cvmx-pexp-defs.h> 20 #include <asm/octeon/pci-octeon.h> 29 * Each bit in msi_multiple_irq_bitmask tells that the device using 31 * is used so we can disable all of the MSI interrupts when a device 49 * arch_setup_msi_irq() - setup MSI IRQs for a device [all …]
|
/linux/drivers/gpu/drm/i915/display/ |
H A D | intel_lpe_audio.c | 24 * Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> 34 * Atom platforms (e.g. valleyview and cherryTrail) integrates a DMA-based 41 * subsystems, a bridge is setup between the hdmi-lpe-audio and i915: 42 * 1. Create a platform device to share MMIO/IRQ resources 43 * 2. Make the platform device child of i915 device for runtime PM. 44 * 3. Create IRQ chip to forward the LPE audio irqs. 45 * the hdmi-lpe-audio driver probes the lpe audio device and creates a new 49 * Due to the restriction in Linux platform device model, user need manually 50 * uninstall the hdmi-lpe-audio driver before uninstalling i915 module, 51 * otherwise we might run into use-after-free issues after i915 removes the [all …]
|
/linux/drivers/misc/mei/ |
H A D | pci-txe.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2013-2020, Intel Corporation. All rights reserved. 9 #include <linux/device.h> 24 #include "hw-txe.h" 43 * mei_txe_probe - Device Initialization Routine 45 * @pdev: PCI device structure 60 dev_err(&pdev->dev, "failed to enable pci device.\n"); in mei_txe_probe() 65 /* pci request regions and mapping IO device memory for mei driver */ in mei_txe_probe() 68 dev_err(&pdev->dev, "failed to get pci regions.\n"); in mei_txe_probe() 72 err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(36)); in mei_txe_probe() [all …]
|
/linux/Documentation/admin-guide/ |
H A D | parport.rst | 4 The ``parport`` code provides parallel-port support under Linux. This 5 includes the ability to share one port between multiple device 12 because there are a lot of people using the same IRQ for their 16 port-sharing) and architecture-dependent (which deals with actually 28 architecture-dependent code with (for example):: 30 # insmod parport_pc io=0x3bc,0x378,0x278 irq=none,7,auto 32 to tell the ``parport`` code that you want three PC-style ports, one at 33 0x3bc with no IRQ, one at 0x378 using IRQ 7, and one at 0x278 with an 34 auto-detected IRQ. Currently, PC-style (``parport_pc``), Sun ``bpp``, 43 -------- [all …]
|
/linux/drivers/iio/ |
H A D | industrialio-trigger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 #include <linux/device.h> 17 #include <linux/iio/iio-opaque.h> 23 /* RFC - Question of approach 41 * name_show() - retrieve useful identifying name 42 * @dev: device associated with the iio_trigger 50 static ssize_t name_show(struct device *dev, struct device_attribute *attr, in name_show() 55 return sysfs_emit(buf, "%s\n", trig->name); in name_show() 72 trig_info->id = ida_alloc(&iio_trigger_ida, GFP_KERNEL); in iio_trigger_register() 73 if (trig_info->id < 0) in iio_trigger_register() [all …]
|
/linux/drivers/input/misc/ |
H A D | palmas-pwrbutton.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2012-2014 Texas Instruments Incorporated - http://www.ti.com/ 26 * struct palmas_pwron - Palmas power on data 27 * @palmas: pointer to palmas device 28 * @input_dev: pointer to input device 30 * @irq: irq that we are hooked on to 36 int irq; member 40 * struct palmas_pwron_config - configuration of palmas power on 50 * palmas_power_button_work() - Detects the button release event 58 struct input_dev *input_dev = pwron->input_dev; in palmas_power_button_work() [all …]
|
/linux/Documentation/power/ |
H A D | suspend-and-interrupts.rst | 2 System Suspend and Device Interrupts 9 Suspending and Resuming Device IRQs 10 ----------------------------------- 12 Device interrupt request lines (IRQs) are generally disabled during system 14 ->prepare, ->suspend and ->suspend_late callbacks have been executed for all 17 The rationale for doing so is that after the "late" phase of device suspend 21 interrupt handlers for shared IRQs that device drivers implementing them were 26 of suspend_device_irqs(), along with the "noirq" phase of device suspend and 29 Device IRQs are re-enabled during system resume, right before the "early" phase 30 of resuming devices (that is, before starting to execute ->resume_early [all …]
|
/linux/drivers/input/serio/ |
H A D | xilinx_ps2.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Xilinx XPS PS/2 device driver 24 /* Register offsets for the xps2 device */ 66 int irq; member 71 struct device *dev; 79 * xps2_recv() - attempts to receive a byte from the PS/2 port. 80 * @drvdata: pointer to ps2 device private data structure 89 int status = -1; in xps2_recv() 92 sr = in_be32(drvdata->base_address + XPS2_STATUS_OFFSET); in xps2_recv() 94 *byte = in_be32(drvdata->base_address + XPS2_RX_DATA_OFFSET); in xps2_recv() [all …]
|