I've patched an already existing driver for the AMD 50 FCH present in the
APU board for using the GPIO (3 OUTs + 1 IN).
I also have implemented a driver for using the LEDs and the switch
connected to these GPIOs using the leds-gpio interface,
so hardrive, heartbeat, network, ... and other events can be mapped to
these leds.
To make everything work I had to pach the watchdog driver sp5100_tco as
well.

So you could use directly the GPIO interface or the LEDs interface
depending on your needs.
I've been testing all this stuff on the voyage 0.9.2 (amd64) + kernel
3.10.11. It seems to work fine.
I attach the patch that can be applied directly to the
linux-source-3.10.11-voyage and the patch for the config-3.10.11-voyage.

There is no major changes between kernel 3.10.11 and the last 3.15 related
to the GPIO/LEDs interfaces and drivers, so with
very few changes (in some Makefile) the same patch can be modified to be
applied to any kernel from 3.10.11 to 3.15.




On Thu, May 15, 2014 at 4:10 PM, <lutz.niede...@gmx.net> wrote:

> If x64 voyage kernel is the same as x32 version then it was 3.8.13 on
> voyage.  I do not remember the voyage x64 kernel but I have an x32 voyage
> that should have the same kernel version.
> For plain debian jessie it was 3.13.10.
> Both did not run.
>
> *Gesendet:* Donnerstag, 15. Mai 2014 um 11:27 Uhr
>
> *Von:* "Kim-man 'Punky' TSE" <punky...@punknix.com>
> *An:* lutz.niede...@gmx.net, voyage-li...@voyage.hk
> *Betreff:* Re: Aw: Re: Re: [Voyage-linux] LEDs and ledtrig stuff on APU
> On 5/15/2014 4:43 PM, lutz.niede...@gmx.net wrote:
> > netdev may be the only trigger that does not work. debian 8 omits that
> one (and others) from triggers and debian 7
> > does not include it. Am I right, that netdev is non-standard? And
> changing Alix led driver to APU is ridiculous easy
> > (you just need to know the new ports). This is why I believe it has
> something to do with netdev trigger. Or the
> > combination of netdev trigger, APU led driver and kernel. Do you have an
> APU to test?
> I have APU to test with APU Led driver and netdev LED triggers, it hangs
> too.
>
> Did you try on 3.10 or 3.8 kernel?
>
> --
> Regards,
> Kim-man "Punky" Tse
>
> * Open Source Embedded Solutions and Systems
> - Voyage Linux (http://linux.voyage.hk)
> - Voyage MPD (http://linux.voyage.hk/voyage-mpd)
> - Voyage MuBox (http://mubox.voyage.hk)
> * Voyage Store (http://store.voyage.hk)
>
>
> _______________________________________________
> Voyage-linux mailing list
> Voyage-linux@list.voyage.hk
> http://list.voyage.hk/mailman/listinfo/voyage-linux
>
>
--- config-3.10.11-voyage	2014-06-10 10:19:39.053452658 +0200
+++ config-3.10.11-iGetech	2014-06-10 10:23:05.834443079 +0200
@@ -47,7 +47,7 @@
 #
 CONFIG_INIT_ENV_ARG_LIMIT=32
 CONFIG_CROSS_COMPILE=""
-CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION="-iGetech"
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_HAVE_KERNEL_GZIP=y
 CONFIG_HAVE_KERNEL_BZIP2=y
@@ -2381,6 +2381,7 @@
 #
 # CONFIG_GPIO_GENERIC_PLATFORM is not set
 # CONFIG_GPIO_IT8761E is not set
+CONFIG_GPIO_FCH=y
 # CONFIG_GPIO_TS5500 is not set
 # CONFIG_GPIO_SCH is not set
 # CONFIG_GPIO_ICH is not set
@@ -3783,6 +3784,7 @@
 # CONFIG_LEDS_LM355x is not set
 # CONFIG_LEDS_OT200 is not set
 # CONFIG_LEDS_BLINKM is not set
+CONFIG_LEDS_APU=y
 
 #
 # LED Triggers
diff -Naur linux-source-3.10.11-voyage/drivers/gpio/Kconfig linux-source-3.10.11-iGetech/drivers/gpio/Kconfig
--- linux-source-3.10.11-voyage/drivers/gpio/Kconfig	2013-09-08 07:10:14.000000000 +0200
+++ linux-source-3.10.11-iGetech/drivers/gpio/Kconfig	2014-06-10 10:14:31.549466904 +0200
@@ -135,6 +135,18 @@
 	depends on ARCH_EP93XX
 	select GPIO_GENERIC
 
+config GPIO_FCH
+	tristate "AMD A45/A50M/A55E Fusion Controller Hub GPIO"
+	depends on PCI && X86
+	default m
+	help
+	  GPIO interface for AMD A45/A50M/A55E Fusion Controller Hub.
+	  Available GPIOs are 0-67, 128-150, 160-228.
+
+	  Part of GPIOs is usually occupied by BIOS for it's internal needs, so
+	  use them with care. For instance, PC Engines APU board users
+	  should only use GPIO 187 (in), 189 (out), 190 (out), 191 (out).
+
 config GPIO_MM_LANTIQ
 	bool "Lantiq Memory mapped GPIOs"
 	depends on LANTIQ && SOC_XWAY
diff -Naur linux-source-3.10.11-voyage/drivers/gpio/Makefile linux-source-3.10.11-iGetech/drivers/gpio/Makefile
--- linux-source-3.10.11-voyage/drivers/gpio/Makefile	2013-09-08 07:10:14.000000000 +0200
+++ linux-source-3.10.11-iGetech/drivers/gpio/Makefile	2014-06-10 10:14:04.418468161 +0200
@@ -24,6 +24,7 @@
 obj-$(CONFIG_ARCH_DAVINCI)	+= gpio-davinci.o
 obj-$(CONFIG_GPIO_EM)		+= gpio-em.o
 obj-$(CONFIG_GPIO_EP93XX)	+= gpio-ep93xx.o
+obj-$(CONFIG_GPIO_FCH)		+= gpio-fch.o
 obj-$(CONFIG_GPIO_GE_FPGA)	+= gpio-ge.o
 obj-$(CONFIG_GPIO_GRGPIO)	+= gpio-grgpio.o
 obj-$(CONFIG_GPIO_ICH)		+= gpio-ich.o
diff -Naur linux-source-3.10.11-voyage/drivers/gpio/gpio-fch.c linux-source-3.10.11-iGetech/drivers/gpio/gpio-fch.c
--- linux-source-3.10.11-voyage/drivers/gpio/gpio-fch.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-source-3.10.11-iGetech/drivers/gpio/gpio-fch.c	2014-06-10 10:13:45.545469035 +0200
@@ -0,0 +1,290 @@
+/*
+ * gpio-fch.c - GPIO interface for AMD Fusion Controller Hub
+ *
+ * Copyright (C) 2013 CompuLab Ltd 
+ * Denis Turischev <denis.turisc...@compulab.co.il>
+ *
+ * Copyright (C) 2014 iGetech Innova, S.L.
+ * Jordi Ferrer Plana <jfer...@igetech.com>
+ *
+ * NOTES:
+ * 	1. We assume there can only be one FCH PCI device in the system.
+ * 	2. Tested on PC Engines APU Board.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License 2 as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/pci.h>
+#include <linux/gpio.h>
+#include <linux/i2c.h>
+
+/* Module Information */
+#define FCH_MODULE_NAME			"gpio-fch"
+#define FCH_MODULE_VER			"0.1"
+#define FCH_DRIVER_NAME			(FCH_MODULE_NAME " (v" FCH_MODULE_VER ")")
+
+/* For SB8x0(or later) chipset */
+#define SB800_IO_PM_INDEX_REG           0xcd6
+#define SB800_IO_PM_DATA_REG            0xcd7
+#define SB800_IO_PM_SIZE		(SB800_IO_PM_DATA_REG-SB800_IO_PM_INDEX_REG+1)
+#define SB800_PM_ACPI_MMIO_EN		0x24	/* SMBus offset for FCH MMIO base addr */
+
+#define FCH_GPIO_SPACE_OFFSET		0x100	/* GPIO offset from FCH base MMIO ADDR */
+#define FCH_GPIO_SPACE_SIZE		0x100	/* GPIO MMIO space size */
+
+/* Internal Variables */
+static void __iomem *gpio_ba;
+static u32 acpimmioaddr;
+static DEFINE_SPINLOCK(gpio_lock);
+
+static DEFINE_PCI_DEVICE_TABLE(gpio_fch_tbl) = {
+	{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS) },
+	{ 0, }
+};
+MODULE_DEVICE_TABLE(pci, gpio_fch_tbl);
+
+/* Read SBResource_MMIO from AcpiMmioEn(PM_Reg: 24h) */
+u32 read_pm_reg(u8 addr)
+{
+	u32 res;
+
+	outb(addr + 3, SB800_IO_PM_INDEX_REG);
+	res = inb(SB800_IO_PM_DATA_REG);
+	res = res << 8;
+
+	outb(addr + 2, SB800_IO_PM_INDEX_REG);
+	res = res + inb(SB800_IO_PM_DATA_REG);
+	res = res << 8;
+
+	outb(addr + 1, SB800_IO_PM_INDEX_REG);
+	res = res + inb(SB800_IO_PM_DATA_REG);
+	res = res << 8;
+
+	/* Lower byte not needed */
+
+	return res;
+}
+
+static int gpio_fch_direction_in(struct gpio_chip *gc, unsigned gpio_num)
+{
+	u8 curr_state;
+
+	/* Compute absolute gpio addr */
+	gpio_num += gc->base;
+
+	spin_lock(&gpio_lock);
+
+	curr_state = ioread8(gpio_ba + gpio_num);
+	if (!(curr_state & BIT(5)))
+		iowrite8(curr_state | BIT(5), gpio_ba + gpio_num);
+
+	spin_unlock(&gpio_lock);
+
+	return 0;
+}
+
+static int gpio_fch_direction_out(struct gpio_chip *gc, unsigned gpio_num, int val)
+{
+	u8 curr_state;
+
+	/* Compute absolute gpio addr */
+	gpio_num += gc->base;
+
+	spin_lock(&gpio_lock);
+
+	curr_state = ioread8(gpio_ba + gpio_num);
+	if (curr_state & BIT(5))
+        	iowrite8(curr_state & ~BIT(5), gpio_ba + gpio_num);
+
+	spin_unlock(&gpio_lock);
+
+	return 0;
+}
+
+static int gpio_fch_get(struct gpio_chip *gc, unsigned gpio_num)
+{
+	u8 curr_state, bit;
+	int res;
+
+	/* Compute absolute gpio addr */
+	gpio_num += gc->base;
+
+	curr_state = ioread8(gpio_ba + gpio_num);
+	bit = (curr_state & BIT(5)) ? 7 : 6;
+	res = !!(curr_state & BIT(bit));
+
+	return res;
+}
+
+static void gpio_fch_set(struct gpio_chip *gc, unsigned gpio_num, int val)
+{
+	u8 curr_state;
+
+	/* Compute absolute gpio addr */
+	gpio_num += gc->base;
+
+	spin_lock(&gpio_lock);
+
+	/* Set to "out" in case it is not */
+	curr_state = ioread8(gpio_ba + gpio_num);
+	if (curr_state & BIT(5)) {
+		curr_state &= ~BIT(5);
+		iowrite8(curr_state, gpio_ba + gpio_num);
+	}
+
+	if (val)
+		iowrite8(curr_state | BIT(6), gpio_ba + gpio_num);
+	else
+		iowrite8(curr_state & ~BIT(6), gpio_ba + gpio_num);
+
+	spin_unlock(&gpio_lock);
+}
+
+static struct gpio_chip fch_gpio_chip0 = {
+	.label = FCH_MODULE_NAME,
+	.owner = THIS_MODULE,
+	.get = gpio_fch_get,
+	.direction_input = gpio_fch_direction_in,
+	.set = gpio_fch_set,
+	.direction_output = gpio_fch_direction_out,
+	.base = 0,
+	.ngpio = 68,
+};
+
+static struct gpio_chip fch_gpio_chip128 = {
+	.label = FCH_MODULE_NAME,
+	.owner = THIS_MODULE,
+	.get = gpio_fch_get,
+	.direction_input = gpio_fch_direction_in,
+	.set = gpio_fch_set,
+	.direction_output = gpio_fch_direction_out,
+	.base = 128,
+	.ngpio = 23,
+};
+
+static struct gpio_chip fch_gpio_chip160 = {
+	.label = FCH_MODULE_NAME,
+	.owner = THIS_MODULE,
+	.get = gpio_fch_get,
+	.direction_input = gpio_fch_direction_in,
+	.set = gpio_fch_set,
+	.direction_output = gpio_fch_direction_out,
+	.base = 160,
+	.ngpio = 69,
+};
+
+static int gpio_fch_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+{
+	int ret;
+  
+	/* Request the I/O ports used by this driver */
+	if (!request_region(SB800_IO_PM_INDEX_REG, SB800_IO_PM_SIZE, FCH_MODULE_NAME)) {
+		dev_err(&pdev->dev, "SMBus base address index region "
+			"[0x%x .. 0x%x] already in use!\n",
+			SB800_IO_PM_INDEX_REG, SB800_IO_PM_DATA_REG);
+		return -EBUSY;
+	}
+ 
+	/* Read SBResource_MMIO from AcpiMmioEn(PM_Reg: 24h) */
+	acpimmioaddr = read_pm_reg(SB800_PM_ACPI_MMIO_EN) & 0xFFFFFF00;
+
+	/* Release I/O Ports */
+	release_region(SB800_IO_PM_INDEX_REG, SB800_IO_PM_SIZE);
+
+	dev_info(&pdev->dev, "Loading driver %s. FCH GPIO MMIO Range [0x%8x,0x%8x]\n",
+			FCH_DRIVER_NAME, acpimmioaddr+FCH_GPIO_SPACE_OFFSET,
+			acpimmioaddr+FCH_GPIO_SPACE_OFFSET+FCH_GPIO_SPACE_SIZE);
+
+	if ( !request_mem_region(acpimmioaddr + FCH_GPIO_SPACE_OFFSET,
+				FCH_GPIO_SPACE_SIZE, fch_gpio_chip0.label) )
+		return -EBUSY;
+
+	gpio_ba = ioremap (acpimmioaddr + FCH_GPIO_SPACE_OFFSET, FCH_GPIO_SPACE_SIZE);
+	if ( !gpio_ba ) {
+		ret = -ENOMEM;
+		goto err_no_ioremap;
+	}
+
+	ret = gpiochip_add(&fch_gpio_chip0);
+	if (ret < 0)
+		goto err_no_gpiochip0_add;
+
+	ret = gpiochip_add(&fch_gpio_chip128);
+	if (ret < 0)
+		goto err_no_gpiochip128_add;
+
+	ret = gpiochip_add(&fch_gpio_chip160);
+	if (ret < 0)
+		goto err_no_gpiochip160_add;
+
+	return 0;
+
+err_no_gpiochip160_add:
+	ret = gpiochip_remove(&fch_gpio_chip128);
+	if (ret)
+		dev_err(&pdev->dev, "%s failed, %d", "gpiochip_remove()", ret);
+
+err_no_gpiochip128_add:
+	ret = gpiochip_remove(&fch_gpio_chip0);
+	if (ret)
+		dev_err(&pdev->dev, "%s failed, %d", "gpiochip_remove()", ret);
+
+err_no_gpiochip0_add:
+	iounmap(gpio_ba);
+
+err_no_ioremap:
+	release_mem_region(acpimmioaddr + FCH_GPIO_SPACE_OFFSET, FCH_GPIO_SPACE_SIZE);
+	return ret;
+}
+
+static void gpio_fch_remove(struct pci_dev *pdev)
+{
+	int ret;
+
+	dev_info(&pdev->dev, "Unloading driver %s (PCI 0x%4x:0x%4x)\n",
+		FCH_DRIVER_NAME, pdev->vendor, pdev->device );
+
+	ret = gpiochip_remove(&fch_gpio_chip160);
+	if (ret < 0)
+		dev_err(&pdev->dev, "%s failed, %d", "gpiochip_remove()", ret);
+
+	ret = gpiochip_remove(&fch_gpio_chip128);
+	if (ret < 0)
+		dev_err(&pdev->dev, "%s failed, %d", "gpiochip_remove()", ret);
+
+	ret = gpiochip_remove(&fch_gpio_chip0);
+	if (ret < 0)
+		dev_err(&pdev->dev, "%s failed, %d", "gpiochip_remove()", ret);
+
+	iounmap(gpio_ba);
+
+	release_mem_region(acpimmioaddr + FCH_GPIO_SPACE_OFFSET, FCH_GPIO_SPACE_SIZE);
+}
+
+static struct pci_driver gpio_fch_driver = {
+	.name = FCH_MODULE_NAME,
+	.id_table = gpio_fch_tbl,
+	.probe = gpio_fch_probe,
+	.remove = gpio_fch_remove,
+};
+
+module_pci_driver(gpio_fch_driver);
+
+MODULE_AUTHOR("Denis Turischev <de...@compulab.co.il> & Jordi Ferrer Plana <jfer...@igetech.com>");
+MODULE_DESCRIPTION("GPIO interface for AMD Fusion Controller Hub");
+MODULE_LICENSE("GPL");
diff -Naur linux-source-3.10.11-voyage/drivers/leds/Kconfig linux-source-3.10.11-iGetech/drivers/leds/Kconfig
--- linux-source-3.10.11-voyage/drivers/leds/Kconfig	2013-09-08 07:10:14.000000000 +0200
+++ linux-source-3.10.11-iGetech/drivers/leds/Kconfig	2014-06-10 10:15:01.709465506 +0200
@@ -479,6 +479,18 @@
 	  This option enables support for the BlinkM RGB LED connected
 	  through I2C. Say Y to enable support for the BlinkM LED.
 
+config LEDS_APU
+	bool "PC Engines APU GPIO-based LED Driver"
+	depends on LEDS_CLASS
+	select GPIO_FCH
+	select GPIOLIB
+	select LEDS_GPIO
+	---help---
+	  This option sets up LEDs using GPIO control on PC Engines APU board.
+
+	  Note: You must still enable the drivers for GPIO and LED support
+	  (GPIO_FCH & LEDS_GPIO) to actually use the LEDs
+
 comment "LED Triggers"
 source "drivers/leds/trigger/Kconfig"
 
diff -Naur linux-source-3.10.11-voyage/drivers/leds/Makefile linux-source-3.10.11-iGetech/drivers/leds/Makefile
--- linux-source-3.10.11-voyage/drivers/leds/Makefile	2013-09-13 15:17:04.000000000 +0200
+++ linux-source-3.10.11-iGetech/drivers/leds/Makefile	2014-06-10 10:14:54.865465824 +0200
@@ -53,6 +53,7 @@
 obj-$(CONFIG_LEDS_MAX8997)		+= leds-max8997.o
 obj-$(CONFIG_LEDS_LM355x)		+= leds-lm355x.o
 obj-$(CONFIG_LEDS_BLINKM)		+= leds-blinkm.o
+obj-$(CONFIG_LEDS_APU)			+= leds-apu.o
 
 # LED SPI Drivers
 obj-$(CONFIG_LEDS_DAC124S085)		+= leds-dac124s085.o
diff -Naur linux-source-3.10.11-voyage/drivers/leds/leds-apu.c linux-source-3.10.11-iGetech/drivers/leds/leds-apu.c
--- linux-source-3.10.11-voyage/drivers/leds/leds-apu.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-source-3.10.11-iGetech/drivers/leds/leds-apu.c	2014-06-10 10:14:49.368466078 +0200
@@ -0,0 +1,139 @@
+/*
+ * Set up PC Engines APU board front LEDs using GPIOLIB and GPIO-FCH
+ * drivers. This driver is based on the geode/alix.c.
+ *
+ * Copyright (C) 2014 Jordi Ferrer Plana <jfer...@igetech.com>
+ *
+ * This program is free software; you can redistribute it and/or modify 
+ * it under the terms of the GNU General Public License 2 as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/string.h>
+#include <linux/module.h>
+#include <linux/leds.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+#include <linux/input.h>
+#include <linux/gpio_keys.h>
+#include <linux/dmi.h>
+
+/* Module Information */
+#define APU_MODULE_NAME			"leds-apu"
+#define APU_MODULE_VER			"0.1"
+#define APU_DRIVER_NAME			(APU_MODULE_NAME " (v" APU_MODULE_VER ")")
+
+static struct gpio_keys_button apu_gpio_buttons[] = {
+	{
+		.code			= KEY_RESTART,
+		.gpio			= 187,
+		.active_low		= 1,
+		.desc			= "Reset button",
+		.type			= EV_KEY,
+		.wakeup			= 0,
+		.debounce_interval	= 100,
+		.can_disable		= 0,
+	}
+};
+static struct gpio_keys_platform_data apu_buttons_data = {
+	.buttons			= apu_gpio_buttons,
+	.nbuttons			= ARRAY_SIZE(apu_gpio_buttons),
+	.poll_interval			= 20,
+};
+
+static struct platform_device apu_buttons_dev = {
+	.name				= "gpio-keys-polled",
+	.id				= 1,
+	.dev = {
+		.platform_data		= &apu_buttons_data,
+	}
+};
+
+static struct gpio_led apu_leds[] = {
+	{
+		.name = "apu:1",
+		.gpio = 189,
+		.default_trigger = "default-on",
+		.active_low = 1,
+	},
+	{
+		.name = "apu:2",
+		.gpio = 190,
+		.default_trigger = "default-off",
+		.active_low = 1,
+	},
+	{
+		.name = "apu:3",
+		.gpio = 191,
+		.default_trigger = "default-off",
+		.active_low = 1,
+	},
+};
+
+static struct gpio_led_platform_data apu_leds_data = {
+	.num_leds = ARRAY_SIZE(apu_leds),
+	.leds = apu_leds,
+};
+
+static struct platform_device apu_leds_dev = {
+	.name = "leds-gpio",
+	.id = -1,
+	.dev.platform_data = &apu_leds_data,
+};
+
+static struct __initdata platform_device *apu_devs[] = {
+	&apu_buttons_dev,
+	&apu_leds_dev,
+};
+
+static void __init register_apu(void)
+{
+	/* Setup LED control through leds-gpio driver */
+	platform_add_devices(apu_devs, ARRAY_SIZE(apu_devs));
+}
+
+static bool __init apu_present_dmi(void)
+{
+	const char *vendor, *product;
+
+	vendor = dmi_get_system_info(DMI_SYS_VENDOR);
+	if (!vendor || strcmp(vendor, "PC Engines"))
+		return false;
+
+	product = dmi_get_system_info(DMI_PRODUCT_NAME);
+	if (!product || (strcmp(product, "APU")))
+		return false;
+
+	printk(KERN_INFO "%s: System is recognized as \"%s %s\"\n",
+		APU_DRIVER_NAME, vendor, product);
+
+	return true;
+}
+
+static int __init apu_init(void)
+{
+	/* Check for APU board */
+	printk(KERN_INFO "Loading driver %s.\n", APU_DRIVER_NAME);
+	if (apu_present_dmi())
+		register_apu();
+
+	return 0;
+}
+
+module_init(apu_init);
+
+MODULE_AUTHOR("Jordi Ferrer Plana <jfer...@igetech.com>");
+MODULE_DESCRIPTION("PC Engines APU GPIO-based LED Driver");
+MODULE_LICENSE("GPL");
diff -Naur linux-source-3.10.11-voyage/drivers/watchdog/sp5100_tco.c linux-source-3.10.11-iGetech/drivers/watchdog/sp5100_tco.c
--- linux-source-3.10.11-voyage/drivers/watchdog/sp5100_tco.c	2013-09-08 07:10:14.000000000 +0200
+++ linux-source-3.10.11-iGetech/drivers/watchdog/sp5100_tco.c	2014-06-10 10:14:42.940466376 +0200
@@ -451,6 +451,12 @@
 	 */
 	tco_timer_stop();
 
+        /*
+         * Release I/O region in case other drivers need it, not used after
+         * initialization  (2014-06-06 Jordi Ferrer <jfer...@igetech.com>)
+         */
+	release_region(pm_iobase, SP5100_PM_IOPORTS_SIZE);
+
 	/* Done */
 	return 1;
 
_______________________________________________
Voyage-linux mailing list
Voyage-linux@list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux

Reply via email to