1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct irq_chip_generic</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux generic IRQ handling"><link rel="up" href="structs.html" title="Chapter 8. Structures"><link rel="prev" href="API-struct-irq-chip-type.html" title="struct irq_chip_type"><link rel="next" href="API-enum-irq-gc-flags.html" title="enum irq_gc_flags"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct irq_chip_generic</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-irq-chip-type.html">Prev</a> </td><th width="60%" align="center">Chapter 8. Structures</th><td width="20%" align="right"> <a accesskey="n" href="API-enum-irq-gc-flags.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-irq-chip-generic"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct irq_chip_generic — 2 Generic irq chip data structure 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct irq_chip_generic { 5 raw_spinlock_t lock; 6 void __iomem * reg_base; 7 u32 (* reg_readl) (void __iomem *addr); 8 void (* reg_writel) (u32 val, void __iomem *addr); 9 void (* suspend) (struct irq_chip_generic *gc); 10 void (* resume) (struct irq_chip_generic *gc); 11 unsigned int irq_base; 12 unsigned int irq_cnt; 13 u32 mask_cache; 14 u32 type_cache; 15 u32 polarity_cache; 16 u32 wake_enabled; 17 u32 wake_active; 18 unsigned int num_ct; 19 void * private; 20 unsigned long installed; 21 unsigned long unused; 22 struct irq_domain * domain; 23 struct list_head list; 24 struct irq_chip_type chip_types[0]; 25}; </pre></div><div class="refsect1"><a name="id-1.10.8.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">lock</span></dt><dd><p> 26 Lock to protect register and cache data access 27 </p></dd><dt><span class="term">reg_base</span></dt><dd><p> 28 Register base address (virtual) 29 </p></dd><dt><span class="term">reg_readl</span></dt><dd><p> 30 Alternate I/O accessor (defaults to readl if NULL) 31 </p></dd><dt><span class="term">reg_writel</span></dt><dd><p> 32 Alternate I/O accessor (defaults to writel if NULL) 33 </p></dd><dt><span class="term">suspend</span></dt><dd><p> 34 Function called from core code on suspend once per 35 chip; can be useful instead of irq_chip::suspend to 36 handle chip details even when no interrupts are in use 37 </p></dd><dt><span class="term">resume</span></dt><dd><p> 38 Function called from core code on resume once per chip; 39 </p></dd><dt><span class="term">irq_base</span></dt><dd><p> 40 Interrupt base nr for this chip 41 </p></dd><dt><span class="term">irq_cnt</span></dt><dd><p> 42 Number of interrupts handled by this chip 43 </p></dd><dt><span class="term">mask_cache</span></dt><dd><p> 44 Cached mask register shared between all chip types 45 </p></dd><dt><span class="term">type_cache</span></dt><dd><p> 46 Cached type register 47 </p></dd><dt><span class="term">polarity_cache</span></dt><dd><p> 48 Cached polarity register 49 </p></dd><dt><span class="term">wake_enabled</span></dt><dd><p> 50 Interrupt can wakeup from suspend 51 </p></dd><dt><span class="term">wake_active</span></dt><dd><p> 52 Interrupt is marked as an wakeup from suspend source 53 </p></dd><dt><span class="term">num_ct</span></dt><dd><p> 54 Number of available irq_chip_type instances (usually 1) 55 </p></dd><dt><span class="term">private</span></dt><dd><p> 56 Private data for non generic chip callbacks 57 </p></dd><dt><span class="term">installed</span></dt><dd><p> 58 bitfield to denote installed interrupts 59 </p></dd><dt><span class="term">unused</span></dt><dd><p> 60 bitfield to denote unused interrupts 61 </p></dd><dt><span class="term">domain</span></dt><dd><p> 62 irq domain pointer 63 </p></dd><dt><span class="term">list</span></dt><dd><p> 64 List head for keeping track of instances 65 </p></dd><dt><span class="term">chip_types[0]</span></dt><dd><p> 66 Array of interrupt irq_chip_types 67 </p></dd></dl></div></div><div class="refsect1"><a name="id-1.10.8.6"></a><h2>can be useful instead of irq_chip</h2><p> 68 :suspend to handle 69 chip details even when no interrupts are in use 70</p></div><div class="refsect1"><a name="id-1.10.8.7"></a><h2>Description</h2><p> 71 Note, that irq_chip_generic can have multiple irq_chip_type 72 implementations which can be associated to a particular irq line of 73 an irq_chip_generic instance. That allows to share and protect 74 state in an irq_chip_generic instance when we need to implement 75 different flow mechanisms (level/edge) for it. 76</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-irq-chip-type.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="structs.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-enum-irq-gc-flags.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct irq_chip_type</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">enum irq_gc_flags</span></td></tr></table></div></body></html> 77