back to the roots: rename psm->pms

This commit is contained in:
drochner 1999-01-23 16:05:56 +00:00
parent 5a277f5dfd
commit 9b2859ca00
3 changed files with 88 additions and 88 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: files.pckbc,v 1.5 1998/09/17 18:21:04 drochner Exp $
# $NetBSD: files.pckbc,v 1.6 1999/01/23 16:05:56 drochner Exp $
# devices attached at pckbc, for use with wscons
device pckbd: wskbddev
@ -7,10 +7,10 @@ file dev/pckbc/pckbd.c pckbd needs-flag
file dev/pckbc/wskbdmap_mfii.c pckbd
defopt PCKBD_LAYOUT
device psm: wsmousedev
attach psm at pckbc
file dev/pckbc/psm.c psm
device pms: wsmousedev
attach pms at pckbc
file dev/pckbc/psm.c pms
device psmi: wsmousedev
attach psmi at pckbc
file dev/pckbc/psm_intelli.c psmi
device pmsi: wsmousedev
attach pmsi at pckbc
file dev/pckbc/psm_intelli.c pmsi

View File

@ -1,4 +1,4 @@
/* $NetBSD: psm.c,v 1.6 1998/08/15 03:02:47 mycroft Exp $ */
/* $NetBSD: psm.c,v 1.7 1999/01/23 16:05:56 drochner Exp $ */
/*-
* Copyright (c) 1994 Charles M. Hannum.
@ -36,7 +36,7 @@
#include <dev/wscons/wsconsio.h>
#include <dev/wscons/wsmousevar.h>
struct psm_softc { /* driver status information */
struct pms_softc { /* driver status information */
struct device sc_dev;
pckbc_tag_t sc_kbctag;
@ -50,26 +50,26 @@ struct psm_softc { /* driver status information */
struct device *sc_wsmousedev;
};
int psmprobe __P((struct device *, struct cfdata *, void *));
void psmattach __P((struct device *, struct device *, void *));
void psminput __P((void *, int));
int pmsprobe __P((struct device *, struct cfdata *, void *));
void pmsattach __P((struct device *, struct device *, void *));
void pmsinput __P((void *, int));
struct cfattach psm_ca = {
sizeof(struct psm_softc), psmprobe, psmattach,
struct cfattach pms_ca = {
sizeof(struct pms_softc), pmsprobe, pmsattach,
};
int psm_enable __P((void *));
int psm_ioctl __P((void *, u_long, caddr_t, int, struct proc *));
void psm_disable __P((void *));
int pms_enable __P((void *));
int pms_ioctl __P((void *, u_long, caddr_t, int, struct proc *));
void pms_disable __P((void *));
const struct wsmouse_accessops psm_accessops = {
psm_enable,
psm_ioctl,
psm_disable,
const struct wsmouse_accessops pms_accessops = {
pms_enable,
pms_ioctl,
pms_disable,
};
int
psmprobe(parent, match, aux)
pmsprobe(parent, match, aux)
struct device *parent;
struct cfdata *match;
void *aux;
@ -89,19 +89,19 @@ psmprobe(parent, match, aux)
res = pckbc_poll_cmd(pa->pa_tag, pa->pa_slot, cmd, 1, 2, resp, 1);
if (res) {
#ifdef DEBUG
printf("psmprobe: reset error %d\n", res);
printf("pmsprobe: reset error %d\n", res);
#endif
return (0);
}
if (resp[0] != PMS_RSTDONE) {
printf("psmprobe: reset response 0x%x\n", resp[0]);
printf("pmsprobe: reset response 0x%x\n", resp[0]);
return (0);
}
/* get type number (0 = mouse) */
if (resp[1] != 0) {
#ifdef DEBUG
printf("psmprobe: type 0x%x\n", resp[1]);
printf("pmsprobe: type 0x%x\n", resp[1]);
#endif
return (0);
}
@ -110,11 +110,11 @@ psmprobe(parent, match, aux)
}
void
psmattach(parent, self, aux)
pmsattach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
struct psm_softc *sc = (void *)self;
struct pms_softc *sc = (void *)self;
struct pckbc_attach_args *pa = aux;
struct wsmousedev_attach_args a;
u_char cmd[1], resp[2];
@ -133,7 +133,7 @@ psmattach(parent, self, aux)
res = pckbc_poll_cmd(pa->pa_tag, pa->pa_slot, cmd, 1, 2, resp, 1);
#ifdef DEBUG
if (res || resp[0] != PMS_RSTDONE || resp[1] != 0) {
printf("psmattach: reset error\n");
printf("pmsattach: reset error\n");
return;
}
#endif
@ -142,16 +142,16 @@ psmattach(parent, self, aux)
sc->oldbuttons = 0;
pckbc_set_inputhandler(sc->sc_kbctag, sc->sc_kbcslot,
psminput, sc);
pmsinput, sc);
a.accessops = &psm_accessops;
a.accessops = &pms_accessops;
a.accesscookie = sc;
/*
* Attach the wsmouse, saving a handle to it.
* Note that we don't need to check this pointer against NULL
* here or in psmintr, because if this fails psm_enable() will
* never be called, so psmintr() will never be called.
* here or in pmsintr, because if this fails pms_enable() will
* never be called, so pmsinput() will never be called.
*/
sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint);
@ -159,15 +159,15 @@ psmattach(parent, self, aux)
cmd[0] = PMS_DEV_DISABLE;
res = pckbc_poll_cmd(pa->pa_tag, pa->pa_slot, cmd, 1, 0, 0, 0);
if (res)
printf("psmattach: disable error\n");
printf("pmsattach: disable error\n");
pckbc_slot_enable(sc->sc_kbctag, sc->sc_kbcslot, 0);
}
int
psm_enable(v)
pms_enable(v)
void *v;
{
struct psm_softc *sc = v;
struct pms_softc *sc = v;
u_char cmd[1];
int res;
@ -183,7 +183,7 @@ psm_enable(v)
cmd[0] = PMS_DEV_ENABLE;
res = pckbc_enqueue_cmd(sc->sc_kbctag, sc->sc_kbcslot, cmd, 1, 0, 1, 0);
if (res)
printf("psm_enable: command error\n");
printf("pms_enable: command error\n");
#if 0
{
u_char scmd[2];
@ -193,20 +193,20 @@ psm_enable(v)
res = pckbc_enqueue_cmd(sc->sc_kbctag, sc->sc_kbcslot, scmd,
2, 0, 1, 0);
if (res)
printf("psm_enable: setup error1 (%d)\n", res);
printf("pms_enable: setup error1 (%d)\n", res);
scmd[0] = PMS_SET_SCALE21;
res = pckbc_enqueue_cmd(sc->sc_kbctag, sc->sc_kbcslot, scmd,
1, 0, 1, 0);
if (res)
printf("psm_enable: setup error2 (%d)\n", res);
printf("pms_enable: setup error2 (%d)\n", res);
scmd[0] = PMS_SET_SAMPLE;
scmd[1] = 100; /* 100 samples/sec */
res = pckbc_enqueue_cmd(sc->sc_kbctag, sc->sc_kbcslot, scmd,
2, 0, 1, 0);
if (res)
printf("psm_enable: setup error3 (%d)\n", res);
printf("pms_enable: setup error3 (%d)\n", res);
}
#endif
@ -214,17 +214,17 @@ psm_enable(v)
}
void
psm_disable(v)
pms_disable(v)
void *v;
{
struct psm_softc *sc = v;
struct pms_softc *sc = v;
u_char cmd[1];
int res;
cmd[0] = PMS_DEV_DISABLE;
res = pckbc_enqueue_cmd(sc->sc_kbctag, sc->sc_kbcslot, cmd, 1, 0, 1, 0);
if (res)
printf("psm_disable: command error\n");
printf("pms_disable: command error\n");
pckbc_slot_enable(sc->sc_kbctag, sc->sc_kbcslot, 0);
@ -232,7 +232,7 @@ psm_disable(v)
}
int
psm_ioctl(v, cmd, data, flag, p)
pms_ioctl(v, cmd, data, flag, p)
void *v;
u_long cmd;
caddr_t data;
@ -240,7 +240,7 @@ psm_ioctl(v, cmd, data, flag, p)
struct proc *p;
{
#if 0
struct psm_softc *sc = v;
struct pms_softc *sc = v;
#endif
switch (cmd) {
@ -256,11 +256,11 @@ psm_ioctl(v, cmd, data, flag, p)
#define PS2RBUTMASK 0x02
#define PS2MBUTMASK 0x04
void psminput(vsc, data)
void pmsinput(vsc, data)
void *vsc;
int data;
{
struct psm_softc *sc = vsc;
struct pms_softc *sc = vsc;
signed char dy;
u_int changed;

View File

@ -1,4 +1,4 @@
/* $NetBSD: psm_intelli.c,v 1.3 1998/08/15 03:02:47 mycroft Exp $ */
/* $NetBSD: psm_intelli.c,v 1.4 1999/01/23 16:05:56 drochner Exp $ */
/*-
* Copyright (c) 1994 Charles M. Hannum.
@ -36,7 +36,7 @@
#include <dev/wscons/wsconsio.h>
#include <dev/wscons/wsmousevar.h>
struct psmi_softc { /* driver status information */
struct pmsi_softc { /* driver status information */
struct device sc_dev;
pckbc_tag_t sc_kbctag;
@ -50,28 +50,28 @@ struct psmi_softc { /* driver status information */
struct device *sc_wsmousedev;
};
int psmiprobe __P((struct device *, struct cfdata *, void *));
void psmiattach __P((struct device *, struct device *, void *));
void psmiinput __P((void *, int));
int pmsiprobe __P((struct device *, struct cfdata *, void *));
void pmsiattach __P((struct device *, struct device *, void *));
void pmsiinput __P((void *, int));
struct cfattach psmi_ca = {
sizeof(struct psmi_softc), psmiprobe, psmiattach,
struct cfattach pmsi_ca = {
sizeof(struct pmsi_softc), pmsiprobe, pmsiattach,
};
int psmi_enable __P((void *));
int psmi_ioctl __P((void *, u_long, caddr_t, int, struct proc *));
void psmi_disable __P((void *));
int pmsi_enable __P((void *));
int pmsi_ioctl __P((void *, u_long, caddr_t, int, struct proc *));
void pmsi_disable __P((void *));
const struct wsmouse_accessops psmi_accessops = {
psmi_enable,
psmi_ioctl,
psmi_disable,
const struct wsmouse_accessops pmsi_accessops = {
pmsi_enable,
pmsi_ioctl,
pmsi_disable,
};
static int psmi_setintellimode __P((pckbc_tag_t, pckbc_slot_t));
static int pmsi_setintellimode __P((pckbc_tag_t, pckbc_slot_t));
static int
psmi_setintellimode(tag, slot)
pmsi_setintellimode(tag, slot)
pckbc_tag_t tag;
pckbc_slot_t slot;
{
@ -98,7 +98,7 @@ psmi_setintellimode(tag, slot)
}
int
psmiprobe(parent, match, aux)
pmsiprobe(parent, match, aux)
struct device *parent;
struct cfdata *match;
void *aux;
@ -118,26 +118,26 @@ psmiprobe(parent, match, aux)
res = pckbc_poll_cmd(pa->pa_tag, pa->pa_slot, cmd, 1, 2, resp, 1);
if (res) {
#ifdef DEBUG
printf("psmiprobe: reset error %d\n", res);
printf("pmsiprobe: reset error %d\n", res);
#endif
return (0);
}
if (resp[0] != PMS_RSTDONE) {
printf("psmiprobe: reset response 0x%x\n", resp[0]);
printf("pmsiprobe: reset response 0x%x\n", resp[0]);
return (0);
}
/* get type number (0 = mouse) */
if (resp[1] != 0) {
#ifdef DEBUG
printf("psmiprobe: type 0x%x\n", resp[1]);
printf("pmsiprobe: type 0x%x\n", resp[1]);
#endif
return (0);
}
if ((res = psmi_setintellimode(pa->pa_tag, pa->pa_slot))) {
if ((res = pmsi_setintellimode(pa->pa_tag, pa->pa_slot))) {
#ifdef DEBUG
printf("psmiprobe: intellimode -> %d\n", res);
printf("pmsiprobe: intellimode -> %d\n", res);
#endif
return (0);
}
@ -146,11 +146,11 @@ psmiprobe(parent, match, aux)
}
void
psmiattach(parent, self, aux)
pmsiattach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
struct psmi_softc *sc = (void *)self;
struct pmsi_softc *sc = (void *)self;
struct pckbc_attach_args *pa = aux;
struct wsmousedev_attach_args a;
u_char cmd[1], resp[2];
@ -169,33 +169,33 @@ psmiattach(parent, self, aux)
res = pckbc_poll_cmd(pa->pa_tag, pa->pa_slot, cmd, 1, 2, resp, 1);
#ifdef DEBUG
if (res || resp[0] != PMS_RSTDONE || resp[1] != 0) {
printf("psmiattach: reset error\n");
printf("pmsiattach: reset error\n");
return;
}
#endif
res = psmi_setintellimode(pa->pa_tag, pa->pa_slot);
res = pmsi_setintellimode(pa->pa_tag, pa->pa_slot);
#ifdef DEBUG
if (res) {
printf("psmiattach: error setting intelli mode\n");
printf("pmsiattach: error setting intelli mode\n");
return;
}
#endif
/* Other initialization was done by psmiprobe. */
/* Other initialization was done by pmsiprobe. */
sc->inputstate = 0;
sc->oldbuttons = 0;
pckbc_set_inputhandler(sc->sc_kbctag, sc->sc_kbcslot,
psmiinput, sc);
pmsiinput, sc);
a.accessops = &psmi_accessops;
a.accessops = &pmsi_accessops;
a.accesscookie = sc;
/*
* Attach the wsmouse, saving a handle to it.
* Note that we don't need to check this pointer against NULL
* here or in psmintr, because if this fails pms_enable() will
* never be called, so psmintr() will never be called.
* here or in pmsintr, because if this fails pms_enable() will
* never be called, so pmsiinput() will never be called.
*/
sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint);
@ -203,15 +203,15 @@ psmiattach(parent, self, aux)
cmd[0] = PMS_DEV_DISABLE;
res = pckbc_poll_cmd(pa->pa_tag, pa->pa_slot, cmd, 1, 0, 0, 0);
if (res)
printf("psmiattach: disable error\n");
printf("pmsiattach: disable error\n");
pckbc_slot_enable(sc->sc_kbctag, sc->sc_kbcslot, 0);
}
int
psmi_enable(v)
pmsi_enable(v)
void *v;
{
struct psmi_softc *sc = v;
struct pmsi_softc *sc = v;
u_char cmd[1];
int res;
@ -227,23 +227,23 @@ psmi_enable(v)
cmd[0] = PMS_DEV_ENABLE;
res = pckbc_enqueue_cmd(sc->sc_kbctag, sc->sc_kbcslot, cmd, 1, 0, 1, 0);
if (res)
printf("psmi_enable: command error\n");
printf("pmsi_enable: command error\n");
return 0;
}
void
psmi_disable(v)
pmsi_disable(v)
void *v;
{
struct psmi_softc *sc = v;
struct pmsi_softc *sc = v;
u_char cmd[1];
int res;
cmd[0] = PMS_DEV_DISABLE;
res = pckbc_enqueue_cmd(sc->sc_kbctag, sc->sc_kbcslot, cmd, 1, 0, 1, 0);
if (res)
printf("psmi_disable: command error\n");
printf("pmsi_disable: command error\n");
pckbc_slot_enable(sc->sc_kbctag, sc->sc_kbcslot, 0);
@ -251,7 +251,7 @@ psmi_disable(v)
}
int
psmi_ioctl(v, cmd, data, flag, p)
pmsi_ioctl(v, cmd, data, flag, p)
void *v;
u_long cmd;
caddr_t data;
@ -275,11 +275,11 @@ psmi_ioctl(v, cmd, data, flag, p)
#define PS2RBUTMASK 0x02
#define PS2MBUTMASK 0x04
void psmiinput(vsc, data)
void pmsiinput(vsc, data)
void *vsc;
int data;
{
struct psmi_softc *sc = vsc;
struct pmsi_softc *sc = vsc;
signed char dz;
u_int changed;