1 Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/Kconfig
2 ===================================================================
3 --- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/Kconfig
4 +++ linux-2.6.24.7/arch/arm/mach-ixp4xx/Kconfig
5 @@ -125,6 +125,15 @@ config ARCH_IXDP4XX
6 depends on ARCH_IXDP425 || MACH_IXDP465 || MACH_KIXRP435
11 + prompt "Freecom FSG-3"
14 + Say 'Y' here if you want your kernel to support Freecom's
15 + FSG-3 device. For more information on this platform,
16 + see http://www.nslu2-linux.org/wiki/FSG3/HomePage
19 # Certain registers and IRQs are only enabled if supporting IXP465 CPUs
21 Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/Makefile
22 ===================================================================
23 --- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/Makefile
24 +++ linux-2.6.24.7/arch/arm/mach-ixp4xx/Makefile
25 @@ -15,6 +15,7 @@ obj-pci-$(CONFIG_MACH_NAS100D) += nas10
26 obj-pci-$(CONFIG_MACH_DSMG600) += dsmg600-pci.o
27 obj-pci-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o
28 obj-pci-$(CONFIG_MACH_WG302V2) += wg302v2-pci.o
29 +obj-pci-$(CONFIG_MACH_FSG) += fsg-pci.o
33 @@ -28,5 +29,6 @@ obj-$(CONFIG_MACH_NAS100D) += nas100d-se
34 obj-$(CONFIG_MACH_DSMG600) += dsmg600-setup.o dsmg600-power.o
35 obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
36 obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
37 +obj-$(CONFIG_MACH_FSG) += fsg-setup.o
39 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
40 Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/fsg-pci.c
41 ===================================================================
43 +++ linux-2.6.24.7/arch/arm/mach-ixp4xx/fsg-pci.c
46 + * arch/arch/mach-ixp4xx/fsg-pci.c
48 + * FSG board-level PCI initialization
50 + * Author: Rod Whitby <rod@whitby.id.au>
51 + * Maintainer: http://www.nslu2-linux.org/
53 + * based on ixdp425-pci.c:
54 + * Copyright (C) 2002 Intel Corporation.
55 + * Copyright (C) 2003-2004 MontaVista Software, Inc.
57 + * This program is free software; you can redistribute it and/or modify
58 + * it under the terms of the GNU General Public License version 2 as
59 + * published by the Free Software Foundation.
63 +#include <linux/pci.h>
64 +#include <linux/init.h>
65 +#include <linux/irq.h>
67 +#include <asm/mach/pci.h>
68 +#include <asm/mach-types.h>
70 +void __init fsg_pci_preinit(void)
72 + set_irq_type(IRQ_FSG_PCI_INTA, IRQT_LOW);
73 + set_irq_type(IRQ_FSG_PCI_INTB, IRQT_LOW);
74 + set_irq_type(IRQ_FSG_PCI_INTC, IRQT_LOW);
76 + ixp4xx_pci_preinit();
79 +static int __init fsg_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
81 + static int pci_irq_table[FSG_PCI_IRQ_LINES] = {
90 + if (slot >= 1 && slot <= FSG_PCI_MAX_DEV &&
91 + pin >= 1 && pin <= FSG_PCI_IRQ_LINES)
92 + irq = pci_irq_table[(slot - 1)];
93 + printk(KERN_INFO "%s: Mapped slot %d pin %d to IRQ %d\n",
94 + __func__, slot, pin, irq);
99 +struct hw_pci fsg_pci __initdata = {
100 + .nr_controllers = 1,
101 + .preinit = fsg_pci_preinit,
102 + .swizzle = pci_std_swizzle,
103 + .setup = ixp4xx_setup,
104 + .scan = ixp4xx_scan_bus,
105 + .map_irq = fsg_map_irq,
108 +int __init fsg_pci_init(void)
110 + if (machine_is_fsg())
111 + pci_common_init(&fsg_pci);
115 +subsys_initcall(fsg_pci_init);
116 Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/fsg-setup.c
117 ===================================================================
119 +++ linux-2.6.24.7/arch/arm/mach-ixp4xx/fsg-setup.c
122 + * arch/arm/mach-ixp4xx/fsg-setup.c
126 + * Copyright (C) 2008 Rod Whitby <rod@whitby.id.au>
128 + * based on ixdp425-setup.c:
129 + * Copyright (C) 2003-2004 MontaVista Software, Inc.
130 + * based on nslu2-power.c
131 + * Copyright (C) 2005 Tower Technologies
133 + * Author: Rod Whitby <rod@whitby.id.au>
134 + * Maintainers: http://www.nslu2-linux.org/
138 +#include <linux/if_ether.h>
139 +#include <linux/irq.h>
140 +#include <linux/serial.h>
141 +#include <linux/serial_8250.h>
142 +#include <linux/leds.h>
143 +#include <linux/reboot.h>
144 +#include <linux/i2c.h>
145 +#include <linux/i2c-gpio.h>
147 +#include <asm/mach-types.h>
148 +#include <asm/mach/arch.h>
149 +#include <asm/mach/flash.h>
151 +#include <asm/gpio.h>
153 +static struct flash_platform_data fsg_flash_data = {
154 + .map_name = "cfi_probe",
158 +static struct resource fsg_flash_resource = {
159 + .flags = IORESOURCE_MEM,
162 +static struct platform_device fsg_flash = {
163 + .name = "IXP4XX-Flash",
165 + .dev.platform_data = &fsg_flash_data,
166 + .num_resources = 1,
167 + .resource = &fsg_flash_resource,
170 +static struct i2c_gpio_platform_data fsg_i2c_gpio_data = {
171 + .sda_pin = FSG_SDA_PIN,
172 + .scl_pin = FSG_SCL_PIN,
175 +static struct platform_device fsg_i2c_gpio = {
176 + .name = "i2c-gpio",
179 + .platform_data = &fsg_i2c_gpio_data,
183 +static struct i2c_board_info __initdata fsg_i2c_board_info [] = {
185 + I2C_BOARD_INFO("rtc-isl1208", 0x6f),
189 +static struct resource fsg_uart_resources[] = {
191 + .start = IXP4XX_UART1_BASE_PHYS,
192 + .end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
193 + .flags = IORESOURCE_MEM,
196 + .start = IXP4XX_UART2_BASE_PHYS,
197 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
198 + .flags = IORESOURCE_MEM,
202 +static struct plat_serial8250_port fsg_uart_data[] = {
204 + .mapbase = IXP4XX_UART1_BASE_PHYS,
205 + .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
206 + .irq = IRQ_IXP4XX_UART1,
207 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
208 + .iotype = UPIO_MEM,
210 + .uartclk = IXP4XX_UART_XTAL,
213 + .mapbase = IXP4XX_UART2_BASE_PHYS,
214 + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
215 + .irq = IRQ_IXP4XX_UART2,
216 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
217 + .iotype = UPIO_MEM,
219 + .uartclk = IXP4XX_UART_XTAL,
224 +static struct platform_device fsg_uart = {
225 + .name = "serial8250",
226 + .id = PLAT8250_DEV_PLATFORM,
227 + .dev.platform_data = fsg_uart_data,
228 + .num_resources = ARRAY_SIZE(fsg_uart_resources),
229 + .resource = fsg_uart_resources,
232 +static struct platform_device fsg_leds = {
237 +/* Built-in 10/100 Ethernet MAC interfaces */
238 +static struct eth_plat_info fsg_plat_eth[] = {
250 +static struct platform_device fsg_eth[] = {
252 + .name = "ixp4xx_eth",
253 + .id = IXP4XX_ETH_NPEB,
254 + .dev.platform_data = fsg_plat_eth,
256 + .name = "ixp4xx_eth",
257 + .id = IXP4XX_ETH_NPEC,
258 + .dev.platform_data = fsg_plat_eth + 1,
262 +static struct platform_device *fsg_devices[] __initdata = {
270 +static void fsg_power_off(void)
272 + printk(KERN_INFO "Restarting system.\n");
273 + machine_restart(NULL);
276 +static irqreturn_t fsg_power_handler(int irq, void *dev_id)
278 + /* Signal init to do the ctrlaltdel action, this will bypass init if
279 + * it hasn't started and do a kernel_restart.
283 + return IRQ_HANDLED;
286 +static irqreturn_t fsg_reset_handler(int irq, void *dev_id)
288 + /* This is the paper-clip reset, it shuts the machine down directly.
290 + machine_power_off();
292 + return IRQ_HANDLED;
295 +static void __init fsg_init(void)
297 + DECLARE_MAC_BUF(mac_buf);
298 + uint8_t __iomem *f;
303 + fsg_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
304 + fsg_flash_resource.end =
305 + IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
307 + *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
308 + *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
310 + /* Configure CS2 for operation, 8bit and writable */
311 + *IXP4XX_EXP_CS2 = 0xbfff0002;
313 + i2c_register_board_info(0, fsg_i2c_board_info,
314 + ARRAY_SIZE(fsg_i2c_board_info));
316 + /* This is only useful on a modified machine, but it is valuable
317 + * to have it first in order to see debug messages, and so that
318 + * it does *not* get removed if platform_add_devices fails!
320 + (void)platform_device_register(&fsg_uart);
322 + platform_add_devices(fsg_devices, ARRAY_SIZE(fsg_devices));
324 + pm_power_off = fsg_power_off;
326 + set_irq_type(gpio_to_irq(FSG_RB_GPIO), IRQT_LOW);
327 + if (request_irq(gpio_to_irq(FSG_RB_GPIO), &fsg_reset_handler,
328 + IRQF_DISABLED, "FSG reset button", NULL) < 0) {
330 + printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
331 + gpio_to_irq(FSG_RB_GPIO));
334 + set_irq_type(gpio_to_irq(FSG_SB_GPIO), IRQT_LOW);
335 + if (request_irq(gpio_to_irq(FSG_SB_GPIO), &fsg_power_handler,
336 + IRQF_DISABLED, "FSG power button", NULL) < 0) {
338 + printk(KERN_DEBUG "Power Button IRQ %d not available\n",
339 + gpio_to_irq(FSG_SB_GPIO));
343 + * Map in a portion of the flash and read the MAC addresses.
344 + * Since it is stored in BE in the flash itself, we need to
345 + * byteswap it if we're in LE mode.
347 + f = ioremap(IXP4XX_EXP_BUS_BASE(0), 0x400000);
350 + for (i = 0; i < 6; i++) {
351 + fsg_plat_eth[0].hwaddr[i] = readb(f + 0x3C0422 + i);
352 + fsg_plat_eth[1].hwaddr[i] = readb(f + 0x3C043B + i);
357 + Endian-swapped reads from unaligned addresses are
358 + required to extract the two MACs from the big-endian
359 + Redboot config area in flash.
362 + fsg_plat_eth[0].hwaddr[0] = readb(f + 0x3C0421);
363 + fsg_plat_eth[0].hwaddr[1] = readb(f + 0x3C0420);
364 + fsg_plat_eth[0].hwaddr[2] = readb(f + 0x3C0427);
365 + fsg_plat_eth[0].hwaddr[3] = readb(f + 0x3C0426);
366 + fsg_plat_eth[0].hwaddr[4] = readb(f + 0x3C0425);
367 + fsg_plat_eth[0].hwaddr[5] = readb(f + 0x3C0424);
369 + fsg_plat_eth[1].hwaddr[0] = readb(f + 0x3C0439);
370 + fsg_plat_eth[1].hwaddr[1] = readb(f + 0x3C043F);
371 + fsg_plat_eth[1].hwaddr[2] = readb(f + 0x3C043E);
372 + fsg_plat_eth[1].hwaddr[3] = readb(f + 0x3C043D);
373 + fsg_plat_eth[1].hwaddr[4] = readb(f + 0x3C043C);
374 + fsg_plat_eth[1].hwaddr[5] = readb(f + 0x3C0443);
378 + printk(KERN_INFO "FSG: Using MAC address %s for port 0\n",
379 + print_mac(mac_buf, fsg_plat_eth[0].hwaddr));
380 + printk(KERN_INFO "FSG: Using MAC address %s for port 1\n",
381 + print_mac(mac_buf, fsg_plat_eth[1].hwaddr));
385 +MACHINE_START(FSG, "Freecom FSG-3")
386 + /* Maintainer: www.nslu2-linux.org */
387 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
388 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
389 + .map_io = ixp4xx_map_io,
390 + .init_irq = ixp4xx_init_irq,
391 + .timer = &ixp4xx_timer,
392 + .boot_params = 0x0100,
393 + .init_machine = fsg_init,
396 Index: linux-2.6.24.7/include/asm-arm/arch-ixp4xx/fsg.h
397 ===================================================================
399 +++ linux-2.6.24.7/include/asm-arm/arch-ixp4xx/fsg.h
402 + * include/asm-arm/arch-ixp4xx/fsg.h
404 + * Freecom FSG-3 platform specific definitions
406 + * Author: Rod Whitby <rod@whitby.id.au>
407 + * Author: Tomasz Chmielewski <mangoo@wpkg.org>
408 + * Maintainers: http://www.nslu2-linux.org
410 + * Based on coyote.h by
411 + * Copyright 2004 (c) MontaVista, Software, Inc.
413 + * This file is licensed under the terms of the GNU General Public
414 + * License version 2. This program is licensed "as is" without any
415 + * warranty of any kind, whether express or implied.
418 +#ifndef __ASM_ARCH_HARDWARE_H__
419 +#error "Do not include this directly, instead #include <asm/hardware.h>"
422 +#define FSG_SDA_PIN 12
423 +#define FSG_SCL_PIN 13
428 +#define FSG_PCI_MAX_DEV 3
429 +#define FSG_PCI_IRQ_LINES 3
432 +/* PCI controller GPIO to IRQ pin mappings */
433 +#define FSG_PCI_INTA_PIN 6
434 +#define FSG_PCI_INTB_PIN 7
435 +#define FSG_PCI_INTC_PIN 5
439 +#define FSG_SB_GPIO 4 /* sync button */
440 +#define FSG_RB_GPIO 9 /* reset button */
441 +#define FSG_UB_GPIO 10 /* usb button */
445 +#define FSG_LED_WLAN_BIT 0
446 +#define FSG_LED_WAN_BIT 1
447 +#define FSG_LED_SATA_BIT 2
448 +#define FSG_LED_USB_BIT 4
449 +#define FSG_LED_RING_BIT 5
450 +#define FSG_LED_SYNC_BIT 7
451 Index: linux-2.6.24.7/include/asm-arm/arch-ixp4xx/hardware.h
452 ===================================================================
453 --- linux-2.6.24.7.orig/include/asm-arm/arch-ixp4xx/hardware.h
454 +++ linux-2.6.24.7/include/asm-arm/arch-ixp4xx/hardware.h
461 #endif /* _ASM_ARCH_HARDWARE_H */
462 Index: linux-2.6.24.7/include/asm-arm/arch-ixp4xx/irqs.h
463 ===================================================================
464 --- linux-2.6.24.7.orig/include/asm-arm/arch-ixp4xx/irqs.h
465 +++ linux-2.6.24.7/include/asm-arm/arch-ixp4xx/irqs.h
467 #define IRQ_DSMG600_PCI_INTE IRQ_IXP4XX_GPIO7
468 #define IRQ_DSMG600_PCI_INTF IRQ_IXP4XX_GPIO6
471 + * Freecom FSG-3 Board IRQs
473 +#define IRQ_FSG_PCI_INTA IRQ_IXP4XX_GPIO6
474 +#define IRQ_FSG_PCI_INTB IRQ_IXP4XX_GPIO7
475 +#define IRQ_FSG_PCI_INTC IRQ_IXP4XX_GPIO5
478 Index: linux-2.6.24.7/drivers/leds/Kconfig
479 ===================================================================
480 --- linux-2.6.24.7.orig/drivers/leds/Kconfig
481 +++ linux-2.6.24.7/drivers/leds/Kconfig
482 @@ -48,6 +48,12 @@ config LEDS_IXP4XX
483 particular board must have LEDs and they must be connected
484 to the GPIO lines. If unsure, say Y.
487 + tristate "LED Support for the Freecom FSG-3"
488 + depends on LEDS_CLASS && MACH_FSG
490 + This option enables support for the LEDs on the Freecom FSG-3.
493 tristate "LED Support for the Sharp SL-6000 series"
494 depends on LEDS_CLASS && PXA_SHARPSL
495 Index: linux-2.6.24.7/drivers/leds/Makefile
496 ===================================================================
497 --- linux-2.6.24.7.orig/drivers/leds/Makefile
498 +++ linux-2.6.24.7/drivers/leds/Makefile
499 @@ -20,6 +20,7 @@ obj-$(CONFIG_LEDS_COBALT_QUBE) += leds-
500 obj-$(CONFIG_LEDS_COBALT_RAQ) += leds-cobalt-raq.o
501 obj-$(CONFIG_LEDS_GPIO) += leds-gpio.o
502 obj-$(CONFIG_LEDS_CM_X270) += leds-cm-x270.o
503 +obj-$(CONFIG_LEDS_FSG) += leds-fsg.o
506 obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
507 Index: linux-2.6.24.7/drivers/leds/leds-fsg.c
508 ===================================================================
510 +++ linux-2.6.24.7/drivers/leds/leds-fsg.c
513 + * LED Driver for the Freecom FSG-3
515 + * Copyright (c) 2008 Rod Whitby <rod@whitby.id.au>
517 + * Author: Rod Whitby <rod@whitby.id.au>
519 + * Based on leds-spitz.c
520 + * Copyright 2005-2006 Openedhand Ltd.
521 + * Author: Richard Purdie <rpurdie@openedhand.com>
523 + * This program is free software; you can redistribute it and/or modify
524 + * it under the terms of the GNU General Public License version 2 as
525 + * published by the Free Software Foundation.
529 +#include <linux/kernel.h>
530 +#include <linux/init.h>
531 +#include <linux/platform_device.h>
532 +#include <linux/leds.h>
533 +#include <asm/arch/hardware.h>
536 +static short __iomem *latch_address;
537 +static unsigned short latch_value;
540 +static void fsg_led_wlan_set(struct led_classdev *led_cdev,
541 + enum led_brightness value)
544 + latch_value &= ~(1 << FSG_LED_WLAN_BIT);
545 + *latch_address = latch_value;
547 + latch_value |= (1 << FSG_LED_WLAN_BIT);
548 + *latch_address = latch_value;
552 +static void fsg_led_wan_set(struct led_classdev *led_cdev,
553 + enum led_brightness value)
556 + latch_value &= ~(1 << FSG_LED_WAN_BIT);
557 + *latch_address = latch_value;
559 + latch_value |= (1 << FSG_LED_WAN_BIT);
560 + *latch_address = latch_value;
564 +static void fsg_led_sata_set(struct led_classdev *led_cdev,
565 + enum led_brightness value)
568 + latch_value &= ~(1 << FSG_LED_SATA_BIT);
569 + *latch_address = latch_value;
571 + latch_value |= (1 << FSG_LED_SATA_BIT);
572 + *latch_address = latch_value;
576 +static void fsg_led_usb_set(struct led_classdev *led_cdev,
577 + enum led_brightness value)
580 + latch_value &= ~(1 << FSG_LED_USB_BIT);
581 + *latch_address = latch_value;
583 + latch_value |= (1 << FSG_LED_USB_BIT);
584 + *latch_address = latch_value;
588 +static void fsg_led_sync_set(struct led_classdev *led_cdev,
589 + enum led_brightness value)
592 + latch_value &= ~(1 << FSG_LED_SYNC_BIT);
593 + *latch_address = latch_value;
595 + latch_value |= (1 << FSG_LED_SYNC_BIT);
596 + *latch_address = latch_value;
600 +static void fsg_led_ring_set(struct led_classdev *led_cdev,
601 + enum led_brightness value)
604 + latch_value &= ~(1 << FSG_LED_RING_BIT);
605 + *latch_address = latch_value;
607 + latch_value |= (1 << FSG_LED_RING_BIT);
608 + *latch_address = latch_value;
614 +static struct led_classdev fsg_wlan_led = {
615 + .name = "fsg:blue:wlan",
616 + .brightness_set = fsg_led_wlan_set,
619 +static struct led_classdev fsg_wan_led = {
620 + .name = "fsg:blue:wan",
621 + .brightness_set = fsg_led_wan_set,
624 +static struct led_classdev fsg_sata_led = {
625 + .name = "fsg:blue:sata",
626 + .brightness_set = fsg_led_sata_set,
629 +static struct led_classdev fsg_usb_led = {
630 + .name = "fsg:blue:usb",
631 + .brightness_set = fsg_led_usb_set,
634 +static struct led_classdev fsg_sync_led = {
635 + .name = "fsg:blue:sync",
636 + .brightness_set = fsg_led_sync_set,
639 +static struct led_classdev fsg_ring_led = {
640 + .name = "fsg:blue:ring",
641 + .brightness_set = fsg_led_ring_set,
647 +static int fsg_led_suspend(struct platform_device *dev, pm_message_t state)
649 + led_classdev_suspend(&fsg_wlan_led);
650 + led_classdev_suspend(&fsg_wan_led);
651 + led_classdev_suspend(&fsg_sata_led);
652 + led_classdev_suspend(&fsg_usb_led);
653 + led_classdev_suspend(&fsg_sync_led);
654 + led_classdev_suspend(&fsg_ring_led);
658 +static int fsg_led_resume(struct platform_device *dev)
660 + led_classdev_resume(&fsg_wlan_led);
661 + led_classdev_resume(&fsg_wan_led);
662 + led_classdev_resume(&fsg_sata_led);
663 + led_classdev_resume(&fsg_usb_led);
664 + led_classdev_resume(&fsg_sync_led);
665 + led_classdev_resume(&fsg_ring_led);
671 +static int fsg_led_probe(struct platform_device *pdev)
675 + ret = led_classdev_register(&pdev->dev, &fsg_wlan_led);
679 + ret = led_classdev_register(&pdev->dev, &fsg_wan_led);
683 + ret = led_classdev_register(&pdev->dev, &fsg_sata_led);
687 + ret = led_classdev_register(&pdev->dev, &fsg_usb_led);
691 + ret = led_classdev_register(&pdev->dev, &fsg_sync_led);
695 + ret = led_classdev_register(&pdev->dev, &fsg_ring_led);
699 + /* Map the LED chip select address space */
700 + latch_address = (unsigned short *) ioremap(IXP4XX_EXP_BUS_BASE(2), 512);
701 + if (!latch_address) {
706 + latch_value = 0xffff;
707 + *latch_address = latch_value;
712 + led_classdev_unregister(&fsg_ring_led);
714 + led_classdev_unregister(&fsg_sync_led);
716 + led_classdev_unregister(&fsg_usb_led);
718 + led_classdev_unregister(&fsg_sata_led);
720 + led_classdev_unregister(&fsg_wan_led);
722 + led_classdev_unregister(&fsg_wlan_led);
728 +static int fsg_led_remove(struct platform_device *pdev)
730 + iounmap(latch_address);
732 + led_classdev_unregister(&fsg_wlan_led);
733 + led_classdev_unregister(&fsg_wan_led);
734 + led_classdev_unregister(&fsg_sata_led);
735 + led_classdev_unregister(&fsg_usb_led);
736 + led_classdev_unregister(&fsg_sync_led);
737 + led_classdev_unregister(&fsg_ring_led);
743 +static struct platform_driver fsg_led_driver = {
744 + .probe = fsg_led_probe,
745 + .remove = fsg_led_remove,
747 + .suspend = fsg_led_suspend,
748 + .resume = fsg_led_resume,
756 +static int __init fsg_led_init(void)
758 + return platform_driver_register(&fsg_led_driver);
761 +static void __exit fsg_led_exit(void)
763 + platform_driver_unregister(&fsg_led_driver);
767 +module_init(fsg_led_init);
768 +module_exit(fsg_led_exit);
770 +MODULE_AUTHOR("Rod Whitby <rod@whitby.id.au>");
771 +MODULE_DESCRIPTION("Freecom FSG-3 LED driver");
772 +MODULE_LICENSE("GPL");