15229e87dSLen BrownWhat:		/sys/firmware/acpi/interrupts/
25229e87dSLen BrownDate:		February 2008
35229e87dSLen BrownContact:	Len Brown <lenb@kernel.org>
45229e87dSLen BrownDescription:
55229e87dSLen Brown		All ACPI interrupts are handled via a single IRQ,
65229e87dSLen Brown		the System Control Interrupt (SCI), which appears
75229e87dSLen Brown		as "acpi" in /proc/interrupts.
85229e87dSLen Brown
95229e87dSLen Brown		However, one of the main functions of ACPI is to make
105229e87dSLen Brown		the platform understand random hardware without
115229e87dSLen Brown		special driver support.  So while the SCI handles a few
125229e87dSLen Brown		well known (fixed feature) interrupts sources, such
135229e87dSLen Brown		as the power button, it can also handle a variable
145229e87dSLen Brown		number of a "General Purpose Events" (GPE).
155229e87dSLen Brown
165229e87dSLen Brown		A GPE vectors to a specified handler in AML, which
175229e87dSLen Brown		can do a anything the BIOS writer wants from
185229e87dSLen Brown		OS context.  GPE 0x12, for example, would vector
195229e87dSLen Brown		to a level or edge handler called _L12 or _E12.
205229e87dSLen Brown		The handler may do its business and return.
215229e87dSLen Brown		Or the handler may send send a Notify event
225229e87dSLen Brown		to a Linux device driver registered on an ACPI device,
235229e87dSLen Brown		such as a battery, or a processor.
245229e87dSLen Brown
255229e87dSLen Brown		To figure out where all the SCI's are coming from,
265229e87dSLen Brown		/sys/firmware/acpi/interrupts contains a file listing
275229e87dSLen Brown		every possible source, and the count of how many
285229e87dSLen Brown		times it has triggered.
295229e87dSLen Brown
305229e87dSLen Brown		$ cd /sys/firmware/acpi/interrupts
315229e87dSLen Brown		$ grep . *
325229e87dSLen Brown		error:0
335229e87dSLen Brown		ff_gbl_lock:0
345229e87dSLen Brown		ff_pmtimer:0
355229e87dSLen Brown		ff_pwr_btn:0
365229e87dSLen Brown		ff_rt_clk:0
375229e87dSLen Brown		ff_slp_btn:0
385229e87dSLen Brown		gpe00:0
395229e87dSLen Brown		gpe01:0
405229e87dSLen Brown		gpe02:0
415229e87dSLen Brown		gpe03:0
425229e87dSLen Brown		gpe04:0
435229e87dSLen Brown		gpe05:0
445229e87dSLen Brown		gpe06:0
455229e87dSLen Brown		gpe07:0
465229e87dSLen Brown		gpe08:0
475229e87dSLen Brown		gpe09:174
485229e87dSLen Brown		gpe0A:0
495229e87dSLen Brown		gpe0B:0
505229e87dSLen Brown		gpe0C:0
515229e87dSLen Brown		gpe0D:0
525229e87dSLen Brown		gpe0E:0
535229e87dSLen Brown		gpe0F:0
545229e87dSLen Brown		gpe10:0
555229e87dSLen Brown		gpe11:60
565229e87dSLen Brown		gpe12:0
575229e87dSLen Brown		gpe13:0
585229e87dSLen Brown		gpe14:0
595229e87dSLen Brown		gpe15:0
605229e87dSLen Brown		gpe16:0
615229e87dSLen Brown		gpe17:0
625229e87dSLen Brown		gpe18:0
635229e87dSLen Brown		gpe19:7
645229e87dSLen Brown		gpe1A:0
655229e87dSLen Brown		gpe1B:0
665229e87dSLen Brown		gpe1C:0
675229e87dSLen Brown		gpe1D:0
685229e87dSLen Brown		gpe1E:0
695229e87dSLen Brown		gpe1F:0
705229e87dSLen Brown		gpe_all:241
715229e87dSLen Brown		sci:241
725229e87dSLen Brown
735229e87dSLen Brown		sci - The total number of times the ACPI SCI
745229e87dSLen Brown		has claimed an interrupt.
755229e87dSLen Brown
765229e87dSLen Brown		gpe_all - count of SCI caused by GPEs.
775229e87dSLen Brown
785229e87dSLen Brown		gpeXX - count for individual GPE source
795229e87dSLen Brown
805229e87dSLen Brown		ff_gbl_lock - Global Lock
815229e87dSLen Brown
825229e87dSLen Brown		ff_pmtimer - PM Timer
835229e87dSLen Brown
845229e87dSLen Brown		ff_pwr_btn - Power Button
855229e87dSLen Brown
865229e87dSLen Brown		ff_rt_clk - Real Time Clock
875229e87dSLen Brown
885229e87dSLen Brown		ff_slp_btn - Sleep Button
895229e87dSLen Brown
905229e87dSLen Brown		error - an interrupt that can't be accounted for above.
915229e87dSLen Brown
925229e87dSLen Brown		Root has permission to clear any of these counters.  Eg.
935229e87dSLen Brown		# echo 0 > gpe11
945229e87dSLen Brown
955229e87dSLen Brown		All counters can be cleared by clearing the total "sci":
965229e87dSLen Brown		# echo 0 > sci
975229e87dSLen Brown
985229e87dSLen Brown		None of these counters has an effect on the function
995229e87dSLen Brown		of the system, they are simply statistics.
100