2009-12-16 00:46:18 +00:00
|
|
|
/*
|
2011-06-05 00:38:28 +00:00
|
|
|
* Timberdale FPGA GPIO driver
|
2009-12-16 00:46:18 +00:00
|
|
|
* Copyright (c) 2009 Intel Corporation
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 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; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Supports:
|
|
|
|
* Timberdale FPGA GPIO
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/gpio.h>
|
|
|
|
#include <linux/platform_device.h>
|
2010-03-05 21:41:36 +00:00
|
|
|
#include <linux/irq.h>
|
2009-12-16 00:46:18 +00:00
|
|
|
#include <linux/io.h>
|
|
|
|
#include <linux/timb_gpio.h>
|
|
|
|
#include <linux/interrupt.h>
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 08:04:11 +00:00
|
|
|
#include <linux/slab.h>
|
2009-12-16 00:46:18 +00:00
|
|
|
|
|
|
|
#define DRIVER_NAME "timb-gpio"
|
|
|
|
|
|
|
|
#define TGPIOVAL 0x00
|
|
|
|
#define TGPIODIR 0x04
|
|
|
|
#define TGPIO_IER 0x08
|
|
|
|
#define TGPIO_ISR 0x0c
|
|
|
|
#define TGPIO_IPR 0x10
|
|
|
|
#define TGPIO_ICR 0x14
|
|
|
|
#define TGPIO_FLR 0x18
|
|
|
|
#define TGPIO_LVR 0x1c
|
2010-03-05 21:44:35 +00:00
|
|
|
#define TGPIO_VER 0x20
|
|
|
|
#define TGPIO_BFLR 0x24
|
2009-12-16 00:46:18 +00:00
|
|
|
|
|
|
|
struct timbgpio {
|
|
|
|
void __iomem *membase;
|
|
|
|
spinlock_t lock; /* mutual exclusion */
|
|
|
|
struct gpio_chip gpio;
|
|
|
|
int irq_base;
|
2010-10-27 22:33:17 +00:00
|
|
|
unsigned long last_ier;
|
2009-12-16 00:46:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static int timbgpio_update_bit(struct gpio_chip *gpio, unsigned index,
|
|
|
|
unsigned offset, bool enabled)
|
|
|
|
{
|
|
|
|
struct timbgpio *tgpio = container_of(gpio, struct timbgpio, gpio);
|
|
|
|
u32 reg;
|
|
|
|
|
|
|
|
spin_lock(&tgpio->lock);
|
|
|
|
reg = ioread32(tgpio->membase + offset);
|
|
|
|
|
|
|
|
if (enabled)
|
|
|
|
reg |= (1 << index);
|
|
|
|
else
|
|
|
|
reg &= ~(1 << index);
|
|
|
|
|
|
|
|
iowrite32(reg, tgpio->membase + offset);
|
|
|
|
spin_unlock(&tgpio->lock);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int timbgpio_gpio_direction_input(struct gpio_chip *gpio, unsigned nr)
|
|
|
|
{
|
|
|
|
return timbgpio_update_bit(gpio, nr, TGPIODIR, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int timbgpio_gpio_get(struct gpio_chip *gpio, unsigned nr)
|
|
|
|
{
|
|
|
|
struct timbgpio *tgpio = container_of(gpio, struct timbgpio, gpio);
|
|
|
|
u32 value;
|
|
|
|
|
|
|
|
value = ioread32(tgpio->membase + TGPIOVAL);
|
|
|
|
return (value & (1 << nr)) ? 1 : 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int timbgpio_gpio_direction_output(struct gpio_chip *gpio,
|
|
|
|
unsigned nr, int val)
|
|
|
|
{
|
|
|
|
return timbgpio_update_bit(gpio, nr, TGPIODIR, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void timbgpio_gpio_set(struct gpio_chip *gpio,
|
|
|
|
unsigned nr, int val)
|
|
|
|
{
|
|
|
|
timbgpio_update_bit(gpio, nr, TGPIOVAL, val != 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int timbgpio_to_irq(struct gpio_chip *gpio, unsigned offset)
|
|
|
|
{
|
|
|
|
struct timbgpio *tgpio = container_of(gpio, struct timbgpio, gpio);
|
|
|
|
|
|
|
|
if (tgpio->irq_base <= 0)
|
|
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
return tgpio->irq_base + offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* GPIO IRQ
|
|
|
|
*/
|
2011-01-13 01:00:19 +00:00
|
|
|
static void timbgpio_irq_disable(struct irq_data *d)
|
2009-12-16 00:46:18 +00:00
|
|
|
{
|
2011-01-13 01:00:19 +00:00
|
|
|
struct timbgpio *tgpio = irq_data_get_irq_chip_data(d);
|
|
|
|
int offset = d->irq - tgpio->irq_base;
|
2010-10-27 22:33:17 +00:00
|
|
|
unsigned long flags;
|
2009-12-16 00:46:18 +00:00
|
|
|
|
2010-10-27 22:33:17 +00:00
|
|
|
spin_lock_irqsave(&tgpio->lock, flags);
|
2012-10-11 06:56:35 +00:00
|
|
|
tgpio->last_ier &= ~(1UL << offset);
|
2010-10-27 22:33:17 +00:00
|
|
|
iowrite32(tgpio->last_ier, tgpio->membase + TGPIO_IER);
|
|
|
|
spin_unlock_irqrestore(&tgpio->lock, flags);
|
2009-12-16 00:46:18 +00:00
|
|
|
}
|
|
|
|
|
2011-01-13 01:00:19 +00:00
|
|
|
static void timbgpio_irq_enable(struct irq_data *d)
|
2009-12-16 00:46:18 +00:00
|
|
|
{
|
2011-01-13 01:00:19 +00:00
|
|
|
struct timbgpio *tgpio = irq_data_get_irq_chip_data(d);
|
|
|
|
int offset = d->irq - tgpio->irq_base;
|
2010-10-27 22:33:17 +00:00
|
|
|
unsigned long flags;
|
2009-12-16 00:46:18 +00:00
|
|
|
|
2010-10-27 22:33:17 +00:00
|
|
|
spin_lock_irqsave(&tgpio->lock, flags);
|
2012-10-11 06:56:35 +00:00
|
|
|
tgpio->last_ier |= 1UL << offset;
|
2010-10-27 22:33:17 +00:00
|
|
|
iowrite32(tgpio->last_ier, tgpio->membase + TGPIO_IER);
|
|
|
|
spin_unlock_irqrestore(&tgpio->lock, flags);
|
2009-12-16 00:46:18 +00:00
|
|
|
}
|
|
|
|
|
2011-01-13 01:00:19 +00:00
|
|
|
static int timbgpio_irq_type(struct irq_data *d, unsigned trigger)
|
2009-12-16 00:46:18 +00:00
|
|
|
{
|
2011-01-13 01:00:19 +00:00
|
|
|
struct timbgpio *tgpio = irq_data_get_irq_chip_data(d);
|
|
|
|
int offset = d->irq - tgpio->irq_base;
|
2009-12-16 00:46:18 +00:00
|
|
|
unsigned long flags;
|
2010-03-05 21:44:35 +00:00
|
|
|
u32 lvr, flr, bflr = 0;
|
|
|
|
u32 ver;
|
2010-04-06 21:34:48 +00:00
|
|
|
int ret = 0;
|
2009-12-16 00:46:18 +00:00
|
|
|
|
|
|
|
if (offset < 0 || offset > tgpio->gpio.ngpio)
|
|
|
|
return -EINVAL;
|
|
|
|
|
2010-03-05 21:44:35 +00:00
|
|
|
ver = ioread32(tgpio->membase + TGPIO_VER);
|
|
|
|
|
2009-12-16 00:46:18 +00:00
|
|
|
spin_lock_irqsave(&tgpio->lock, flags);
|
|
|
|
|
|
|
|
lvr = ioread32(tgpio->membase + TGPIO_LVR);
|
|
|
|
flr = ioread32(tgpio->membase + TGPIO_FLR);
|
2010-03-05 21:44:35 +00:00
|
|
|
if (ver > 2)
|
|
|
|
bflr = ioread32(tgpio->membase + TGPIO_BFLR);
|
2009-12-16 00:46:18 +00:00
|
|
|
|
|
|
|
if (trigger & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
|
2010-03-05 21:44:35 +00:00
|
|
|
bflr &= ~(1 << offset);
|
2009-12-16 00:46:18 +00:00
|
|
|
flr &= ~(1 << offset);
|
|
|
|
if (trigger & IRQ_TYPE_LEVEL_HIGH)
|
|
|
|
lvr |= 1 << offset;
|
|
|
|
else
|
|
|
|
lvr &= ~(1 << offset);
|
|
|
|
}
|
|
|
|
|
2010-03-05 21:44:35 +00:00
|
|
|
if ((trigger & IRQ_TYPE_EDGE_BOTH) == IRQ_TYPE_EDGE_BOTH) {
|
2010-04-06 21:34:48 +00:00
|
|
|
if (ver < 3) {
|
|
|
|
ret = -EINVAL;
|
|
|
|
goto out;
|
2013-03-20 12:16:03 +00:00
|
|
|
} else {
|
2010-03-05 21:44:35 +00:00
|
|
|
flr |= 1 << offset;
|
|
|
|
bflr |= 1 << offset;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
bflr &= ~(1 << offset);
|
2009-12-16 00:46:18 +00:00
|
|
|
flr |= 1 << offset;
|
|
|
|
if (trigger & IRQ_TYPE_EDGE_FALLING)
|
|
|
|
lvr &= ~(1 << offset);
|
2010-03-05 21:44:35 +00:00
|
|
|
else
|
|
|
|
lvr |= 1 << offset;
|
2009-12-16 00:46:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
iowrite32(lvr, tgpio->membase + TGPIO_LVR);
|
|
|
|
iowrite32(flr, tgpio->membase + TGPIO_FLR);
|
2010-03-05 21:44:35 +00:00
|
|
|
if (ver > 2)
|
|
|
|
iowrite32(bflr, tgpio->membase + TGPIO_BFLR);
|
|
|
|
|
2009-12-16 00:46:18 +00:00
|
|
|
iowrite32(1 << offset, tgpio->membase + TGPIO_ICR);
|
|
|
|
|
2010-04-06 21:34:48 +00:00
|
|
|
out:
|
|
|
|
spin_unlock_irqrestore(&tgpio->lock, flags);
|
|
|
|
return ret;
|
2009-12-16 00:46:18 +00:00
|
|
|
}
|
|
|
|
|
2011-01-14 08:44:19 +00:00
|
|
|
static void timbgpio_irq(unsigned int irq, struct irq_desc *desc)
|
2009-12-16 00:46:18 +00:00
|
|
|
{
|
2015-06-04 04:13:15 +00:00
|
|
|
struct timbgpio *tgpio = irq_desc_get_handler_data(desc);
|
|
|
|
struct irq_data *data = irq_desc_get_irq_data(desc);
|
2009-12-16 00:46:18 +00:00
|
|
|
unsigned long ipr;
|
|
|
|
int offset;
|
|
|
|
|
2015-06-04 04:13:15 +00:00
|
|
|
data->chip->irq_ack(data);
|
2009-12-16 00:46:18 +00:00
|
|
|
ipr = ioread32(tgpio->membase + TGPIO_IPR);
|
|
|
|
iowrite32(ipr, tgpio->membase + TGPIO_ICR);
|
|
|
|
|
2010-10-27 22:33:17 +00:00
|
|
|
/*
|
|
|
|
* Some versions of the hardware trash the IER register if more than
|
|
|
|
* one interrupt is received simultaneously.
|
|
|
|
*/
|
|
|
|
iowrite32(0, tgpio->membase + TGPIO_IER);
|
|
|
|
|
2010-03-05 21:41:37 +00:00
|
|
|
for_each_set_bit(offset, &ipr, tgpio->gpio.ngpio)
|
2009-12-16 00:46:18 +00:00
|
|
|
generic_handle_irq(timbgpio_to_irq(&tgpio->gpio, offset));
|
2010-10-27 22:33:17 +00:00
|
|
|
|
|
|
|
iowrite32(tgpio->last_ier, tgpio->membase + TGPIO_IER);
|
2009-12-16 00:46:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static struct irq_chip timbgpio_irqchip = {
|
|
|
|
.name = "GPIO",
|
2011-01-13 01:00:19 +00:00
|
|
|
.irq_enable = timbgpio_irq_enable,
|
|
|
|
.irq_disable = timbgpio_irq_disable,
|
|
|
|
.irq_set_type = timbgpio_irq_type,
|
2009-12-16 00:46:18 +00:00
|
|
|
};
|
|
|
|
|
2012-11-19 18:22:34 +00:00
|
|
|
static int timbgpio_probe(struct platform_device *pdev)
|
2009-12-16 00:46:18 +00:00
|
|
|
{
|
|
|
|
int err, i;
|
2014-05-13 01:21:42 +00:00
|
|
|
struct device *dev = &pdev->dev;
|
2009-12-16 00:46:18 +00:00
|
|
|
struct gpio_chip *gc;
|
|
|
|
struct timbgpio *tgpio;
|
|
|
|
struct resource *iomem;
|
2013-07-30 08:08:05 +00:00
|
|
|
struct timbgpio_platform_data *pdata = dev_get_platdata(&pdev->dev);
|
2009-12-16 00:46:18 +00:00
|
|
|
int irq = platform_get_irq(pdev, 0);
|
|
|
|
|
|
|
|
if (!pdata || pdata->nr_pins > 32) {
|
2014-05-13 01:21:42 +00:00
|
|
|
dev_err(dev, "Invalid platform data\n");
|
|
|
|
return -EINVAL;
|
2009-12-16 00:46:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
|
|
if (!iomem) {
|
2014-05-13 01:21:42 +00:00
|
|
|
dev_err(dev, "Unable to get resource\n");
|
|
|
|
return -EINVAL;
|
2009-12-16 00:46:18 +00:00
|
|
|
}
|
|
|
|
|
2014-05-13 01:21:42 +00:00
|
|
|
tgpio = devm_kzalloc(dev, sizeof(struct timbgpio), GFP_KERNEL);
|
2009-12-16 00:46:18 +00:00
|
|
|
if (!tgpio) {
|
2014-05-13 01:21:42 +00:00
|
|
|
dev_err(dev, "Memory alloc failed\n");
|
|
|
|
return -EINVAL;
|
2009-12-16 00:46:18 +00:00
|
|
|
}
|
|
|
|
tgpio->irq_base = pdata->irq_base;
|
|
|
|
|
|
|
|
spin_lock_init(&tgpio->lock);
|
|
|
|
|
2014-05-13 01:21:42 +00:00
|
|
|
if (!devm_request_mem_region(dev, iomem->start, resource_size(iomem),
|
|
|
|
DRIVER_NAME)) {
|
|
|
|
dev_err(dev, "Region already claimed\n");
|
|
|
|
return -EBUSY;
|
2009-12-16 00:46:18 +00:00
|
|
|
}
|
|
|
|
|
2014-05-13 01:21:42 +00:00
|
|
|
tgpio->membase = devm_ioremap(dev, iomem->start, resource_size(iomem));
|
2009-12-16 00:46:18 +00:00
|
|
|
if (!tgpio->membase) {
|
2014-05-13 01:21:42 +00:00
|
|
|
dev_err(dev, "Cannot ioremap\n");
|
|
|
|
return -ENOMEM;
|
2009-12-16 00:46:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gc = &tgpio->gpio;
|
|
|
|
|
|
|
|
gc->label = dev_name(&pdev->dev);
|
|
|
|
gc->owner = THIS_MODULE;
|
|
|
|
gc->dev = &pdev->dev;
|
|
|
|
gc->direction_input = timbgpio_gpio_direction_input;
|
|
|
|
gc->get = timbgpio_gpio_get;
|
|
|
|
gc->direction_output = timbgpio_gpio_direction_output;
|
|
|
|
gc->set = timbgpio_gpio_set;
|
|
|
|
gc->to_irq = (irq >= 0 && tgpio->irq_base > 0) ? timbgpio_to_irq : NULL;
|
|
|
|
gc->dbg_show = NULL;
|
|
|
|
gc->base = pdata->gpio_base;
|
|
|
|
gc->ngpio = pdata->nr_pins;
|
2013-12-04 13:42:46 +00:00
|
|
|
gc->can_sleep = false;
|
2009-12-16 00:46:18 +00:00
|
|
|
|
|
|
|
err = gpiochip_add(gc);
|
|
|
|
if (err)
|
2014-05-13 01:21:42 +00:00
|
|
|
return err;
|
2009-12-16 00:46:18 +00:00
|
|
|
|
|
|
|
platform_set_drvdata(pdev, tgpio);
|
|
|
|
|
|
|
|
/* make sure to disable interrupts */
|
|
|
|
iowrite32(0x0, tgpio->membase + TGPIO_IER);
|
|
|
|
|
|
|
|
if (irq < 0 || tgpio->irq_base <= 0)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
for (i = 0; i < pdata->nr_pins; i++) {
|
2013-11-26 13:28:32 +00:00
|
|
|
irq_set_chip_and_handler(tgpio->irq_base + i,
|
|
|
|
&timbgpio_irqchip, handle_simple_irq);
|
2011-03-24 21:27:36 +00:00
|
|
|
irq_set_chip_data(tgpio->irq_base + i, tgpio);
|
2015-07-27 20:55:16 +00:00
|
|
|
irq_clear_status_flags(tgpio->irq_base + i, IRQ_NOREQUEST | IRQ_NOPROBE);
|
2009-12-16 00:46:18 +00:00
|
|
|
}
|
|
|
|
|
2015-06-21 19:10:47 +00:00
|
|
|
irq_set_chained_handler_and_data(irq, timbgpio_irq, tgpio);
|
2009-12-16 00:46:18 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-11-19 18:25:50 +00:00
|
|
|
static int timbgpio_remove(struct platform_device *pdev)
|
2009-12-16 00:46:18 +00:00
|
|
|
{
|
2013-07-30 08:08:05 +00:00
|
|
|
struct timbgpio_platform_data *pdata = dev_get_platdata(&pdev->dev);
|
2009-12-16 00:46:18 +00:00
|
|
|
struct timbgpio *tgpio = platform_get_drvdata(pdev);
|
|
|
|
int irq = platform_get_irq(pdev, 0);
|
|
|
|
|
|
|
|
if (irq >= 0 && tgpio->irq_base > 0) {
|
|
|
|
int i;
|
2011-04-07 23:23:57 +00:00
|
|
|
for (i = 0; i < pdata->nr_pins; i++) {
|
2011-03-24 21:27:36 +00:00
|
|
|
irq_set_chip(tgpio->irq_base + i, NULL);
|
|
|
|
irq_set_chip_data(tgpio->irq_base + i, NULL);
|
2009-12-16 00:46:18 +00:00
|
|
|
}
|
|
|
|
|
2011-03-24 21:27:36 +00:00
|
|
|
irq_set_handler(irq, NULL);
|
|
|
|
irq_set_handler_data(irq, NULL);
|
2009-12-16 00:46:18 +00:00
|
|
|
}
|
|
|
|
|
2014-07-12 20:30:12 +00:00
|
|
|
gpiochip_remove(&tgpio->gpio);
|
2009-12-16 00:46:18 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct platform_driver timbgpio_platform_driver = {
|
|
|
|
.driver = {
|
|
|
|
.name = DRIVER_NAME,
|
|
|
|
},
|
|
|
|
.probe = timbgpio_probe,
|
|
|
|
.remove = timbgpio_remove,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------*/
|
|
|
|
|
2011-12-07 16:24:00 +00:00
|
|
|
module_platform_driver(timbgpio_platform_driver);
|
2009-12-16 00:46:18 +00:00
|
|
|
|
|
|
|
MODULE_DESCRIPTION("Timberdale GPIO driver");
|
|
|
|
MODULE_LICENSE("GPL v2");
|
|
|
|
MODULE_AUTHOR("Mocean Laboratories");
|
|
|
|
MODULE_ALIAS("platform:"DRIVER_NAME);
|
|
|
|
|