Source
x
vr41xx_set_irq_trigger(TB0219_PCI_SLOT1_PIN, IRQ_TRIGGER_LEVEL, IRQ_SIGNAL_THROUGH);
/*
* Driver for TANBAC TB0219 base board.
*
* Copyright (C) 2005 Yoichi Yuasa <yuasa@linux-mips.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
MODULE_AUTHOR("Yoichi Yuasa <yuasa@linux-mips.org>");
MODULE_DESCRIPTION("TANBAC TB0219 base board driver");
MODULE_LICENSE("GPL");
static int major; /* default is dynamic major device number */
module_param(major, int, 0);
MODULE_PARM_DESC(major, "Major device number");
static void (*old_machine_restart)(char *command);
static void __iomem *tb0219_base;
static DEFINE_SPINLOCK(tb0219_lock);
typedef enum {
TYPE_LED,
TYPE_GPIO_OUTPUT,
} tb0219_type_t;
/*
* Minor device number
* 0 = 7 segment LED
*
* 16 = GPIO IN 0
* 17 = GPIO IN 1
* 18 = GPIO IN 2
* 19 = GPIO IN 3
* 20 = GPIO IN 4
* 21 = GPIO IN 5
* 22 = GPIO IN 6
* 23 = GPIO IN 7
*
* 32 = GPIO OUT 0
* 33 = GPIO OUT 1
* 34 = GPIO OUT 2
* 35 = GPIO OUT 3
* 36 = GPIO OUT 4
* 37 = GPIO OUT 5
* 38 = GPIO OUT 6
* 39 = GPIO OUT 7
*
* 48 = DIP switch 1
* 49 = DIP switch 2
* 50 = DIP switch 3
* 51 = DIP switch 4
* 52 = DIP switch 5
* 53 = DIP switch 6
* 54 = DIP switch 7