Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\irq\manage.c Create Date:2022-07-28 10:09:26
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__irq_set_trigger

Proto:int __irq_set_trigger(struct irq_desc *desc, unsigned long flags)

Type:int

Parameter:

TypeParameterName
struct irq_desc *desc
unsigned longflags
751  chip = chip
752  unmask = 0
754  If Not chip || Not irq_set_type Then
759  pr_debug("No set_type function for IRQ %d (%s)\n", irq_desc_get_irq(desc), chip ? (interrupt' name ? : "unknown") : "unknown")
762  Return 0
765  If flags & IRQCHIP_SET_TYPE_MASKED Then
766  If Not irqd_irq_masked( & irq_data) Then mask_irq(desc)
768  If Not irqd_irq_disabled( & irq_data) Then unmask = 1
773  flags &= IRQ_TYPE_SENSE_MASK
774  ret = irq_set_type( & irq_data, flags)
777  Case ret == IRQ_SET_MASK_OK
778  Case ret == IRQ_SET_MASK_OK_DONE
779  irqd_clear( & irq_data, IRQD_TRIGGER_MASK)
780  irqd_set( & irq_data, flags)
783  Case ret == IRQ_SET_MASK_OK_NOCOPY
784  flags = irqd_get_trigger_type( & irq_data)
785  irq_settings_set_trigger_mask(desc, flags)
786  irqd_clear( & irq_data, IRQD_LEVEL)
787  irq_settings_clr_level(desc)
788  If flags & IRQ_TYPE_LEVEL_MASK Then
793  ret = 0
794  Break
795  Default
796  pr_err("Setting trigger mode %lu for irq %u failed (%pS)\n", flags, irq_desc_get_irq(desc), irq_set_type)
799  If unmask Then unmask_irq(desc)
801  Return ret
Caller
NameDescribe
__setup_irqregister an interrupt
enable_percpu_irq
irq_set_irq_typeq_set_type - set the irq trigger type for an irq*@irq: irq number*@type: IRQ_TYPE_{LEVEL,EDGE}_* value - see include/linux/irq.h
__irq_do_set_handler