linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ath5k: support LEDs on Acer Aspire One netbook
@ 2009-01-01 20:01 Bob Copeland
  2009-01-11 13:10 ` Andreas Mohr
  0 siblings, 1 reply; 11+ messages in thread
From: Bob Copeland @ 2009-01-01 20:01 UTC (permalink / raw)
  To: linville, maximlevitsky, andi; +Cc: linux-wireless, ath5k-devel, Bob Copeland

Add vendor ID for Foxconn and use it to set the ath5k LED gpio and
polarity for Acer branded laptops.

base.c:
Changes-licensed-under: 3-Clause-BSD

Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Tested-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
 drivers/net/wireless/ath5k/base.c |    7 +++++++
 include/linux/pci_ids.h           |    2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 40c0155..fd3a6f4 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -2595,6 +2595,13 @@ ath5k_init_leds(struct ath5k_softc *sc)
 		sc->led_pin = 1;
 		sc->led_on = 1;  /* active high */
 	}
+	/* Pin 3 on Foxconn chips used in Acer Aspire One (0x105b:e008) */
+	if (pdev->subsystem_vendor == PCI_VENDOR_ID_FOXCONN) {
+		__set_bit(ATH_STAT_LEDSOFT, sc->status);
+		sc->led_pin = 3;
+		sc->led_on = 0;  /* active low */
+	}
+
 	if (!test_bit(ATH_STAT_LEDSOFT, sc->status))
 		goto out;
 
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 1800f1d..c1fb01c 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -834,6 +834,8 @@
 #define PCI_DEVICE_ID_PROMISE_20276	0x5275
 #define PCI_DEVICE_ID_PROMISE_20277	0x7275
 
+#define PCI_VENDOR_ID_FOXCONN		0x105b
+
 #define PCI_VENDOR_ID_UMC		0x1060
 #define PCI_DEVICE_ID_UMC_UM8673F	0x0101
 #define PCI_DEVICE_ID_UMC_UM8886BF	0x673a
-- 
1.6.0.6



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

end of thread, other threads:[~2009-03-16 16:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-01 20:01 [PATCH 1/2] ath5k: support LEDs on Acer Aspire One netbook Bob Copeland
2009-01-11 13:10 ` Andreas Mohr
2009-01-11 14:42   ` Bob Copeland
2009-01-11 16:53     ` Andreas Mohr
2009-03-16 10:04     ` Andreas Mohr
2009-03-16 10:16       ` Johannes Berg
2009-03-16 10:44         ` Andreas Mohr
2009-03-16 12:21           ` Maxim Levitsky
2009-03-16 13:41             ` Andreas Mohr
2009-03-16 15:33               ` Maxim Levitsky
2009-03-16 16:00                 ` Andreas Mohr

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).