public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] GPE block driver [2/2]
@ 2004-11-12  8:23 Li, Shaohua
  2004-11-12 13:11 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Li, Shaohua @ 2004-11-12  8:23 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-ia64-u79uwXL29TY76Z2rM5mHXA

>GPE blocks are used to extend the number of events that ACPI can
handle,
>particularly on larger machines.
>
>Index: linux-2.6/drivers/acpi/Kconfig
>===================================================================
>RCS file: /var/cvs/linux-2.6/drivers/acpi/Kconfig,v
>retrieving revision 1.13
>diff -u -p -r1.13 Kconfig
>--- linux-2.6/drivers/acpi/Kconfig	11 Oct 2004 21:41:01 -0000
1.13
>+++ linux-2.6/drivers/acpi/Kconfig	7 Nov 2004 14:34:33 -0000
>@@ -119,6 +119,15 @@ config ACPI_FAN
> 	  This driver adds support for ACPI fan devices, allowing
user-mode
> 	  applications to perform basic fan control (on, off, status).
>
>+config ACPI_GPE_BLOCK
>+	tristate "GPE block"
>+	depends on ACPI_INTERPRETER
>+	depends on !IA64_SGI_SN
>+	default m
>+	help
>+	  GPE block devices are used to increase the number of
interrupts
>+	  available on larger machines.
>+
> config ACPI_PROCESSOR
> 	tristate "Processor"
> 	depends on ACPI_INTERPRETER
>Index: linux-2.6/drivers/acpi/Makefile
>===================================================================
>RCS file: /var/cvs/linux-2.6/drivers/acpi/Makefile,v
>retrieving revision 1.4
>diff -u -p -r1.4 Makefile
>--- linux-2.6/drivers/acpi/Makefile	13 Sep 2004 15:22:51 -0000
1.4
>+++ linux-2.6/drivers/acpi/Makefile	7 Nov 2004 14:34:33 -0000
>@@ -38,6 +38,7 @@ obj-$(CONFIG_ACPI_BATTERY)	+= battery.o
> obj-$(CONFIG_ACPI_BUTTON)	+= button.o
> obj-$(CONFIG_ACPI_EC)		+= ec.o
> obj-$(CONFIG_ACPI_FAN)		+= fan.o
>+obj-$(CONFIG_ACPI_GPE_BLOCK)	+= gpe-block.o
> obj-$(CONFIG_ACPI_PCI)		+= pci_root.o pci_link.o
pci_irq.o pci_bind.o
> obj-$(CONFIG_ACPI_POWER)	+= power.o
> obj-$(CONFIG_ACPI_PROCESSOR)	+= processor.o
>Index: linux-2.6/drivers/acpi/gpe-block.c
>===================================================================
>RCS file: linux-2.6/drivers/acpi/gpe-block.c
>diff -N linux-2.6/drivers/acpi/gpe-block.c
>--- /dev/null	1 Jan 1970 00:00:00 -0000
>+++ linux-2.6/drivers/acpi/gpe-block.c	7 Nov 2004 14:34:33 -0000
>@@ -0,0 +1,155 @@
>+/*
>+ * drivers/acpi/gpe-block.c
>+ *
>+ * Copyright (c) Matthew Wilcox for Hewlett Packard 2004
>+ *
>+ * This program is free software; you can redistribute it and/or
modify
>+ * it under the terms of the GNU General Public License as published
by
>+ * the Free Software Foundation; either version 2 of the License, or
(at
>+ * your option) any later version.
>+ */
>+
>+#include <linux/acpi.h>
>+#include <linux/ioport.h>
>+#include <linux/module.h>
>+#include <acpi/acpi_bus.h>
>+#include <acpi/acpi_drivers.h>
>+#include <acpi/acpixf.h>
>+
>+MODULE_AUTHOR("Matthew Wilcox <willy-VXdhtT5mjnY@public.gmane.org>");
>+MODULE_LICENSE("GPL");
>+MODULE_VERSION("0.2");
>+
>+#define NAME "gpe-block"
>+
>+struct gpe_block {
>+	struct acpi_generic_address address;
>+	u32 register_count;
>+	u32 interrupt_level;
>+};
>+
>+static acpi_status acpi_gpe_block_crs_irq(struct acpi_resource_ext_irq
>*irq,
>+		struct gpe_block *data)
>+{
>+	acpi_register_gsi(irq->interrupts[0], irq->edge_level,
>+			irq->active_high_low);
>+	data->interrupt_level = irq->interrupts[0];
>+	return AE_OK;
>+}
Hi Matthew,
Will you send a sequent patch? I haven't looked at an interrupt handler
is registered for the IRQ from GPE block device.

Shaohua


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id\x12065&op=click

^ permalink raw reply	[flat|nested] 3+ messages in thread
* A GPE block driver
@ 2004-11-06  6:44 Matthew Wilcox
  2004-11-06  7:49 ` [ACPI] " Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2004-11-06  6:44 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f


I have a GPE block driver (PNP ID ACPI0006) almost written.  I have
a couple of questions though ...

1. Given an acpi_device, how do I get an acpi_namespace_node?
2. Where does gpe_block_base_number come from?  Is that the _UID?

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-12 13:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-12  8:23 [PATCH] GPE block driver [2/2] Li, Shaohua
2004-11-12 13:11 ` Matthew Wilcox
  -- strict thread matches above, loose matches on Subject: below --
2004-11-06  6:44 A GPE block driver Matthew Wilcox
2004-11-06  7:49 ` [ACPI] " Matthew Wilcox
2004-11-07 14:43   ` Matthew Wilcox
2004-11-07 14:50     ` [PATCH] GPE block driver [2/2] Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox