]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/9/pc/devkbd.c
archacpi: make *acpi=1 the default
[plan9front.git] / sys / src / 9 / pc / devkbd.c
index 5f6865ef191199b797e2a636580efef3a2897d1e..5aeaded1f21b2d30a9f9b3b6857928958bff5d36 100644 (file)
@@ -40,14 +40,12 @@ enum {
        Qdir,
        Qscancode,
        Qleds,
-       Qrepeat,
 };
 
 static Dirtab kbdtab[] = {
        ".",            {Qdir, 0, QTDIR},       0,      0555,
        "scancode",     {Qscancode, 0},         0,      0440,
        "leds",         {Qleds, 0},             0,      0220,
-       "repeat",       {Qrepeat, 0},           0,      0220,
 };
 
 static Lock i8042lock;
@@ -195,28 +193,6 @@ setleds(int leds)
        iunlock(&i8042lock);
 }
 
-static void
-setrepeat(int repeat)
-{
-       if(nokbd)
-               return;
-
-       repeat &= 0x7f;
-       ilock(&i8042lock);
-       for(;;){
-               if(outready() < 0)
-                       break;
-               outb(Data, 0xf3);               /* `set typematic rate and delay' */
-               if(outready() < 0)
-                       break;
-               outb(Data, repeat);
-               if(outready() < 0)
-                       break;
-               break;
-       }
-       iunlock(&i8042lock);
-}
-
 /*
  *  keyboard interrupt
  */
@@ -381,18 +357,16 @@ kbdwrite(Chan *c, void *a, long n, vlong)
 {
        char tmp[8+1], *p;
 
+       if(c->qid.path != Qleds)
+               error(Egreg);
+
        p = tmp + n;
        if(n >= sizeof(tmp))
                p = tmp + sizeof(tmp)-1;
        memmove(tmp, a, p - tmp);
        *p = 0;
 
-       if(c->qid.path == Qleds)
-               setleds(atoi(tmp));
-       else if(c->qid.path == Qrepeat)
-               setrepeat(atoi(tmp));
-       else
-               error(Egreg);
+       setleds(atoi(tmp));
 
        return n;
 }