linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add switch for dock events
@ 2008-05-23 16:09 Matthew Garrett
  2008-05-24  1:23 ` Andrew Morton
  2008-05-28 13:06 ` [PATCH 1/3] Input: " Matthew Garrett
  0 siblings, 2 replies; 15+ messages in thread
From: Matthew Garrett @ 2008-05-23 16:09 UTC (permalink / raw)
  To: linux-input; +Cc: linu-acpi, linux-kernel

Add a switch to signal dock events to userspace.

Signed-off-by: Matthew Garrett <mjg@redhat.com>

---

I've done this as an input event rather than anything else since there 
isn't necessarily a terribly coherent concept of a dock device. HPs (for 
example) don't use ACPI for docking - the dock is simply an extension of 
devices that are already on the system. We can't sensibly create a dock 
platform device and then generate uevents on it. Doing it this way lets 
us standardise on a way to send docking events to userspace, which lets 
desktops do things like automatically expand onto external monitors when 
the system is docked.

diff --git a/include/linux/input.h b/include/linux/input.h
index 28a094f..0bc55ee 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -638,6 +638,7 @@ struct input_absinfo {
 #define SW_TABLET_MODE		0x01  /* set = tablet mode */
 #define SW_HEADPHONE_INSERT	0x02  /* set = inserted */
 #define SW_RADIO		0x03  /* set = radio enabled */
+#define SW_DOCK			0x04  /* set = plugged into dock */
 #define SW_MAX			0x0f
 #define SW_CNT			(SW_MAX+1)


-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

end of thread, other threads:[~2008-06-09  9:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-23 16:09 [PATCH] Add switch for dock events Matthew Garrett
2008-05-24  1:23 ` Andrew Morton
2008-05-28 13:06 ` [PATCH 1/3] Input: " Matthew Garrett
2008-05-28 13:21   ` [PATCH 2/3] ACPI: Send switch event on " Matthew Garrett
2008-05-28 13:29     ` [PATCH 3/3] Misc: Add HP WMI laptop extras driver Matthew Garrett
2008-05-29  5:42       ` RESEND: " Andrew Morton
2008-05-29  8:07         ` Matthew Garrett
2008-05-29  8:23       ` Matthew Garrett
2008-06-02 23:30         ` Andrew Morton
2008-06-07 10:00       ` Carlos Corbacho
2008-05-29  5:32     ` RESEND: [PATCH 2/3] ACPI: Send switch event on dock events Andrew Morton
2008-05-29  8:15       ` Matthew Garrett
2008-05-29  8:22     ` Version 2: " Matthew Garrett
2008-06-09  9:48       ` Andrew Morton
2008-05-29  8:20   ` Version 2: [PATCH 1/3] Input: Add switch for " Matthew Garrett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).