Release 4.7 drivers/input/serio/i8042-sparcio.h
#ifndef _I8042_SPARCIO_H
#define _I8042_SPARCIO_H
#include <linux/of_device.h>
#include <asm/io.h>
#include <asm/oplib.h>
#include <asm/prom.h>
static int i8042_kbd_irq = -1;
static int i8042_aux_irq = -1;
#define I8042_KBD_IRQ i8042_kbd_irq
#define I8042_AUX_IRQ i8042_aux_irq
#define I8042_KBD_PHYS_DESC "sparcps2/serio0"
#define I8042_AUX_PHYS_DESC "sparcps2/serio1"
#define I8042_MUX_PHYS_DESC "sparcps2/serio%d"
static void __iomem *kbd_iobase;
#define I8042_COMMAND_REG (kbd_iobase + 0x64UL)
#define I8042_DATA_REG (kbd_iobase + 0x60UL)
static inline int i8042_read_data(void)
{
return readb(kbd_iobase + 0x60UL);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david s. miller | david s. miller | 17 | 100.00% | 1 | 100.00% |
| Total | 17 | 100.00% | 1 | 100.00% |
static inline int i8042_read_status(void)
{
return readb(kbd_iobase + 0x64UL);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david s. miller | david s. miller | 17 | 100.00% | 1 | 100.00% |
| Total | 17 | 100.00% | 1 | 100.00% |
static inline void i8042_write_data(int val)
{
writeb(val, kbd_iobase + 0x60UL);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david s. miller | david s. miller | 19 | 100.00% | 1 | 100.00% |
| Total | 19 | 100.00% | 1 | 100.00% |
static inline void i8042_write_command(int val)
{
writeb(val, kbd_iobase + 0x64UL);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david s. miller | david s. miller | 19 | 100.00% | 1 | 100.00% |
| Total | 19 | 100.00% | 1 | 100.00% |
#ifdef CONFIG_PCI
static struct resource *kbd_res;
#define OBP_PS2KBD_NAME1 "kb_ps2"
#define OBP_PS2KBD_NAME2 "keyboard"
#define OBP_PS2MS_NAME1 "kdmouse"
#define OBP_PS2MS_NAME2 "mouse"
static int sparc_i8042_probe(struct platform_device *op)
{
struct device_node *dp = op->dev.of_node;
dp = dp->child;
while (dp) {
if (!strcmp(dp->name, OBP_PS2KBD_NAME1) ||
!strcmp(dp->name, OBP_PS2KBD_NAME2)) {
struct platform_device *kbd = of_find_device_by_node(dp);
unsigned int irq = kbd->archdata.irqs[0];
if (irq == 0xffffffff)
irq = op->archdata.irqs[0];
i8042_kbd_irq = irq;
kbd_iobase = of_ioremap(&kbd->resource[0],
0, 8, "kbd");
kbd_res = &kbd->resource[0];
} else if (!strcmp(dp->name, OBP_PS2MS_NAME1) ||
!strcmp(dp->name, OBP_PS2MS_NAME2)) {
struct platform_device *ms = of_find_device_by_node(dp);
unsigned int irq = ms->archdata.irqs[0];
if (irq == 0xffffffff)
irq = op->archdata.irqs[0];
i8042_aux_irq = irq;
}
dp = dp->sibling;
}
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david s. miller | david s. miller | 195 | 93.30% | 3 | 50.00% |
grant likely | grant likely | 14 | 6.70% | 3 | 50.00% |
| Total | 209 | 100.00% | 6 | 100.00% |
static int sparc_i8042_remove(struct platform_device *op)
{
of_iounmap(kbd_res, kbd_iobase, 8);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david s. miller | david s. miller | 22 | 95.65% | 3 | 75.00% |
grant likely | grant likely | 1 | 4.35% | 1 | 25.00% |
| Total | 23 | 100.00% | 4 | 100.00% |
static const struct of_device_id sparc_i8042_match[] = {
{
.name = "8042",
},
{},
};
MODULE_DEVICE_TABLE(of, sparc_i8042_match);
static struct platform_driver sparc_i8042_driver = {
.driver = {
.name = "i8042",
.of_match_table = sparc_i8042_match,
},
.probe = sparc_i8042_probe,
.remove = sparc_i8042_remove,
};
static int __init i8042_platform_init(void)
{
struct device_node *root = of_find_node_by_path("/");
if (!strcmp(root->name, "SUNW,JavaStation-1")) {
/* Hardcoded values for MrCoffee. */
i8042_kbd_irq = i8042_aux_irq = 13 | 0x20;
kbd_iobase = ioremap(0x71300060, 8);
if (!kbd_iobase)
return -ENODEV;
} else {
int err = platform_driver_register(&sparc_i8042_driver);
if (err)
return err;
if (i8042_kbd_irq == -1 ||
i8042_aux_irq == -1) {
if (kbd_iobase) {
of_iounmap(kbd_res, kbd_iobase, 8);
kbd_iobase = (void __iomem *) NULL;
}
return -ENODEV;
}
}
i8042_reset = 1;
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david s. miller | david s. miller | 120 | 93.75% | 5 | 62.50% |
vojtech pavlik | vojtech pavlik | 6 | 4.69% | 1 | 12.50% |
grant likely | grant likely | 1 | 0.78% | 1 | 12.50% |
dmitry torokhov | dmitry torokhov | 1 | 0.78% | 1 | 12.50% |
| Total | 128 | 100.00% | 8 | 100.00% |
static inline void i8042_platform_exit(void)
{
struct device_node *root = of_find_node_by_path("/");
if (strcmp(root->name, "SUNW,JavaStation-1"))
platform_driver_unregister(&sparc_i8042_driver);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david s. miller | david s. miller | 35 | 97.22% | 2 | 66.67% |
grant likely | grant likely | 1 | 2.78% | 1 | 33.33% |
| Total | 36 | 100.00% | 3 | 100.00% |
#else /* !CONFIG_PCI */
static int __init i8042_platform_init(void)
{
return -ENODEV;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
alexander beregalov | alexander beregalov | 13 | 100.00% | 1 | 100.00% |
| Total | 13 | 100.00% | 1 | 100.00% |
static inline void i8042_platform_exit(void)
{
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
alexander beregalov | alexander beregalov | 8 | 100.00% | 1 | 100.00% |
| Total | 8 | 100.00% | 1 | 100.00% |
#endif /* !CONFIG_PCI */
#endif /* _I8042_SPARCIO_H */
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david s. miller | david s. miller | 570 | 88.24% | 10 | 47.62% |
alexander beregalov | alexander beregalov | 30 | 4.64% | 1 | 4.76% |
grant likely | grant likely | 24 | 3.72% | 5 | 23.81% |
vojtech pavlik | vojtech pavlik | 10 | 1.55% | 1 | 4.76% |
vincent stehle | vincent stehle | 6 | 0.93% | 1 | 4.76% |
stephen rothwell | stephen rothwell | 4 | 0.62% | 1 | 4.76% |
dmitry torokhov | dmitry torokhov | 1 | 0.15% | 1 | 4.76% |
andrew morton | andrew morton | 1 | 0.15% | 1 | 4.76% |
| Total | 646 | 100.00% | 21 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.