All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Jan Rekorajski <baggins@sith.mimuw.edu.pl>, linux-mips@linux-mips.org
Subject: Re: [PATCH] zs: Move to the serial subsystem
Date: Fri, 1 Jun 2007 16:03:31 +0200	[thread overview]
Message-ID: <20070601140331.GH2649@lug-owl.de> (raw)
In-Reply-To: <Pine.LNX.4.64N.0705301802570.27697@blysk.ds.pg.gda.pl>

[-- Attachment #1: Type: text/plain, Size: 2385 bytes --]

On Wed, 2007-05-30 18:25:46 +0100, Maciej W. Rozycki <macro@linux-mips.org> wrote:
> On Wed, 30 May 2007, Jan Rekorajski wrote:
> > Any chance to get LK201/401 keyboard and vsxxxaa mouse working with this?
> 
>  For the time being a solution is the patch below and then:
> 
> CONFIG_INPUT=y
> CONFIG_INPUT_KEYBOARD=y
> CONFIG_KEYBOARD_LKKBD=y
> CONFIG_INPUT_MOUSE=y
> CONFIG_MOUSE_VSXXXAA=y
> CONFIG_SERIO=y
> CONFIG_SERIO_SERPORT=y
> CONFIG_VT=y
> CONFIG_VT_CONSOLE=y
> CONFIG_HW_CONSOLE=y
> CONFIG_VT_HW_CONSOLE_BINDING=y
> 
> plus your framebuffer of choice.  To activate the keyboard you have to run 
> the following program:
> 
> #include <fcntl.h>
> #include <sys/ioctl.h>
> #include <unistd.h>
> 
> #define SPIOCSTYPE _IOW('q', 0x01, unsigned long)
> #define SERIO_LKKBD 0x28
> 
> int main(void)
> {
> 	int fd, ldisc = N_MOUSE, type = SERIO_LKKBD;
> 	char buf;
> 
> 	fd = open("/dev/ttyS2", O_RDWR | O_NONBLOCK);
> 	ioctl(fd, TIOCSETD, &ldisc);
> 	ioctl(fd, SPIOCSTYPE, &type);
> 	read(fd, &buf, 1);
> 	close(fd);
> 
> 	return 0;
> }

Another way would be to use the `inputattach' program, which is
shipped with the `joystick' package (sic) and also does line speed
setting etc. for you.

MfG, JBG

>  I am looking into a solution that would make it automatic without the 
> need of involving userland which just does not seem right here -- you do 
> want to run your kernel with "init=/bin/bash" or suchlike and have your 
> virtual terminal console usable.  I will remove the old lk201 bits then.

IIRC the serial port needs to register a serio device, set correct
baud/cstopb/... settings and set VSXXXAA/LKKBD identity on the two
serio ports. I *hope* the rest happens automatically then. (Another
way would be to look into how the Sun guys get their keyboards
up'n'running...)

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of: 23:53 <@jbglaw> So, ich kletter' jetzt mal ins Bett.
the second  : 23:57 <@jever2> .oO( kletter ..., hat er noch Gitter vorm Bett, wie früher meine Kinder?)
              00:00 <@jbglaw> jever2: *patsch*
              00:01 <@jever2> *aua*, wofür, Gedanken sind frei!
              00:02 <@jbglaw> Nee, freie Gedanken, die sind seit 1984 doch aus!
              00:03 <@jever2> 1984? ich bin erst seit 1985 verheiratet!

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2007-06-01 14:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-29 13:03 [PATCH] zs: Move to the serial subsystem Maciej W. Rozycki
2007-05-30  8:12 ` Andrew Morton
2007-05-30  9:54   ` Andy Whitcroft
2007-05-30 10:09   ` Russell King
2007-05-30 12:06   ` Maciej W. Rozycki
2007-05-30 16:58 ` Jan Rekorajski
2007-05-30 17:25   ` Maciej W. Rozycki
2007-06-01 12:50     ` Jan Rekorajski
2007-06-01 13:47       ` Maciej W. Rozycki
2007-06-01 14:03     ` Jan-Benedict Glaw [this message]
2007-06-01 15:11       ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070601140331.GH2649@lug-owl.de \
    --to=jbglaw@lug-owl.de \
    --cc=baggins@sith.mimuw.edu.pl \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.